Repository navigation
ci(daemon): gate PRs on daemon protocol crossing from the newest release - #24089
Conversation
Lands daemon-protocol-facts.mjs from the Windows update diagnostic branch with a stricter parser, and adds check-daemon-protocol-crossing.mjs (rule R1): the working tree must attach the newest release tag's daemon. Rollback crossing is reported only. Runs in the cross-version-wire job, which already has full tags; tag selection moves to config/scripts/stable-release-tags.mjs so both use one rule.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds daemon protocol parsing and attachability checks between the working tree and a stable release. The check selects a baseline release, reports upgrade and rollback compatibility, and fails when upgrade attachability fails. The cross-version wire workflow runs the check. Path classification and tests cover the new workflow routing. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The compatibility check rejects upgrades that drop the newest release’s protocol, and no remaining issue in the reviewed changes blocks merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change adds a compatibility check within an existing CI job without introducing a new runtime endpoint or additional credentials. No concrete security concern was established. The assessment remains qualified because an independent full comparison with the base revision was unavailable. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 31.58% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 19 functions across 9 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
ℹ️ No critical issues — one minor nitpick.
Reviewed changes
This PR adds a CI gate that fails a PR when the working tree can no longer attach the terminal daemon shipped by the newest stable release — the failure mode that strands live terminals across an update. CI-only; no runtime behavior changes.
- New
check:daemon-protocol-crossinggate — readsdaemon-protocol-version.tsat the newestvX.Y.Ztag and fails when the candidate neither speaks that release'sPROTOCOL_VERSIONnor lists it inPREVIOUS_DAEMON_PROTOCOL_VERSIONS. Rollback crossing is reported for information only.--release-ref/ORCA_CROSS_VERSION_BASELINE_REFpin the tag. - Shared strict parser —
config/scripts/daemon-protocol-facts.mjsparses the two declarations from source text and throws loudly on missing, duplicate, non-literal, empty, or out-of-range forms;canAttach/crossingRequirementsencode the attach contract. - Shared tag selection —
config/scripts/stable-release-tags.mjsextractsselectLatestStableReleaseTag/compareReleaseTagsfrom the e2e harness;tests/e2e/cross-version-wire/release-checkout.tsnow imports and re-exports it with no behavior change. - CI wiring — the step runs in the existing
cross-version-wirejob (full history, no new runner), andconfig/scripts/pr-code-change-scope.mjsadds the protocol file and the three scripts to the job's path filter. - Tests — parser, crossing-assessment, tag-selector, and path-classification tests; all land in
config/scripts/**/*.test.mjs, so the shardedtestjob runs them.
I verified the runtime contract the gate encodes: PREVIOUS_DAEMON_PROTOCOL_VERSIONS is consumed by src/main/daemon/daemon-legacy-adapters.ts:32, which probes a per-protocol socket for each entry and adopts it — so the declared list is exactly the attach surface, and the gate's direction and message are correct. The gate also fails loudly on a shallow clone (no tags), and the job checks out with fetch-depth: 0.
ℹ️ Nitpicks
crossingRequirementscomputesrollbackandbothDirections, but its only production caller (assessDaemonProtocolCrossing) reads justupgrade:rollbackis asserted by a test yet never consumed, andbothDirectionsis referenced nowhere. Dropping the unused field, or wiring it into the failure output, would keep the helper honest.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…col-gate # Conflicts: # package.json

ELI5
When a user updates Orca, their open terminals survive only if the new version can still talk to the terminal daemon that is already running. This adds a PR check that compares the change against the latest release and fails if it would break that.
What Changed
config/scripts/daemon-protocol-facts.mjscomes from the Windows update-diagnostic branch, with a stricter parser that fails loudly on formats it doesn't understand instead of passing quietly. It is also newly unit-tested.config/scripts/check-daemon-protocol-crossing.mjsreadsdaemon-protocol-version.tsfrom the newestvX.Y.Ztag. It fails when the working tree neither speaks that release's protocol nor lists it inPREVIOUS_DAEMON_PROTOCOL_VERSIONS. Rollback compatibility is printed for information only.--release-reforORCA_CROSS_VERSION_BASELINE_REFpins the tag.cross-version-wirejob (full history, no new runner) and aspnpm run check:daemon-protocol-crossing. The job's path filter now includesdaemon-protocol-version.ts.config/scripts/stable-release-tags.mjsand is shared with the cross-version harness.Why
The existing unit test only checks that the version list is append-only. Nothing on
maincompared a PR against what users actually run. The daemon protocol moved 36 → 38 in about two days, so an accidental break is a realistic risk.Linked Issue
Part of the Node runtime plan (compatibility rule R1).
Visual Proof
N/A. This is a CI check only.
Testing
Against the real v1.4.217 (protocol 37 vs 38): OK. With 37 removed from the previous list: fails with a clear message.
Ran it against all 137 tags that have the file: 0 failures.
61 unit tests plus the cross-version-wire unit tests pass. Lint and the changed-code gate pass.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.