Repository navigation
v1.94.15.0 fix(ship-receipt): carry a stacked PR's receipt after its parent squash-merges into main (GST-1199) - #3928
Merged
Merged
Conversation
…sh-merges into main (GST-1199) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
… parent (review fix, GST-1199) 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>
… audit, GST-1199) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
7 tasks done
garrytan
added a commit
that referenced
this pull request
Nov 3, 2026
lib/ship-receipt.ts KEY_ORDER keeps flaky_exception (#3911) and no_stop. bin/gstack-ship-receipt: main's review_exclude help and digest refusal text plus --no-stop help; the J1 re-check block before one planCarry call carrying both stackParent (#3928) and recheck; the recheck risk-class check after the digest check. test/review-packets-removed.test.ts keeps both NO_LOSS_REPLAYS keys (GST-940 and GST-508+GST-464+GST-967+GSTA-258-L4). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This was referenced Nov 3, 2026
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
gstack-ship-receipt carrynow keeps a stacked PR's /ship receipt after its parent squash-merges into main, when the receipt was written against main while the PR was still stacked.Before (main at c197a13), on the GST-1199 fixture:
After: the same fixture prints
CARRY: carried from <child> to <head> (stack parent <sha12> landed + base merge).The carry finds the newest commit inside the reviewed range that main already holds:
git merge-treeof that commit into main changes no product path. It then compares the child's range from that commit with HEAD's diff against main. Equal patch-ids carry. Base edits next to the child's own hunks go toRECEIPT_CARRY_SCOPED_REVIEW. Any other difference still refuses withRECEIPT_CARRY_PRODUCT_CHANGED. A commit with no product change of its own never counts, and neither does a parent that never landed, even when the child's merge dropped its change.Why
gstack-evals#178 was stacked on #175 and targeted main. Its gate-class receipt was written at 4d1feef. After #175 squash-merged and main was merged into #178, the carry refused, even though the child's own patch-id was the same on both sides (20b669ce42fa). The only way through was a full gate-class re-review, about 45-60M tokens. Any crew that stacks PRs and squash-merges hits the same wall.
Blast radius
Only the receipt carry changes, and only when the product patch-ids at the two heads already differ and the receipt was not retargeted. Before, that path always refused or went to scoped review. Now it first looks for a landed commit inside the reviewed range. That costs one
git diffand onegit merge-treeper commit, for at most 100 commits. When it finds none, the carry behaves exactly as before. The receipt schema, the write path and the help text are unchanged. No new dependency, network call, environment read or workflow edit.Approvals
Bug fix under the fix-lane exemption (no plan review). GStack Minder approved the
cmdCarryedit inbin/gstack-ship-receiptafter a clean trial merge with #3920.Documentation
Scope: branch diff against origin/main (receipt carry for stacked PRs whose parent landed, GST-1199), with docs/ship-policy.md and docs/troubleshooting.md as the docs that describe it. Result: ship-policy.md already matched the code. I added one sentence to the RECEIPT_CARRY_PRODUCT_CHANGED entry in troubleshooting.md for base-written receipts. Debt: the Fix paragraph of that entry does not list the new carry case, and I did not read every doc in the repo.
Pre-Landing Review
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=1 fixed=1 scope=frozen fix_checks=1 dispatches=2
Pre-Landing Review: 1 issue, 1 fixed. The Red Team found that a test-first commit with no product change could pass as a landed parent, which wrote a false reason into the receipt. That's fixed in 1f1bd4d with a regression test that fails without the fix.
Gate edits: none detected (GATE_SCAN tagged=0).
Adversarial (Step 11): native voice issues_found (2 findings, neither blocking). Outside voice (openai/gpt-6.1-sol) found nothing blocking.
Open notes (below the blocking floor; review rounds used up under R65)
rangeBase..commitrather than the commit's own change. So on fork → parent A → child test-first commit B → reviewed head, the walk names B instead of A as the landed parent, and B's test hunks drop out of the reviewed-side test patch-id. The carry decision is unchanged. The suggested fix isgit diff --quiet <commit>^ <commit>.git merge-treeleaves the base's blob on a conflicted binary path, or on a path marked-merge/merge=ours. So a parent whose binary change conflicted can count as landed when the child's merge dropped that change. The shipped diff is still exactly the reviewed child hunks. The suggested fix: when merge-tree exits 1, reject the commit if any conflicted path is a product path the commit changed. Until that lands, the docs sentence "A conflicted product path never counts" overstates the case for binary paths.Test plan
test/ship-receipt-carry-squash.test.tsfail with RECEIPT_CARRY_PRODUCT_CHANGED. With the fix, the file passes (10 tests).