Skip to content

/ship reviews fixes with full rounds instead of narrow re-checks (GST-3562) - #4737

Closed
garrytan wants to merge 6 commits into
mainfrom
ship-simplify-pr1
Closed

garrytan wants to merge 6 commits into
mainfrom
ship-simplify-pr1

Conversation

@garrytan

@garrytan garrytan commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

/ship no longer plans a narrow re-check after a fix: a fix after round 1 gets a full round 2, and a fix in round 2 gets one read-only full review of the final code, so fixed code never ships unread.
A new test also stops /ship from gaining refusals without a stated reason.
Part 1 of 3 of the /ship simplification Garry approved; nothing for readers to do, and approvals recorded before this change keep working for one release.

Agent notes
  • Review loop (lib/review-depth.ts). nextStep plans no new fix-check. A fixed blocker, a gate-class edit or a below-floor fix after round 1 gets a full pass on the fix range as round 2 (a light diff whose below-floor fixes touch no runtime lines still ships them as notes, and a lean round 2 adds the second-model review when numbers changed). A fix applied in round 2 gets one read-only full review of the whole PR diff with no fix round; a fix after that stops for the owner instead of offering a grant. A round that replaces a fix-check, and the read-only review, keep one full-effort reader: the Red Team reader is added when nothing else runs at full effort (a docs-only round 2 under review.panel off or risk otherwise had none). The per-PR cap (R51) works the same way across /ship runs. Round 2 still reads the fix range, not the whole head, as it does today.
  • Old fix-checks, one release. A grant no longer buys a fix-check at the round-2 stop. Fix-check rows recorded before this change still verify, and a grant still answers the stop that follows one of them. Part 3 removes both.
  • Round-cap message (lib/ship-release.ts). finish's behavior STOP now says the planner at the round cap plans one read-only full review of the final head, not a grant.
  • Refusal ratchet. test/ship-refusal-code-ratchet.test.ts lists the 131 refusal codes /ship's review, receipt, pregate and queue code raise today; a new one needs an "R56:" reason in test/fixtures/ship-refusal-codes.json, and a removed one must leave the list.
  • Docs. docs/review-policy.md's transitions table and docs/ship-policy.md's round-cap paragraph describe the new behavior. The skill prose follows in part 2.

Why it is safe.
The change was checked against main's transition table frozen at 0408128 (test/fixtures/review-depth-main/next-step-0408128.ts) over 3,932,160 review histories: 2,757,344 plan the same step with the same reason. Every other case either replaces a fix-check with a full pass (133,120), rewords a stop, voices or done reason (897,760), stops after a read-only review instead of running a fix-check (74,880), reviews a below-floor fix main shipped unread (46,976), or gives a fixed blocker at the cap a read-only full review instead of a stop (22,080). None drops a read of changed code, and none drops a reader: each replaced fix-check must keep a full-effort reader that excludes nothing the fix-check read, plus main's other readers. The grid tests read each changed case back as main's plan through test/helpers/gst3562-replay.ts and assert these kinds; the review-depth pin moves to replay GST-3562-A.

GSTA-820, GST-3562 letters A and Q. Letter M (green PR CI standing in for requires-remote clears) is set aside: the Windows and macOS remote lanes run on schedule or dispatch, not as PR checks, so green PR CI does not cover them (crew/test/ship-queue-train-ops.test.ts caught it). The plan's other part-1 items (receipt records made optional, the identical-tree rule for base merges) follow in a second code PR before the prose PR. Letter B (folding the targeted reader into the second-model reviewer) failed its pilot and is out. Rule-15 ruling: approval a-6ec01c09edf8. /ship receipt follows.

{"head":"6f0f1ba71e8fd92b8aa3d08b3046e1ce227ef74f","run":"ship1","status":"started","review_loop":{"passes":2,"blocking_found":5,"deferred":0,"noted":8,"fixed":9,"scope":"frozen","rounds":2,"dispatches":{"specialist":8,"red-team":2}}}
{"head":"6f0f1ba71e8fd92b8aa3d08b3046e1ce227ef74f","run":"ship1","mark":"abandoned","by":"GSTA-820 lane","reason":"round-cap stop (STOP_UNBOUND); Captain GSTA-36 ruled a fresh run for one read-only full review of 6f0f1ba"}
{"head":"6f0f1ba71e8fd92b8aa3d08b3046e1ce227ef74f","run":"ship2","mark":"stop","tree":"17416afa3fef58cfbb96f48e9d424930d7486166","at":"2026-11-23T09:58:11.203Z"}
{"head":"9e74618635a86b30a0ccda202e07f881a6cd9140","run":"ship2","mark":"abandoned","by":"GSTA-820 lane","reason":"parked at 6f0f1ba by Captain GSTA-36 ruling A; fix on 9e74618 gets a fresh run's read-only full review"}
{"head":"9e74618635a86b30a0ccda202e07f881a6cd9140","run":"ship3","mark":"stop","tree":"f1af3e15abcc854ae26c8cddb2ff8312d38c3f05","at":"2026-11-23T11:22:57.523Z"}

