Repository navigation
/ship keeps its review count and grant claims honest, and a symlinked harness pin needs a fresh review (GST-3463) - #4703
Merged
Conversation
…ular file and both pinned files resolve Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ers, when the run record could not save it Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…the PR's earlier runs, so later runs count review rounds correctly Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…audit flag, and the docs describe it Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…es the bin directory it runs Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…says to rerun with the same run id Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#3 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… harness pin do Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This was referenced Nov 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/ship now keeps a PR's earlier runs when it rewrites the PR description, so later runs count review rounds correctly, and it refuses to start reviewers when it could not save a granted round's claim.
Why: both slips let a PR get more review rounds than the two-round limit allows, without anyone seeing it.
Nothing to do: the fixes apply on the next /ship run.
What changed
The problem: a PR could go past its two review rounds without anyone noticing. When Step 19 wrote a fresh description, the published body kept only the newest run, so the next run counted fewer rounds than the PR had. When the run record could not save a granted round's claim,
gstack-ship-receipt claimstill printedGRANT_CLAIMED, so a run could stop and grant itself the same round twice.gstack-ship-receipt write --pr, given a description file with no record or run history, reads the live PR description's earlier record and runs into it. If the live description can't be read, write says so with aRECEIPT_RUNS:line and keeps only this run.claimexits non-zero and says not to start reviewers when the run record exists but could not save the claim, and says to rerun with the same run id, because a new id would find the round already spent.--carry-stoppedand its Prepare snapshot when it stopped first. The review and ship policy docs describe the claim failure and the pin rule.Why
"Make the pin mode check the first commit of PR 2", then items 1 and 4 of GST-3463: a claim that fails open and a description rewrite that undercounts rounds. Both are gaps in the check that limits each PR to two review rounds.
Blast radius
The changes touch
gstack-ship-receipt claimandwrite, the harness-pin rule inlib/ship-receipt-patch.ts, and the /ship docs audit steps. Each change only adds a refusal or reads more history. The new live read runs only when the description file has no record and no runs, and a failed read warns and writes what it wrote before. Each new test fails on main, and CI's free suite passed at 49be1d4.Test Coverage
The coverage audit read 10 changed paths. 7 have tests rated two or three stars and 3 have none (audit only, no tests generated):
claimwhen no run record exists (it still claims and prints aRUN_RECORD:note).writewhen the body already holds a record or runs, a live body with runs but no record, and--repopassed through to the read.Tests: 1883 → 1883 test files (the three new test files were written before /ship). Coverage: 70% (7 of 10 paths).
Tests ran: tests reused from CI, run 45027568836 (1764 files, 39095 tests).
Pre-Landing Review
Round 1 (full panel) found three notes and fixed two: the claim error now says to rerun with the same run id, and the docs audit wording no longer says
--carry-stoppedreplaces--carry. The third, makingwritefail when the live description can't be read, was skipped: it is no regression, and failing would stop every write made without GitHub access. Round 2 (full, on the fix range) and the second-model review (GPT-6.2 Sol) found only notes. A scoped reader read the docs audit's two policy edits clean.Review notes
Below the blocking floor; recorded here and not fixed in this PR.
ship/sections/documentation.md.tmpl:106: the prose says--carryfor each earlier audit and--carry-stoppedfor each stopped one, but the snapshot takes each flag once. The two-attempt limit means a re-audit has one earlier audit, and a repeat flag fails loudly.--carryand--carry-stoppedtogether in one snapshot.bin/gstack-ship-receipt:1072: on Capy, where the description is handed to the host to publish, "the PR body already holds the claim" may not be true yet. Rerunning with the same run id is still right.Exploratory QA
Smoke: the three new test files ran on the reviewed tree (10 pass, 0 fail). No plan checks; this is a bug fix with no plan.
Eval Results
No paid evals ran here. The PR screen selects 25 end-to-end cases (mostly /ship's own docs-audit cases) and no judges; they are not verified on this PR and run in main's paid gate after merge.
Scope Drift
Scope Check: CLEAN. Intent: GST-3463 items 1 and 4, the pin mode check and the docs lines deferred from #4693. Delivered: those, plus two test fixes CI found (a
ghstub and a bin path).TODOS
No TODO items completed in this PR.
Documentation
Status: updated. Two factual doc edits, no blockers.
Scope: the committed diff from 25bf93c to 49be1d4 on ship-claim-and-rerun-history, plus the unstaged changelog fragment. It covers the harness-pin rule (when a re-recorded pin counts as reviewed), the claim failure when the run record can't save it, write --pr keeping earlier runs, and the
--carry-stoppedwording in the docs audit steps.Documentation health:
--carry-stoppednote is already there).Coverage debt: no troubleshooting entry for the claim failure when the run record can't save it. The RECEIPT_RUNS: warning from
gstack-ship-receipt write --pr(printed when the PR's earlier runs can't be read) is undocumented. No diagram drift.Tests
bun test test/ship-receipt-claim-fail-closed.test.ts test/ship-receipt-write-keeps-earlier-runs.test.ts test/ship-receipt-carry-harness-repin.test.ts: 10 passbun test test/gstack-ship-receipt.test.ts test/test-of-test-ratchet.test.ts: passbun test test/gstack-docs-candidate.test.ts test/parity-suite.test.ts test/size-ledger.test.ts: passbun run typecheck: cleanAgent notes
PR 2 of GST-3463 (items 1 and 4), plus the symlink-pin mode check ruled for this PR on #4669 (approvals a-1e8089baf227, a-aeeeea7dccf3) and the flag-wording and doc lines deferred from #4693's docs audit. The Documentation section is the docs audit's saved section with two wording changes for the plain-body check ("harness-pin carry rule/row" reworded, two flags put in code spans). The two policy edits that audit made were read clean by one scoped reader (finish's SCOPED_REVIEW line, not a round). Trial merge with #4705 (shares docs/troubleshooting.md): clean, typecheck clean, focused tests 30 pass. GEVA-559's round count (gstack-evals#406) was a different bug, a run id reused across heads, already fixed on main by #4654 (e8e7554) and tested in test/pr-review-history.test.ts.
Approvals
No approvals recorded for branch ship-claim-and-rerun-history.
Plan: exempt: bug fix with a failing test written first for each item (GST-3463)
Gate edits: none detected (9 listed, 5 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
🤖 Generated with Claude Code