Repository navigation
fix: queued PRs keep their ship receipts when main starts excluding paths they never touched (GST-1408) - #4018
Merged
capy-ai[bot] merged 4 commits intoNov 5, 2026
Conversation
…he PR touches no new pattern (GST-1408) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…eck ratchet 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>
… no pattern matches (GST-1408) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Merged
2 tasks done
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
GST-1408 tests at main 6bdafb2 (before) and this branch (after): a receipt with no
review_excludedigest now binds when the PR touches none of the new patterns, and the three refusals stay.Before/after as text: GST-1408 tests at main 6bdafb2 (before) and this branch (after): a receipt with no review_exclude digest now binds when the PR touches none of the new patterns; the three refusals stay
Why
"One config PR stopped 9 queued receipted PRs" (HARN-1 on harness-evals, #264 merged as 4cb48b0fb). When main's
.gstack/ship-policy.jsongainedreview_exclude_paths,gstack-ship-queue readyrefused every older receipt withfield=review_exclude expected=<digest> recorded=none, even for PRs that touch none of the new patterns, and the only fix was to rerun review on each unchanged head. Those receipts now bind, because excluding paths a PR never touched can't change what its reviewers read.Blast radius
One added line in
excludeMismatch(lib/ship-receipt-depth.ts), whichbindShippedReceiptcalls for ready, train build, land and land-direct. It returns early only when the receipt records no digest and every current pattern matched no changed file (record.unmatched.length === record.patterns.length, from git's owndiff --rawover the same merge-base range the review read). With nothing matched, the excluded set is empty, so the depth and targeted verdicts are unchanged. An unreadable or invalid base policy still returnsrefusedbefore this check (walked:bindShippedReceiptchecksat.x.state === 'refused'first; test proves it). Carry (bin/gstack-ship-receiptcarry) is untouched and still compares digests.Approvals
APPROVALS_RENDER: redacted (repository visibility public); gstack-approvals list shows the full record
No approvals recorded for branch garrytan/gst-1408-review-exclude-older-receipts.
Summary
Reported by HARN-1 against gstack 1.95.5: adding
review_exclude_pathsto main's ship policy made the merge queue refuse every receipt written before it. The queue now accepts a receipt with no recordedreview_excludedigest exactly when no file the PR changes matches any current pattern, whether that file would be excluded or kept. It keeps refusing a recorded digest that differs from the current one, a PR that touches a pattern, and a base policy it can't read.docs/ship-policy.mdanddocs/troubleshooting.mdsay so, and the changelog fragment notes that carry still compares digests.Other receipt-bound policy checks were audited for the same flaw:
review_depthandreview_targetedalready accept legacy receipts and recompute their requirement from the diff (a newreview.risk_pathsonly raises depth for PRs that touch those paths), andreview.platform offrefusing a platform-depth receipt is a deliberate tightening. The only other instance is carry's own digest comparison, left for the carry owner.Test Coverage
Four new cases in test/review-exclude.test.ts, on receipts that
gstack-ship-receipt writeproduced and the queue'sbindShippedReceipt:field=review_exclude expected=a97f57a5… recorded=none, passes after the fix;POLICY_INVALID).Tests ran: focused 97
Pre-Landing Review
No blocking issues found. Full panel (review depth full: gate class, money risk line), two rounds.
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=0 scope=frozen ledgers_read=2 dispatches=4
Gate edits: none detected (the diff edits no test assertion or gate path outside the four added cases)
Outside review: openai/gpt-6.1-sol, completed, no actionable findings.
Review notes
RECEIPT_CARRY_REFUSED review_exclude changed: recorded=none now=<digest>) and needs /ship once. Carry belongs to the GST-1399 lane, so this PR leaves it alone; a follow-up can share one predicate withexcludeMismatch.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Plan Completion
Plan completion audit: not run (no plan is bound to this branch and no docs/designs/ file matches). Bug fix under the fix-lane exemption; the failing test came first.
TODOS
No TODO items completed in this PR.
Documentation
Scope: the GST-1408 diff against main (base 6bdafb2), covering the
excludeMismatchchange, the ship-policy paragraph, the changelog fragment and thefield=review_excludeentry in troubleshooting. Result: ship-policy.md and the fragment are accurate. I added a short note to thefield=review_excludeentry in troubleshooting.md explaining that the queue now skips receipts recorded asnonewhen no file the PR changes matches a current pattern. Debt: none found in the reviewed files.Test plan
bun test test/review-exclude.test.ts test/ship-receipt-depth.test.ts test/gstack-ship-queue.test.ts test/ship-queue-land.test.ts: 97 tests ran, exit 0bun run typecheckandbun run typecheck:test: clean, no new diagnosticsship-receipt-carry-large-diffandmodel-policy-clifail the same way on main 6bdafb2 here)