Skip to content

fix(ci): require the remote bundle to be published, not only tagged, before a release (#1966) - #2212

Merged
devswha merged 5 commits into
mainfrom
ci/release-guard-remote-bundle-published
Oct 28, 2026
Merged

devswha merged 5 commits into
mainfrom
ci/release-guard-remote-bundle-published

Conversation

@devswha

@devswha devswha commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Change

Closes #1966.

The Release preflight (bun scripts/release-guards.ts --release X.Y.Z in .github/workflows/release.yml) took the remote-vN tag as a published bundle. The Remote PC bundles workflow uploads manifest.json and 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-vN is tagged, the Release run now also checks the bundle the way remote PCs read it (server/remote-bundle.ts):

  • releases/download/remote-vN/manifest.json answers. It is read through the same 1 MiB cap remote PCs use (readCappedJson), names version N, and lists a URL and sha256 for all five platforms.
  • Each archive answers a GET of its first byte (range: bytes=0-0; GitHub answers 206 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/ or shared/ file changes, so REMOTE_BUNDLE_VERSION stays as it is. docs/development.md step 3 says the Release run refuses until the bundle can be downloaded. A Maintenance fragment is in changelog.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's release-guards.ts the test file fails to load (publishedProblems does not exist there).
  • Each new check fails its own test when broken: a HEAD instead of the ranged GET, an uncapped manifest read, an empty archive accepted, and --release not calling the check (releaseCheck). Each mutant gives 1-2 failing tests; restored, all pass.
  • Real CLI, in a throwaway clone of main with REMOTE_BUNDLE_VERSION raised to 39 and a local remote-v39 tag (unpublished):
    • main's script: Release 0.4.19: remote bundle, telemetry Worker and release metadata are in order., exit 0 (the false green).
    • this branch: ::error::remote-v39 is tagged but not published: https://github.com/devswha/ovis/releases/download/remote-v39/manifest.json answered 404. ..., exit 1.
  • Live against GitHub: publishedProblems(38) (the current, published bundle) returns no problems in 723 ms, through the redirect to release-assets.githubusercontent.com.
  • Merge pass (Codex) MEDIUM on 2bf3fcc: a 206 with a positive Content-Range whose body errored before any byte still passed. Fixed in f27cb53: the check reads until the first byte and reports a stream error or an empty body. Its regression test fails on 2bf3fcc (18 pass, 1 fail) and passes after (19 pass); live publishedProblems(38) still returns no problems (652 ms).
  • Merge pass (Codex) MEDIUM on f27cb53: a non-empty 200 with no Content-Length or Content-Range was refused as empty (a false refusal). Fixed in 5211c6b: an undeclared size is told apart from a declared zero. Its regression test fails on f27cb53 (19 pass, 1 fail) and passes after (20 pass); live publishedProblems(38) still returns no problems.
  • bun run check fast green on 2bf3fcc, f27cb53 and 5211c6b (workflow lint, generated files, typecheck, build, unit tests).
  • Reviews: omo-native-code-reviewer PASS (its MEDIUM, the untested --release wiring, 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.
  • No workflow file changed, so there is no new job to show running. The Release workflow itself runs only on main (Require main) and publishes, so it was not dispatched; its preflight runs this exact script.

…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.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 30cd84f and 2bf3fcc.

Files selected for processing: 4
  • changelog.d/release-guard-remote-bundle-published.md
  • docs/development.md
  • scripts/release-guards.test.ts
  • scripts/release-guards.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Release checks now wait for the tagged Remote PC bundle to be available for download before proceeding. They verify the bundle manifest and platform archives, helping prevent releases from continuing with incomplete or invalid bundle files.
  • Documentation
    • Updated release instructions to clarify that tagging alone is not enough: the Remote PC bundles workflow must publish downloadable manifests and archives before a release can proceed.

The Release preflight now verifies that a tagged remote bundle has a version-matched manifest and downloadable, non-empty archives for every supported platform. The release CLI runs this check only after the matching remote tag exists. Tests and release instructions cover the publication requirement.

Changes: Remote bundle release gate

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: Normal

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: Passed 5
Check name Status Explanation
Title check Passed The title clearly states the main change: releases now require the remote bundle to be published, not only tagged.
Linked Issues check Passed Issue #1966 requires the Release preflight to reject a tagged remote bundle until its published manifest and release archives are available. publishedProblems reads the remote-vN manifest with the…
Out of Scope Changes check Passed 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 a…
Docstring Coverage Passed 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. Documentat…
Description check Passed 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 bundle…
Full details: Linked Issues check

Explanation

Issue #1966 requires the Release preflight to reject a tagged remote bundle until its published manifest and release archives are available. publishedProblems reads the remote-vN manifest 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. releaseCheck invokes this check only for an existing remote-vN tag, while the --base path 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha

devswha commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

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: BUNDLE_PLATFORMS and the manifest URL in scripts/release-guards.ts ~75-77 repeat server/remote-bundle.ts ~13/21 and remote-bundles.yml ~148; export the platform list from server/ and reuse it.; A 206 with an unknown size (content-range: bytes 0-0/*) is refused as empty (~121); treat any 206 as not empty (fails closed today).

@devswha
devswha merged commit 0654dd0 into main Oct 28, 2026
11 of 12 checks passed
@devswha
devswha deleted the ci/release-guard-remote-bundle-published branch October 28, 2026 11:42
@coderabbitai coderabbitai Bot mentioned this pull request Oct 29, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release guard: require the remote-vN bundle to be published, not only tagged

1 participant