ci: add DinoLab V2 gate#1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a CI “V2 gate” to keep the DinoLab static PWA ship-ready by validating the app shell, manifest, service worker cache list, and local licensed assets, plus adding lightweight JS syntax checks.
Changes:
- Add a dependency-free Python validator (
tools/validate_static_app.py) that enforces required files, key boot markers, web manifest fields, and asset-manifest/license constraints. - Add a GitHub Actions workflow to run the validator and
node --checkforapp.js/sw.js. - Update documentation/README wording and add a V2 upgrade/guardrails plan document.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/validate_static_app.py | Adds the static app + asset/license validator used as the CI gate. |
| .github/workflows/ci.yml | Runs the validator and JS syntax checks on PRs/pushes to main. |
| README.md | Updates asset counts/wording and clarifies runtime asset format expectations. |
| docs/V2_UPGRADE_PLAN.md | Documents V2 baseline, ship-blocking guardrails, and a work queue. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+62
to
+67
| def safe_repo_path(value: str, errors: list[str], asset_id: str, field: str) -> Path | None: | ||
| rel = Path(value) | ||
| if rel.is_absolute() or ".." in rel.parts: | ||
| errors.append(f"{asset_id}.{field} must be a safe repo-relative path: {value}") | ||
| return None | ||
| return ROOT / rel |
Comment on lines
+49
to
+51
| def require_text_marker(path: str, text: str, marker: str, errors: list[str]) -> None: | ||
| if marker not in text: | ||
| errors.append(f"{path} is missing expected marker: {marker}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Local validation