Skip to content

Commit e44f2bc

Browse files
committed
test(reconcile): refresh head race proof
1 parent 10b4576 commit e44f2bc

5 files changed

Lines changed: 279 additions & 253 deletions

File tree

‎docs/proof/head-mismatch-supersede/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ The authenticated lifecycle audit inventory is useful corroboration—it exposes
88

99
The bounded stage checks at most ten head-mismatched targets per cycle and resolves at most 20 supported rows per proven target. After reading canonical evidence, it immediately rechecks GitHub and requires the same open node identity and head before mutation. Drift leaves the row open as `head_mismatch_revalidation_changed`. A successful path writes a note with the full newer head and canonical path, sends the Worker a guarded `resolution_outcome: superseded`, and increments publication completed/superseded metrics. Missing, invalid, incomplete, wrong-target, failed, or wrong-head records leave rows open as `head_mismatch_unproven`. `tuple_protocol_invalid` and `workflow_cancelled` rows never enter this resolution path. Dry-run reports the planned counts but performs no mutation.
1010

11-
The executable contract is in [`behavior-contract.md`](behavior-contract.md), RED/GREEN evidence is in [`red-green.md`](red-green.md), and [`run-proof.sh`](run-proof.sh) is the Docker-backed Crabbox launcher. [`behavior-report.json`](behavior-report.json) records the source-blind contract result. [`receipt.json`](receipt.json) binds committed implementation head `2cd3ab893cf7dd1c93d6db85e5673a4db26999f3`, `provider=local-container`, lease `cbx_fedc8cf78814` (`crimson-crab-fdb7`), Docker image `node:24-bookworm`, all 223 focused scenarios passing, the full `pnpm run check` gate, clean pre-commit Codex autoreview, content hashes, captured transcripts, a zero-finding secret scan, and automatic lease cleanup.
11+
The executable contract is in [`behavior-contract.md`](behavior-contract.md), RED/GREEN evidence is in [`red-green.md`](red-green.md), and [`run-proof.sh`](run-proof.sh) is the Docker-backed Crabbox launcher. [`behavior-report.json`](behavior-report.json) records the source-blind contract result. [`receipt.json`](receipt.json) binds committed implementation head `10b45760a0c0fe1adf156909e2df0d737d5fef6a`, `provider=local-container`, lease `cbx_a7a8d9e75f26` (`brisk-shrimp-3201`), Docker image `node:24-bookworm`, all 224 focused scenarios passing (including the mutation-time B→C race), the full `pnpm run check` gate, clean pre-commit Codex autoreview, content hashes, captured transcripts, a zero-finding secret scan, and automatic lease cleanup.
1212

1313
OpenClaw Bay needs no change because the behavior is queue-owned and observer-only: existing metrics and skip maps reflect it, while Bay gains no action surface.

‎docs/proof/head-mismatch-supersede/behavior-report.json‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@
3131
],
3232
"confidence": 0.99
3333
},
34+
{
35+
"contract_clause": "Mutation-time head revalidation",
36+
"status": "pass",
37+
"severity": null,
38+
"evidence": "The race fixture served canonical evidence for head B and advanced GitHub to head C before resolution. The operator performed the second issue/pull read, emitted head_mismatch_revalidation_changed, and called neither resolution nor recovery.",
39+
"reproduction_steps": [
40+
"Serve stale dead-letter head A and initial live head B",
41+
"Serve a digest-valid complete canonical record for head B",
42+
"Return head C on the immediate pre-mutation GitHub recheck",
43+
"Verify the row remains open with zero mutation"
44+
],
45+
"confidence": 0.99
46+
},
3447
{
3548
"contract_clause": "Target and row caps",
3649
"status": "pass",
@@ -73,6 +86,10 @@
7386
"probe": "Changed canonical head away from the live GitHub head",
7487
"result": "Resolution stopped and the target was classified head_mismatch_unproven"
7588
},
89+
{
90+
"probe": "Advanced GitHub from proven head B to head C after canonical evidence",
91+
"result": "The second live read detected drift and the operator performed zero mutation"
92+
},
7693
{
7794
"probe": "Removed the canonical record",
7895
"result": "Resolution stopped with zero mutation"

0 commit comments

Comments
 (0)