Repository navigation
fix(ship-receipt): derive carry.covers from the recorded review depth - #2
vorflux[bot] wants to merge 6 commits into
Conversation
A carried receipt claimed the fixed list 'pre-landing review, adversarial review, gate integrity, documentation audit' whatever depth the review ran. A light review with no runtime lines runs no adversarial pass, so its carry over-claimed. carryCovers derives the list from review_depth; a receipt without a depth names no depth and claims no adversarial review.
A carry rebinds review_depth to its new head, so a later hop derived covers from a depth the review never had (an e2e file adds runtime lines). Keep the prior covers; read an inherited fixed list or a missing list as no depth recorded. Word RecordedDepth as the depth the head needed at write.
|
Drift check, 2026-11-02 (upstream
No open upstream PR changes Next step: this PR needs a rebase onto current upstream before review. The rebase has 3 mechanical conflicts. I did not change or push this PR branch. |
|
Corrected copy of #2 (comment) with full upstream PR links. This comment replaces that one. Drift check, 2026-11-02 (upstream
No open upstream PR changes Next step: this PR needs a rebase onto current upstream before review. The rebase has 3 mechanical conflicts. I did not change or push this PR branch. |
A carried receipt claims only the checks its review depth requires
When
/shipcarries a review receipt to a new head, the receipt records acarry.coverslist. Before this PR that list was fixed. A light docs-only review that skipped the adversarial pass still claimed "adversarial review" after a carry. This PR derives the list from the receipt's recordedreview_depth, and keeps the first carry's list on later carries.Why — the carry over-claims for light reviews
lib/ship-receipt.tssetcoversto the constantCARRY_COVERS = ['pre-landing review', 'adversarial review', 'gate integrity', 'documentation audit']for every carry (planCarryandplanTreeCarry). The review depth table (docs/review-policy.md#review-depth) says a light review with 0 runtime lines runs "the core checklist only": no specialists, no Red Team, no adversarial pass. The carry record therefore claimed a check that did not run. This is the TODOS.md P1 item "Derivecarry.coversfrom depth".Problem evidence 1 (single carry). The new test, run on the unchanged code (base
ce3a093a), fails on a docs-only light receipt carried over a test-only commit:Problem evidence 2 (chained carry, found in review round 1). A carry rebinds
review_depthto the new head. With only the first fix, a second carry rebuiltcoversfrom the rebound depth and claimed the adversarial review again. The chained-carry test fails without the second fix:Upstream check. garrytan/gstack main (
5532345a) still has the fixedCARRY_COVERS. Of its 49 open PRs, only garrytan#3611 toucheslib/ship-receipt.ts. That PR makes an unrelatedbase_redchange and is a possible merge-conflict neighbor only.What — covers follows the recorded depth
covers)covers)covers, unchangedreview_depthis the depth the head needed at write, which the review is expected to have met. It is not a record of what ran. A fail-closedfull(dirty checkout, scan unavailable) can still name more than a light review ran. The code comments and docs/ship-policy.md now say this instead of calling the depth a lower bound.--dry-run --jsonnow reports the same mergedcoversthat the real carry writes.coversfield changes. No refusal, no exit code and no depth check changes.How
bin/gstack-ship-receiptpasses the receipt'sreview_depthtoplanCarryandplanTreeCarry(new optionaldepthinput). The retarget path usesplanCarry.carryCovers(depth)inlib/ship-receipt.tsbuilds the list from the table above.carryReceiptkeeps the prior carry'scoverswhen one exists. It reads a missing list, or the old fixed list, as no depth recorded.covers.Commits:
72249eec(derive covers),f4dab966(docs, TODO removed),f9248bd1(second carry keeps covers),3daf353a(docs),4fb98d65(dry-run reports merged covers),7e0d48f3(docs: legacy mapping).Testing
Focused checks on
7e0d48f3:bun test test/ship-receipt-depth.test.ts test/gstack-ship-receipt.test.ts test/ship-receipt-carry-rewrite.test.ts test/gstack-ship-receipt-docs.test.ts test/ship-receipt-carry-squash.test.ts test/ship-receipt-carry-pregate.test.ts test/module-size-ratchet.test.ts→ 60 pass, 0 fail, 634 expect() calls.bun run typecheck→ 0 errors.bun run typecheck:test→ "814 known diagnostics, none new."Full free suite (
bun run test) on frozen7e0d48f3: EXIT=1, not green.browse/test/(real Chromium), plustest/design-lint-render,make-pdf/test/e2e/format-gate,design/test/feedback-roundtrip,test/setup-gbrain-remote-caller,test/qa-only-cleanup,test/test-free-shards-settlement-lifecycle,test/setup-runtime-lib-command,test/pr-shots,test/cso-snapshot-state,test/claude-provider-keychain.No usable sandbox!("Chromium sandboxing failed!"). Other failures are timeouts in the same browser/SDK fixtures.test/remote-identity-vectors.test.ts) comes frombin/gstack-global-discover, a gitignored compiled ELF binary left in this checkout. Bun tried to parse it as a script.ship-receiptorship-policy.Blame check (same checkout, same 36 files,
bun test <files>):ce3a093a7e0d48f3The set of failing test names is identical on base and branch (
commshows no difference). The extra error on the branch is a late assertion fromtest/setup-gbrain-remote-caller.test.ts"late first completion …", which timed out on both revisions. These failures occur on base too, so this PR does not cause them. They were not repaired here, and no check was skipped or weakened.Review
A separate Opus review ran twice.
fullcan over-claim; (3) no chained-carry test. Resolved: the first carry's covers are kept (f9248bd1), the comments and docs are reworded, and a chained-carry test is added.--dry-run --jsonstill reported per-hop covers; (2) the docs did not explain the legacy fixed-list mapping. Resolved: the dry-run prints merged covers (tested), and docs/ship-policy.md explains the mapping (7e0d48f3). One optional nit is open: there is no chained tree-carry E2E test. The reviewer judged this a small risk, because every carry path ends incarryReceipt.Risks
lib/ship-receipt.tsand the tests readscarry.covers. READY and train gating usebindShippedReceiptandreceiptDepthVerdictinlib/ship-receipt-depth.ts, which this PR does not touch. Both review rounds confirmed this. It is flagged for a human because the field sits beside a safety check.review_depth, or a receipt whose first carry recorded the old fixed list, records "pre-landing review (depth not recorded)" and no adversarial review on its next carry. A human or tool that string-matched the old list sees different text. No in-repo consumer was found.review_depthcan still over-claim when the depth failed closed tofull. This PR documents that; it does not fix it.lib/ship-receipt.ts.Decisions for a human (#ab-gale)
coverstext changes to "depth not recorded" on their next carry.covers.Session Details
(aside)to your comment to have me ignore it.