Repository navigation
v1.92.16.0 fix: /ship stops re-running the review loop after base merges, test fixes and audit-requested doc fixes - #3684
Merged
Conversation
…ested fixes no longer force a second review loop (GST-407, GST-384, GST-391) 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>
…-triggers Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # ship/DRIVER.md # ship/DRIVER.md.tmpl
…ds; trim elsewhere 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>
comparePath returns same only when every hunk sits where the base change puts it (patch-ids ignore positions) and treats a file-mode change as changed; the scoped-review packet says when a fence is truncated; --docs-result must be the posted audit's result; the --context-reviewed record goes beside the packet, outside the worktree. Negative controls for each. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A test edit routes as tests= only when it adds lines with no gate tag; a removed or changed line or an unreadable test diff goes through the full loop. Diffs skip textconv. A hunkless patch (binary, empty, mode-only) is same when its patch-id matches. Without --reviewed-base test files route as before. finish's packet path and attempt's state directory have fallbacks. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ew is release metadata (GBRA-251) gateEditedPaths reads removed lines only inside hunks; carry refuses when a path listing fails; docs freshness stops on a failed listing; attempt counts an unreadable state file. releasePaths includes stamp_files paths whose edit is a version swap under stamp_patterns. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…t state A test-only edit with no gate tag gets the scoped fix-check of its test hunks instead of a lanes-only rerun. Packet write failures print a STOP or RECEIPT_CARRY_REFUSED. attempt's allowance uses an exclusive create. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…t diff outside context paths The attempt STOP no longer echoes the audit child's fix text. A scoped-review carry now requires the product patch-id without the context paths to match at both heads. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ch; name-only test globs only in test dirs A scoped-review packet section over 200 lines sends that path to the full loop instead of a truncated packet. The docs-result path match is exact. test_*.py, *Test.java and similar count as test code only under a test directory. 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>
…roubleshooting (docs-a-1) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…like ship-release (run 41193336209) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…-triggers Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # bin/gstack-ship-receipt
4 tasks done
…-triggers Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # bin/gstack-ship-receipt
The merge commit b10e2db wrote a truncated copy of the file. This is the three-way merge of both sides with the refused() union: main's codes plus RECEIPT_CARRY_SCOPED_REVIEW. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This was referenced Oct 31, 2026
v1.92.82.0 fix(ship): verify re-derives each merged finding from the reader's output (GST-541)
#3717
Merged
garrytan
added a commit
that referenced
this pull request
Nov 1, 2026
…pass Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
added a commit
that referenced
this pull request
Nov 1, 2026
…OG.md on main Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
5 tasks done
garrytan
added a commit
that referenced
this pull request
Nov 1, 2026
… train 76) bin/gstack-review-dispatch: main's GST-716 mergeBaseWith (origin/<base> first) replaces PR 3's identical forkPoint helper. ship/DRIVER.md(.tmpl): main's wording in the three conflicted hunks (#3684's --reviewed-base among them); PR 3's own fix-check line trimmed so the render stays at 12,288 B. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
4 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Nov 1, 2026
…exception (GST-713) (#3776) * fix(ship): base merges, adjacent base edits, test-only and audit-requested fixes no longer force a second review loop (GST-407, GST-384, GST-391) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ship driver: trim two phrases for headroom with #3662 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ship driver: keep the Next steps heading phrase the handoff check reads; trim elsewhere Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: regenerate ship goldens Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes comparePath returns same only when every hunk sits where the base change puts it (patch-ids ignore positions) and treats a file-mode change as changed; the scoped-review packet says when a fence is truncated; --docs-result must be the posted audit's result; the --context-reviewed record goes beside the packet, outside the worktree. Negative controls for each. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pass-2 review fixes A test edit routes as tests= only when it adds lines with no gate tag; a removed or changed line or an unreadable test diff goes through the full loop. Diffs skip textconv. A hunkless patch (binary, empty, mode-only) is same when its patch-id matches. Without --reviewed-base test files route as before. finish's packet path and attempt's state directory have fallbacks. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: Step 11 review fixes; a version-only stamp_files edit after review is release metadata (GBRA-251) gateEditedPaths reads removed lines only inside hunks; carry refuses when a path listing fails; docs freshness stops on a failed listing; attempt counts an unreadable state file. releasePaths includes stamp_files paths whose edit is a version swap under stamp_patterns. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: no test edit skips review; guard packet writes; exclusive attempt state A test-only edit with no gate tag gets the scoped fix-check of its test hunks instead of a lanes-only rerun. Packet write failures print a STOP or RECEIPT_CARRY_REFUSED. attempt's allowance uses an exclusive create. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: attempt prints gstack's install command; carry checks the product diff outside context paths The attempt STOP no longer echoes the audit child's fix text. A scoped-review carry now requires the product patch-id without the context paths to match at both heads. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: oversized packets take the full loop; exact --docs-requested match; name-only test globs only in test dirs A scoped-review packet section over 200 lines sends that path to the full loop instead of a truncated packet. The docs-result path match is exact. test_*.py, *Test.java and similar count as test code only under a test directory. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(unattended): carry's scoped-review refusal and what it keeps Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: carry's scoped-review route in ship-policy, review-policy and troubleshooting (docs-a-1) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(windows): curate ship-rereview-triggers out of the Windows lane like ship-release (run 41193336209) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: restore bin/gstack-ship-receipt after the main merge The merge commit b10e2db wrote a truncated copy of the file. This is the three-way merge of both sides with the refused() union: main's codes plus RECEIPT_CARRY_SCOPED_REVIEW. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship): finish runs after an owner-accepted Step 14.5 documentation exception (GST-713) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test(ship): the exception match and every snapshot --exception refusal are covered (GST-713) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship): the exception snapshot uses the receipt's docs parser; finish also matches scope and stops on a corrupt docs-audit record (GST-713) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: DOCS_AUDIT_BLOCKED names the --exception snapshot finish needs (GST-713) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * chore(changelog): drop #3684's fragment, already stamped into CHANGELOG.md on main 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 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.
What changed
A base merge after review no longer sends /ship back through the full review loop when the branch's own patch did not change. Captured from
gstack-ship-release finishin the test fixture: main merged in after review, and main also edited the files the branch touched.Before/after as text: A base merge after review no longer sends /ship back through the full review loop when the branch's own patch did not change.
Why
GST-407: "every base merge after review re-ran the whole loop" (
ROUTE: … behavior=86on gbrain #7739). GST-384 is the same for main rewording a line next to a reviewed hunk (#3631, founderstar#441), and GST-391 for a test-only fix or the one-line link the docs audit itself asked for (gbrain #8084, #8087). Each one cost another ~$19 loop or an owner's documentation exception. /ship now compares the branch's own patch per path. Paths only main moved, add-only test edits and audit-requested doc fixes no longer reopen the loop, but a real product change still does.Blast radius
The change touches
finish's route and docs-freshness check (lib/ship-release.ts),gstack-ship-receipt carry,gstack-docs-candidate, and the ship templates (DRIVER/SKILL plus the four goldens). Every new route fails closed. A path whose patch cannot be compared, a removed or changed test line, a binary or unreadable test diff, an oversized packet section, a missing--reviewed-baseor a failed git listing all fall back to the old full loop. Without--reviewed-base, the route is the old one and printsbase=unknown. This is at the script-ran rung:test/ship-rereview-triggers.test.tsfailed 8/8 on the code before the fix (red-pr-a.log) and passes 11/11 now, including the negative controls (a product edit, a changed conflict resolution, a moved hunk, a skipped test). The remote pregate passed at tree e7e8b633, after the main merge: 24330 tests, 0 failed. This PR's ownfinishrouted that merge asROUTE: behavior=2 … base=90 context=1: two paths for the DRIVER trim and one for the spliced import. The installed 1.91.354.0finishrouted the same merge asbehavior=79.Approvals
Source: gstack-approvals record for gst-407-ship-rereview-triggers (display only; not an approval citation).
Summary
/ship read three kinds of post-review change as product changes and paid for another review loop each time: a base merge, a test fix, and the docs audit's own requested fix. Now
finish --reviewed-base <sha>compares the branch's own patch per path. Paths only the base moved count asbase=. An add-only test edit with no gate tag counts astests=and gets one scoped fix-check of its test hunks, so no test edit skips review. When the base edited context right next to an unchanged reviewed hunk, the path counts ascontext=and gets the same scoped fix-check, in finish and in receipt carry. A version-only edit to astamp_filespath is release metadata (GBRA-251, gbrain #8095). Docs freshness ignores test code and base-only paths, and--docs-requestedcarries a small fix the audit result named exactly.gstack-docs-candidate attemptstops counting audit launches the install check refused.Review hardened every route to fail closed:
--no-textconv, patch-id equality for hunkless patches, exclusive attempt state, guarded packet writes, a 200-line packet section cap, and exact path tokens. The new test file is curated out of the Windows lane for the same reason astest/ship-release.test.ts: it launches shebang bins, which windows-latest cannot run (run 41193336209).Test Coverage
All new code paths have test coverage. Every trigger and every negative control is a case in
test/ship-rereview-triggers.test.ts, and each review fix added a case that failed before the fix (logs p2–p6-red.log, stamp-red.log).Regression proof: the 8 original cases failed on the code before the fix and pass after it. Each later fix's case failed before that fix.
Tests ran: ship 367
Tests ran: typecheck count unavailable
Pre-Landing Review
Two full passes (specialist-batched, red-team, native adversarial and the outside voice on pass 2) found 9 findings at the blocking floor, and all 9 were fixed with failing-first tests. After that, seven fix-checks each re-read the fixes and their callers. Cycles 4–6 ran under the Captain's rule 23 grants, and each cycle ended with a Step 11 adversarial pass on the full diff. The last Step 11 pass at b6a2d22 found six items. Under the Captain's exception, items that only fail closed are listed under Review notes and don't block. The fix-check at a1ea723 covered the docs-audit edits and the Windows curation entry and found one informational wording gap. Main 807aaa8 was merged in at 4cc747c under the Captain's rule 19 grant. That fix-check covered the import resolution in
bin/gstack-ship-receiptand a 9-byteship/DRIVER.md.tmpltrim that keeps DRIVER.md under its 12 KB cap (12284 B), and found nothing.REVIEW_LOOP: passes=2 blocking_found=9 deferred=0 noted=21 fixed=14 scope=frozen fix_checks=8 dispatches=4
Base merge (rule 19 grant, GStack Minder, 2026-10-31). origin/main 1b46f37 (#3611) is merged in. The one conflict was the refused() code union in
bin/gstack-ship-receipt; the union is exactly main's set plusRECEIPT_CARRY_SCOPED_REVIEW. The first merge commit (b10e2db) carried a mangled copy of that file and b6a5bd1 restored the clean three-way merge. Because the union line is a product change, carry refused (RECEIPT_CARRY_PRODUCT_CHANGED); under the Captain's grant one fix-check read 4cc747c..b6a5bd1 and found nothing at the floor (one INFORMATIONAL note: a TS2345 at line 365 that is identical on main and unreachable at runtime).Gate edits: the change edits /ship's own review routing, so every reviewer read it as gate code. No test was weakened or skipped, and the one test-curation edit (
scripts/lib/windows-curation.ts) removes only the new file from the Windows lane. It still runs on Linux, macOS and the remote pregate.Outside review: ran on pass 2 (cross-family). It found three CRITICAL items, and all three were fixed in 37cfb48.
Review notes
These are below the blocking floor, or only fail closed (stricter or slower, never less review). They are recorded here and not fixed in this PR, under the Captain's exception.
readScopedReviewchecks the verdict, reviewer, paths and head, but not the packet's hash. Follow-up: GST-443 (bind records with packet_sha256).docs/unattended.mddidn't describe the scoped-review carry. Fixed in 6e928ef.lib/ship-patch.tscomparePath: a failed base-side diff reads as empty. Differing patch-ids still route tocontext, so this fails closed.lib/ship-patch.tssameSpot/mapper walk line by line. This is perf only.carry --dry-runwrites the packet under.git/gstack/. This is an inert side effect. Follow-up: GST-442.docs/ship-policy.md:1126: the scoped-carry clause is broader than the code. Carry still refuses oversized packets and retargeted stacks as PRODUCT_CHANGED, which fails closed.lib/ship-patch.ts:159: the removed-line check also counts lines the base removed, so such a file takes the full loop.lib/ship-patch.ts:139: the section cap counts whole hunks, so a ~198-line branch-added test file plus one line takes the full loop.lib/ship-patch.ts:161: some real test directories (androidTest, SwiftPM Tests/, colocated *_test.py) route to behavior.lib/ship-patch.ts:133: a tests-only packet opens with the base-context header.lib/ship-release.ts:240: a blocker that citespath:lineno longer matches--docs-requested path, so finish stops.lib/ship-release.ts:191: the packet fallback path under a linked worktree can throw instead of printing a STOP. This needsrev-parse --git-pathto fail first.lib/ship-bin-common.ts:119: stampedFiles runs without--inter-hunk-context=0, so a user setting can join hunks and the path stops.lib/ship-receipt.ts:247: carry passes a test-only change after a base merge as 'test-only change'. /ship Step 16 reruns the lanes there.bin/gstack-ship-receipt:610: a failed rest patch-id reports PRODUCT_CHANGED with misleading text. It still refuses.bin/gstack-ship-receipt:613: the carry refusal text doesn't say where to writerecord.json.lib/ship-release.ts:199: finish's scoped review leaves no mark in the receipt. Follow-up: GST-443/GST-444.bin/gstack-docs-candidate:173: INSTALL_FIX is one generic text for several install refusals.ship/sections/documentation.md.tmpl:10: the prose still says 'run the install fix' afterATTEMPT: not-counted.Exploratory QA
CLI probes in the shared fixture (
test/helpers/ship-bin-fixture.ts) at origin/main 047dad7 and at a1ea723. After a base merge that leaves the branch's patch unchanged, main printsROUTE: behavior=3 docs=1and stops for 5–11.5. This branch printsROUTE: behavior=0 … base=4, the docs stay fresh, and the lane runs. Captured above.Eval Results
No separate PR eval run. These files are full-gate inputs, so the train's
gstack/full-gateprovides the paid evidence.Plan Completion
Plan: autoplan-20261031063100 (gate_rev 2, APPROVED). Items A1 (GST-407), B1 (GST-384) and C1 (GST-391) are done, plus the GBRA-251 stamp rule the Captain folded in. Item D1 (GST-400) shipped as #3674. Deferred follow-ups under GST-407: GST-442 (preflight/Step 1.4 scoped route), GST-443 (bind scoped records), GST-444 (Step 16/DRIVER routing).
Issues
Refs #3662
TODOS
No TODO items completed in this PR.
Documentation
Status: blocked, shipped under the owner's exception. The audit docs-a-1 applied three factual fixes (
docs/review-policy.md,docs/ship-policy.md,docs/troubleshooting.md), anddocs/unattended.mdwas updated after Step 11. One item is left: Step 16 and DRIVER don't route finish's scoped-review STOP or--docs-requested. It fails closed into the full loop and is filed as GST-444.Scope: docs/, README.md, CHANGELOG.md, changelog.d/, ship/SKILL.md.tmpl, ship/DRIVER.md.tmpl, ship/sections/documentation.md.tmpl (audit docs-a-1). DOCS_CAP: none declared.
Documentation exception: accepted by GStack Minder (GSTA-36) for Garry Tan 2026-10-31 via GSTA-36 agent message: do it. Exception granted as worded: Step 16/DRIVER do not route the scoped-review STOP or --docs-requested; fails closed into the full loop; follow-up GST-444.
Named documentation risk (Step 16 stage 3, after the main merge): accepted by GStack Minder (GSTA-36) for Garry Tan 2026-10-31 via GSTA-36 agent message: "Docs inputs after audit docs-a-1 changed only by the main merge 807aaa8 and the 9-byte DRIVER.md.tmpl trim; no branch doc edit since the audit."
Test plan
bun teston lane-a plus test/review-targeted, gstack-ship-receipt, ship-receipt-depth, ship-driver, test-free-shards and windows-native-workflows (16 files): 490 pass, 0 failbun test test/ship-driver.test.ts test/gen-skill-docs-checks.test.ts test/ship-handoff-brief.test.ts test/parity-suite.test.ts: 81 pass, 0 fail (DRIVER.md 12284 B)bun run typecheck: exit 0