fix(control): self-heal invalid native helper pairs - #90
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CepCzSGN8rDhJGx69N81NU
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa2ae22bc4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CepCzSGN8rDhJGx69N81NU
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 134b513e15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbdCwWt1oUsGvybbqUxwJp
…ebuild-isolation fix(control): isolate concurrent helper builds
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8397128ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "cockpit": "npm run build && node dist/cockpit-host/server.js", | ||
| "cockpit:live": "npm run build && node dist/runtime/live-cockpit.js", | ||
| "control": "npm run build && node dist/control/cli.js", | ||
| "cockpit:live": "npm run build && node tools/control-owner/ensure-helper.mjs && node dist/runtime/live-cockpit.js", |
There was a problem hiding this comment.
Preserve the read-only cockpit when helper provisioning fails
On Windows when the helper pair needs rebuilding but MSVC/SDK is unavailable or the build otherwise fails, ensure-helper.mjs exits 1 and this && chain prevents live-cockpit.js from starting at all. That regresses the explicit behavior in src/runtime/live-cockpit.ts:274-289, where control-channel startup is deliberately non-blocking and failures must leave the read-only Cockpit available; keep provisioning failure fatal for control, but allow cockpit:live to continue without the channel.
Useful? React with 👍 / 👎.
Final coherent D062 helper-lifecycle reconstruction for PR #85.
Current exact state (authoritative)
aaa7ddc4b625ca4aa5d192585daa4ce824a72be6e8397128ce7d24cf9ab2074f2a9dd612c073a609e8397128: SUCCESS (verify+windows-owner-helper)Integrated child — PR #91 (concurrent-helper-rebuild isolation)
c954d0feed8ff87f889e18e65ae439fec9830ac9e8397128ce7d24cf9ab2074f2a9dd612c073a609(create-a-merge-commit; no squash/rebase)134b513e15a056d037cc51b794d72c1a9891a4b4c954d0feed8ff87f889e18e65ae439fec9830ac9F0159E6766F9A5DFFFBA8EB7CC74FC5A53F70A6387140A00EFB0D4B85B86E244(13246 bytes), exactly two files:tools/control-owner/build.mjstests/control/launch-lifecycle.test.tsc954d0f.Finding ledger
Codex "Reject truncated provenance modules"
aa2ae22…e8397128…: FIXEDthe exact truncated-module witness is INVALID → rebuild/self-heal; exhaustive
truncation-at-every-byte matrix passes; fresh parent audit PASS; exact-head CI green.
Codex "Serialize concurrent helper rebuilds"
134b513…e8397128…: FIXED (via child PR fix(control): isolate concurrent helper builds #91)build.mjsnow compiles each build in a process-unique privatemkdtempworkspace and publishes only by atomic rename of the validated result; the
shared
obj/exe compile state is gone. Fresh parent regression: 2/3/4-builderrounds all succeed (27/27 concurrent invocations exit 0), final pair canonical
every round, no shared compile state, deterministic digest preserved.
PR fix(control): isolate concurrent helper builds #91 cleanup claim (
build.mjs:251, "Clean the private workspace on every error path")but explicitly permitted by the adopted mechanism (best-effort cleanup; abandoned
.build-*is private, non-authoritative, self-healing on next launch; no automaticretry loop; the triggering ENOSPC/EACCES already fails the launch closed). A
try/finallywould be optional hygiene, not a required correctness repair.Current mechanism evidence (at
e8397128)encodeProvenance(SHA256(helper))), proven by exhaustive truncation at every byteoffset, exhaustive single-byte mutation, and duplicate/extra/format variants;
src/control/control-store.ts,src/control/control-runtime.ts,agentbridge-win-owner.c, and the six D062 files) — 0-diff;Mechanism invariants (circuit-breaker record)
The canonical-provenance predicate redesign was the final permitted predicate redesign
on PR #90 — no third regex / field-extraction refinement is allowed. The concurrency
family is a distinct family closed by isolation (child PR #91); no lock/serialization
lifecycle was introduced.
One side-effect-free canonical encoder (
tools/control-owner/provenance-format.mjs) is thesingle producer used by both
build.mjs(publish) andensure-helper.mjs(accept). Theruntime's own
import()+ hash-before-exec verification is unchanged and remains the finalsecurity authority (no trust transfer from the lifecycle gate). If the canonical invariant is
later falsified on a supported path: STOP — no local predicate patch — escalate to the
pre-agreed JSON provenance redesign.
History — superseded state and reconstruction lineage
Superseded exact state at
134b513(pre-#91)134b513e15a056d037cc51b794d72c1a9891a4b4; PR commits 2; exact-head CI #279(run
34122017059) SUCCESS.134b513(parentaa2ae22, subjectfix(control): canonicalize helper provenance lifecycle, patchBD63236A244AD3E538652C71EFCCAB61190708716799E49E55BDBE445DD03AF2/ 39063 bytes) over 5files (
provenance-format.mjs,build.mjs,ensure-helper.mjs,ensure-helper.d.mts,launch-lifecycle.test.ts). Fresh independent validationPASS_PR90_CANONICAL_PROVENANCE_FRESH_INDEPENDENT_VALIDATION; full suite 2054 passed / 1 skipped.
Original findings / supersession
existence-only skip could accept a torn helper/provenance pair; it was not repaired or stacked.
aaa7ddc4b625ca4aa5d192585daa4ce824a72be6under the PR55/PR74 circuit-breaker.provenance existed before control-channel verification.
fast path skipped rebuild; runtime then returned HELPER_HASH_MISMATCH; channel unavailable until
manual recovery.
aa2ae22bc4090195e03c39bb96b6bc50e62616d1,1 commit / 5 files, patch
CEDC0605F0B5CED7139EC6F29DA45D96516E1A37928D313934206B57DA0D432A(24657 bytes); validated provenance by field-extraction; the truncated-module witness motivated
the canonicalization commit
134b513.Quarantine
Authority
PR #90 remains Draft. This evidence refresh grants no Ready authority and no merge
authority. Human merge authority is preserved.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XbdCwWt1oUsGvybbqUxwJp