Repository navigation
test: pin the frozen candidate-launcher contract - #205771
Conversation
- Pin real v2 trial output and the compiled twenty-minute default without changing production formats. - Feed real candidate manifest output into the frozen reader and exchange actual ready/stop frames with a pinned peer. - Prove the wire gap with a temporary ready-type mutation, restore it, and verify three owner cases/types/lint on AWS.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
- Assert the deployed v1 root and exact unordered live/preimage entries before the interoperability run. - Require an absolute positive preimage so coordinated writer/reader drift cannot move the oracle. - Verify the focused owner tests, types, lint, format and line guard on AWS without production changes.
|
Landed as da256ce. Test only: this pins the contract between a candidate and the launcher users run today. It checks that the real trial record and manifest writers produce the shapes that launcher reads (launcher format 4, 2 attempts, compiled 20 min budget, literal v1 manifest shape), and that the real ready and stop frames match. It changes no production code and no format. The stage-mark producer is not covered here, as stated in the body. |
Related: #204915, #205578, #204868 ## What Problem This Solves Existing launcher tests construct the trial, restore manifest and candidate IPC messages themselves. A candidate producer can drift while those consumer tests remain green, despite an installed launcher keeping its frozen interface. ## User Impact No runtime behavior changes. This adds one owner test file for compatibility with today's format4 launcher, v2 trial, v1 per-release restore manifest and compiled20-minute default. The current2-attempt and exit78 behavior remain unchanged and covered by their existing lifecycle tests. No production/stored/header/schema change or new production test seam. ## Why This Change Was Made Three small cases cover the missing boundaries without replaying the lifecycle suite: - Real `createTrialPending` bytes, minimal/full optional input, independent stored-key/v2 ABI guard, and literal `1_200_000` default. - Real candidate manifest publisher output independently checked against the deployed literal v1 root/pair ABI (entry order is not pinned; positive preimages must be absolute), then consumed by the frozen manifest reader on actual files. The literal check prevents coordinated writer/reader drift from moving the oracle; existing writer tests retain their SQLite inventory coverage. - One isolated child imports the real `announceReady`/stop listener and exchanges frames with a pinned format4 peer. A collector is installed at spawn, return must precede stop, stdin provides the serving keepalive without sleeps/polling, and child home/state/config paths are all private. The IPC case does not distinguish ACK processing from the supported on-disk fallback. Actual stage-mark producer coverage at `config-preflight-snapshot.ts:468` is separately recorded: exercising its full admission/recovery graph is outside this bounded harness; existing launcher stage-consumer tests remain unchanged. This PR does not claim that fourth producer frame is exercised. Production delta: **0**. One228-line owner file, below the400net test-line allowance; no allocation/waiver. ## Evidence - Base: `b1d355fcc9fcf91a4514c2612ce7b33211c710b6`. - **Mutation RED:** [AWS run_14f78c186994742f3077d3a597297ada](https://crabbox.openclaw.ai/portal/runs/run_14f78c186994742f3077d3a597297ada),2artifact cases passed and the IPC assertion failed with expected `openclaw.ready` / actual `openclaw.contract-mutant`. This was one temporary producer discriminant edit, restored exactly before GREEN and not included in this PR. - **Initial restored GREEN:** [AWS run_210b1aac2726928af6ebc89d25e4ef12](https://crabbox.openclaw.ai/portal/runs/run_210b1aac2726928af6ebc89d25e4ef12),3/3cases/types/lint/guard passed; one exact formatting wrap applied from AWS oxfmt. - **Review repair GREEN:** [AWS run_a4905843c4d73632f1ef06ac4d40e00a](https://crabbox.openclaw.ai/portal/runs/run_a4905843c4d73632f1ef06ac4d40e00a), independent manifest ABI pin added;3/3cases, owner-project types, lint, format and guard all exit0 (+228/400). No production changes or mutation repeat. - **Cost:** AWS cases42ms/17ms/4147ms = **4.206s test time**; file wall46.91s / shard49.93s includes35.777s shared compiled-generation preparation. [CI Bun owner job](https://github.com/openclaw/openclaw/actions/runs/45763730662/job/139720273166) passed3/3 at43ms/22ms/3862ms = **3.927s test time**, file10.26s / shard11.49s. Both meet the5s test-time target; no added readiness sleeps/polls or product boots. - Both owned AWS leases (`cbx_af0ca4a223fc`, repair `cbx_7a77e1c11a2c`) released with `--wait`, exit0; all receipts are under `direction-2026-11-24/updateowner-frozen-contract-*`. - Existing unchanged primary tests cover format4 protection (`launcher.test.ts:496`),2-start rollback (`:216`), stage handling (`:434`), stop forwarding (`:401`), and serving/trial exit78 (`:378/:385`); real CLI refusal78 is covered by `pre-bootstrap.process.test.ts`. - Exact-head local review on `298da439f4f024c83091c9e5148fb022753294d9` is complete: patch correct, security cleared, no findings, confidence0.88 (`~/.cache/clawsweeper-local-review/298da439f4f0.md`). No package build/native matrix is claimed or required for this test-only, production-identical change. CI pending. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit da256ce) Co-authored-by: RomneyDa <[email protected]> Co-authored-by: vincentkoc <[email protected]>
Related: openclaw#204915, openclaw#205578, openclaw#204868 ## What Problem This Solves Existing launcher tests construct the trial, restore manifest and candidate IPC messages themselves. A candidate producer can drift while those consumer tests remain green, despite an installed launcher keeping its frozen interface. ## User Impact No runtime behavior changes. This adds one owner test file for compatibility with today's format4 launcher, v2 trial, v1 per-release restore manifest and compiled20-minute default. The current2-attempt and exit78 behavior remain unchanged and covered by their existing lifecycle tests. No production/stored/header/schema change or new production test seam. ## Why This Change Was Made Three small cases cover the missing boundaries without replaying the lifecycle suite: - Real `createTrialPending` bytes, minimal/full optional input, independent stored-key/v2 ABI guard, and literal `1_200_000` default. - Real candidate manifest publisher output independently checked against the deployed literal v1 root/pair ABI (entry order is not pinned; positive preimages must be absolute), then consumed by the frozen manifest reader on actual files. The literal check prevents coordinated writer/reader drift from moving the oracle; existing writer tests retain their SQLite inventory coverage. - One isolated child imports the real `announceReady`/stop listener and exchanges frames with a pinned format4 peer. A collector is installed at spawn, return must precede stop, stdin provides the serving keepalive without sleeps/polling, and child home/state/config paths are all private. The IPC case does not distinguish ACK processing from the supported on-disk fallback. Actual stage-mark producer coverage at `config-preflight-snapshot.ts:468` is separately recorded: exercising its full admission/recovery graph is outside this bounded harness; existing launcher stage-consumer tests remain unchanged. This PR does not claim that fourth producer frame is exercised. Production delta: **0**. One228-line owner file, below the400net test-line allowance; no allocation/waiver. ## Evidence - Base: `7b7ab99c118fb9760d2f2f2078248e221c56217b`. - **Mutation RED:** [AWS run_14f78c186994742f3077d3a597297ada](https://crabbox.openclaw.ai/portal/runs/run_14f78c186994742f3077d3a597297ada),2artifact cases passed and the IPC assertion failed with expected `openclaw.ready` / actual `openclaw.contract-mutant`. This was one temporary producer discriminant edit, restored exactly before GREEN and not included in this PR. - **Initial restored GREEN:** [AWS run_210b1aac2726928af6ebc89d25e4ef12](https://crabbox.openclaw.ai/portal/runs/run_210b1aac2726928af6ebc89d25e4ef12),3/3cases/types/lint/guard passed; one exact formatting wrap applied from AWS oxfmt. - **Review repair GREEN:** [AWS run_a4905843c4d73632f1ef06ac4d40e00a](https://crabbox.openclaw.ai/portal/runs/run_a4905843c4d73632f1ef06ac4d40e00a), independent manifest ABI pin added;3/3cases, owner-project types, lint, format and guard all exit0 (+228/400). No production changes or mutation repeat. - **Cost:** AWS cases42ms/17ms/4147ms = **4.206s test time**; file wall46.91s / shard49.93s includes35.777s shared compiled-generation preparation. [CI Bun owner job](https://github.com/openclaw/openclaw/actions/runs/45763730662/job/139720273166) passed3/3 at43ms/22ms/3862ms = **3.927s test time**, file10.26s / shard11.49s. Both meet the5s test-time target; no added readiness sleeps/polls or product boots. - Both owned AWS leases (`cbx_af0ca4a223fc`, repair `cbx_7a77e1c11a2c`) released with `--wait`, exit0; all receipts are under `direction-2026-11-24/updateowner-frozen-contract-*`. - Existing unchanged primary tests cover format4 protection (`launcher.test.ts:496`),2-start rollback (`:216`), stage handling (`:434`), stop forwarding (`:401`), and serving/trial exit78 (`:378/:385`); real CLI refusal78 is covered by `pre-bootstrap.process.test.ts`. - Exact-head local review on `298da439f4f024c83091c9e5148fb022753294d9` is complete: patch correct, security cleared, no findings, confidence0.88 (`~/.cache/clawsweeper-local-review/298da439f4f0.md`). No package build/native matrix is claimed or required for this test-only, production-identical change. CI pending. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #204915, #205578, #204868
What Problem This Solves
Existing launcher tests construct the trial, restore manifest and candidate IPC messages themselves. A candidate producer can drift while those consumer tests remain green, despite an installed launcher keeping its frozen interface.
User Impact
No runtime behavior changes. This adds one owner test file for compatibility with today's format4 launcher, v2 trial, v1 per-release restore manifest and compiled20-minute default. The current2-attempt and exit78 behavior remain unchanged and covered by their existing lifecycle tests. No production/stored/header/schema change or new production test seam.
Why This Change Was Made
Three small cases cover the missing boundaries without replaying the lifecycle suite:
createTrialPendingbytes, minimal/full optional input, independent stored-key/v2 ABI guard, and literal1_200_000default.announceReady/stop listener and exchanges frames with a pinned format4 peer. A collector is installed at spawn, return must precede stop, stdin provides the serving keepalive without sleeps/polling, and child home/state/config paths are all private.The IPC case does not distinguish ACK processing from the supported on-disk fallback. Actual stage-mark producer coverage at
config-preflight-snapshot.ts:468is separately recorded: exercising its full admission/recovery graph is outside this bounded harness; existing launcher stage-consumer tests remain unchanged. This PR does not claim that fourth producer frame is exercised.Production delta: 0. One228-line owner file, below the400net test-line allowance; no allocation/waiver.
Evidence
b1d355fcc9fcf91a4514c2612ce7b33211c710b6.openclaw.ready/ actualopenclaw.contract-mutant. This was one temporary producer discriminant edit, restored exactly before GREEN and not included in this PR.cbx_af0ca4a223fc, repaircbx_7a77e1c11a2c) released with--wait, exit0; all receipts are underdirection-2026-11-24/updateowner-frozen-contract-*.launcher.test.ts:496),2-start rollback (:216), stage handling (:434), stop forwarding (:401), and serving/trial exit78 (:378/:385); real CLI refusal78 is covered bypre-bootstrap.process.test.ts.298da439f4f024c83091c9e5148fb022753294d9. Exact-head local review complete: patch correct, security cleared, no findings, confidence0.88 (~/.cache/clawsweeper-local-review/298da439f4f0.md). No package build/native matrix is claimed or required for this test-only, production-identical change.