Skip to content

test: pin the frozen candidate-launcher contract - #205771

Merged
obviyus merged 2 commits into
mainfrom
test-frozen-launcher-contract
Nov 26, 2026
Merged

obviyus merged 2 commits into
mainfrom
test-frozen-launcher-contract

Conversation

@obviyus

@obviyus obviyus commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

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,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,3/3cases/types/lint/guard passed; one exact formatting wrap applied from AWS oxfmt.
  • Review repair GREEN: AWS 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 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.
  • CI GREEN on 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.

- 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.
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 46e283ab799b82562a31571f4f3c15c70b1c266c, but the PR head is now 298da439f4f024c83091c9e5148fb022753294d9. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-26T05:34:21.126Z sha 46e283a :: needs maintainer review before merge. :: none

- 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.
@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 26, 2026
@obviyus
obviyus merged commit da256ce into main Nov 26, 2026
127 of 128 checks passed
@obviyus
obviyus deleted the test-frozen-launcher-contract branch November 26, 2026 06:24
@obviyus

obviyus commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

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.

tideclaw-bot pushed a commit that referenced this pull request Nov 26, 2026
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]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant