Repository navigation
fix(ci): require the remote bundle to be published, not only tagged, before a release (#1966) - #2212
Conversation
…before a release (#1966) The Release preflight took the remote-vN tag as a published bundle, so a run started before the Remote PC bundles workflow uploaded the manifest would ship an app whose remote PCs find no bundle. It now reads the manifest remote PCs download and checks every platform archive answers.
…, and read a null manifest
…h archive's first byte
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Manifest and archive validation scripts/release-guards.ts, scripts/release-guards.test.ts |
The guard checks the manifest size and version, validates each platform asset’s HTTPS URL and SHA-256 value, and checks archive availability. Tests cover valid publication and manifest, archive, and network failures. |
Release gating and documentation scripts/release-guards.ts, scripts/release-guards.test.ts, docs/development.md, changelog.d/release-guard-remote-bundle-published.md |
The release path adds publication problems to the verdict only when the matching remote tag exists. Tests cover the tag and publication checks. The release instructions and changelog describe the requirement. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- devswha/ovis#1859: Adds the Remote PC bundles workflow and the manifest and archives that this release guard validates.
Merge Risk: 
Minimal · up to 2bf3f
-
No actionable merge-blocking issue is established. The Release workflow has not been exercised end to end, so run the normal release checks before relying on the gate.
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
Issue
#1966requires the Release preflight to reject a tagged remote bundle until its published manifest and release archives are available.publishedProblemsreads theremote-vNmanifest with the remote-client size limit, checks the version and all five platform URLs and SHA-256 values, and performs ranged GET requests that require non-empty archives.releaseCheckinvokes this check only for an existingremote-vNtag, while the--basepath remains unchanged. Tests cover unpublished, invalid, incomplete, empty, and successful bundles, including Release wiring.
Full details: Out of Scope Changes check
-
Explanation
The changed guard, tests, release documentation, and changelog fragment all support Issue
#1966. The guard implements publication validation, the tests verify the new behavior, and the documentation and changelog describe the changed release requirement. No unrelated workflow, server, or shared implementation changes are present.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files. (2 skipped: 2 unsupported.)
Full details: Description check
-
Explanation
The description follows the required template. It has a Change section that states the problem (Release preflight treats a tagged remote-vN as published, so a run can start before the Remote PC bundles workflow uploads manifest.json and archives), the resulting behavior, and the linked issue
#1966. It has a Validation section listing the test run (18 pass), mutant checks, a real CLI run on main and on this branch, a live GitHub check, reviewer findings and fixes, and a fast check run. The author states the Release workflow was not dispatched and explains why. Minor gap: the template asks for contract-test coverage for HTTP changes; the change adds HTTP requests to GitHub, and the description covers this through unit tests and a live check but does not name a contract test.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Merging 5211c6b on the owner's go relayed by Dori; it changes the release gate. omo-native-code-reviewer and Codex both pass after three rounds. Before a release, the preflight now requires each remote bundle archive to be published, not only tagged. An archive counts once its first byte arrives: an error before that byte, an empty body or a declared zero size is refused, and an undeclared size passes once a byte arrives. Each case has a test that fails on its previous head. No workflow, permission or token changed, and the live remote-v38 passes. The required checks are green. LOW notes, not filed as an issue: |
Change
Closes #1966.
The Release preflight (
bun scripts/release-guards.ts --release X.Y.Zin.github/workflows/release.yml) took theremote-vNtag as a published bundle. The Remote PC bundles workflow uploadsmanifest.jsonand the archives only after its build, smoke and ssh jobs finish. A Release run started in between would publish an app whose remote PCs get a manifest URL with no bundle behind it.When
remote-vNis tagged, the Release run now also checks the bundle the way remote PCs read it (server/remote-bundle.ts):releases/download/remote-vN/manifest.jsonanswers. It is read through the same 1 MiB cap remote PCs use (readCappedJson), names versionN, and lists a URL and sha256 for all five platforms.range: bytes=0-0; GitHub answers206 bytes 0-0/<size>) and that byte actually arrives (headers alone do not count). A declared size of zero fails; an answer that declares no size (a chunked 200 from a host without ranges) passes once its byte arrives. The archives are not downloaded in full and their sha256 is not checked, so the preflight stays well inside its 5-minute budget. All requests share one 60 s timeout.The CI path (
--base) is unchanged: there a raised bundle may still be unpublished. No workflow,server/orshared/file changes, soREMOTE_BUNDLE_VERSIONstays as it is.docs/development.mdstep 3 says the Release run refuses until the bundle can be downloaded. A Maintenance fragment is inchangelog.d/.Merge: this changes the release gate. The merge waits for the owner's go, which Dori will ask for with this PR's link.
Validation
bun test scripts/release-guards.test.ts: 18 pass. With main'srelease-guards.tsthe test file fails to load (publishedProblemsdoes not exist there).--releasenot calling the check (releaseCheck). Each mutant gives 1-2 failing tests; restored, all pass.REMOTE_BUNDLE_VERSIONraised to 39 and a localremote-v39tag (unpublished):Release 0.4.19: remote bundle, telemetry Worker and release metadata are in order., exit 0 (the false green).::error::remote-v39 is tagged but not published: https://github.com/devswha/ovis/releases/download/remote-v39/manifest.json answered 404. ..., exit 1.publishedProblems(38)(the current, published bundle) returns no problems in 723 ms, through the redirect to release-assets.githubusercontent.com.publishedProblems(38)still returns no problems (652 ms).publishedProblems(38)still returns no problems.bun run check fastgreen on 2bf3fcc, f27cb53 and 5211c6b (workflow lint, generated files, typecheck, build, unit tests).--releasewiring, is fixed in 3d1703d). Codex Sol 6.1 Fast xhigh BLOCKed 0e88e3b on two MEDIUMs (HEAD could pass where a GET fails or the archive is empty; the manifest was read without the remote PCs' 1 MiB cap). Both are fixed in 2bf3fcc, and its re-review of the fixes is PASS with no findings.main(Require main) and publishes, so it was not dispatched; its preflight runs this exact script.