garrytan and others added 2 commits November 23, 2026 05:38
…CI covers remote test lanes (GST-3562)

A fix after round 1 now gets a full round 2 on the fix range, and a fix in round 2 gets one read-only full review of the final head, so fixed code never ships unread. Grants recorded before this change still buy their one fix-check for one release.

gstack-ship-queue ready accepts a pregate record that passed every local check and waits only on remote lanes when CI is green at the PR head; land already refuses any red or pending check.

A new test fails when /ship gains a refusal code without a stated reason.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 23, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

… rounds, and keep remote test clears as they are

Green pull-request CI does not cover the Windows and macOS remote test runs, which run on a schedule or by dispatch, so the ready check keeps requiring their clears.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot changed the title /ship reviews fixes with full rounds instead of narrow re-checks, and green CI stands in for remote test runs (GST-3562) /ship reviews fixes with full rounds instead of narrow re-checks (GST-3562) Nov 23, 2026
garrytan and others added 3 commits November 23, 2026 08:04
The read-only review at the round cap reads the whole PR diff, a grant no longer swaps it for a narrow re-check, the one-reader round 2 keeps the second-model check of changed published numbers, a light below-floor fix that changes runtime lines is read again, and the refusal ratchet also counts refused('X')-style codes with a baseline that may only shrink.

Review-Finding: p1/outside-voice#1 reader=outside-voice
Review-Finding: p1/outside-voice#2 reader=outside-voice
Review-Finding: p1/outside-voice#3 reader=outside-voice
Review-Finding: p1/outside-voice#4 reader=outside-voice
Review-Finding: p1/outside-voice#5 reader=outside-voice
Review-Finding: p1/adversarial-native#1 reader=adversarial-native
Review-Finding: p1/adversarial-native#2 reader=adversarial-native
Review-Finding: lib/review-depth.ts:468:docs-accuracy reader=core
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The round-grant planner test now expects the read-only full review after a round-2 full pass and the fix-check only at the stop after a round-2 fix-check.

Review-Finding: test/round-cap-ruling-path.test.ts:123:functional-contract reader=qa
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A docs-only round 2 under review.panel off or risk dispatched no reader where main ran one full-effort fix-check. A round that replaces a fix-check, or the read-only final review, now adds the Red Team reader at full effort when it would otherwise have none. The no-loss replay checks each replaced fix-check keeps main's readers, and the lean table runs through it. Three stale rows in docs/review-policy.md are corrected.

Review-Finding: lib/review-depth.ts:767:outside-voice reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai

capy-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Closing this PR without merging. It's being split: the refusal-code test ships alone in #4740, and the change to full review rounds will be rebuilt as its own PR.

What happened: the step table passed its no-loss replay over 3,932,160 review histories, but three later read-only reviews found three cases where a replacement round dispatched no full-effort reviewer, where main had run one:

  1. a docs-only round 2 under review.panel off or risk;
  2. the same round under a round grant, because the rule was keyed on the end of the reason text and the grant appends a suffix to it;
  3. the bot-review skip, which could cancel the repeat round altogether.

The replay compared steps, not the readers each step dispatches, and its grids never varied those inputs. The rebuild will carry "keep a reader" as a structured field on the planned step, limit the bot-review skip to the first review, and widen the replay grids over panel mode, prior rounds, round grants and the bot-review shape before the PR opens.

Write-up: research/findings/gstack-2026-11-23-full-rounds-first-attempt.md in the GStack GBrain org drive, with a line in research/registry.md.

@capy-ai capy-ai Bot closed this Nov 23, 2026
capy-ai Bot added a commit that referenced this pull request Nov 23, 2026
…-3562) (#4741)

/ship no longer plans a narrow re-check after a fix: a fix after round 1
gets a full round 2, and a fix in round 2 gets one read-only full review
of the whole PR, so fixed code never ships unread.

Why: the narrow re-check read only the fixed lines, and each round now
keeps at least one full-effort reviewer, the one the re-check was.

Part 1 of the /ship simplification Garry approved, rebuilt after #4737;
nothing for readers to do.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Review-Finding: p1/outside-voice#1 reader=outside-voice
Review-Finding: p1/outside-voice#2 reader=outside-voice
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/targeted#1 reader=targeted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant