Repository navigation
v1.94.21.0 fix(ship-receipt): a stacked carry ignores files the child's own earlier main merge brought in (GST-1214) - #3940
Merged
Conversation
…ier main merge brought in (GST-1214) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…h it (review fix, GST-1214) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
7 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.
Fixes GST-1214.
What changed
gstack-ship-receipt carrynow carries a stacked PR's receipt when the child merged main before its receipt was written, its parent squash-landed afterward, and the child merged main again. After it finds the landed parent, the carry leaves out every path whose content at the reviewed head is main's (paths the child's first main merge brought in), unless HEAD changed that path against main. A path with any compared path beneath it always stays in.Before (main at bf2bcf1), on the GST-1214 fixture:
After:
CARRY: carried from <reviewed> to <head> (stack parent <sha12> landed + base merge).Why
gstack-evals#178 merged main once before its receipt (20 wiki/ files came in). Its parent then squash-landed, and #178 merged main again. The carry from #3928 compared the range from the parent's head, which still held those 20 files, with HEAD's diff against main, which didn't. So it refused, even though the product diff against main was unchanged (the same 3 files, patch-id 20b669ce42fa). Without this fix, GEVA-2 reruns a full /ship.
Blast radius
Only the stack-parent branch of the carry changes, which runs only when the receipt's head is an ancestor of HEAD, the product patch-ids differ and a landed parent was found. A path drops out of both patch-ids only when the reviewed head holds main's content there, HEAD's diff against main doesn't touch it, and no compared path sits beneath it. No receipt field, write path or help text changes. No new dependency, network call, environment read or workflow edit.
Approvals
Bug fix under the fix-lane exemption (no plan review).
Documentation
Scope: committed diff bf2bcf1..4e8b1de (4 files, 0 staged, 0 unstaged, 0 untracked). Reviewed the stacked-carry change in gstack-ship-receipt against docs/ship-policy.md and docs/troubleshooting.md, plus the changelog fragment. Result: docs already describe the GST-1214 behavior in docs/ship-policy.md and troubleshooting stays accurate, so no edits were made. Debt: the new ship-policy.md hunk leaves a short orphaned line ('difference refuses ...'); cosmetic, left as is.
Pre-Landing Review
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=1 fixed=0 scope=frozen dispatches=4
Pass 1 (specialist, Red Team): no findings. In Step 11, the outside voice (openai/gpt-6.1-sol) found a High, blocking bug:
:(exclude,literal)palso leaves out everything beneathp. So when the child's first main merge turned a file into a directory, an unreviewed edit beneath it could carry. I reproduced it as a failing test, then fixed it in 4e8b1de: a path with any compared path beneath it is never left out. Pass 2 (a full pass on the fix range) found nothing blocking. The REVIEW_LOOP line counts Step 9 rows only, so it doesn't include this Step 11 blocker.Gate edits: none detected (GATE_SCAN tagged=0).
Open notes (below the blocking floor; review rounds used up under R65)
RECEIPT_CARRY_PRODUCT_CHANGEDnaming that path instead of carrying. The suggested fix is to buildcomparedfrom HEAD's paths and the reviewed range's own paths (listed[1],listed[2]).git diffargument. An earlier main merge of hundreds of files on Windows, or thousands on macOS, can hit the command-line limit, and then carry refuses with an unclear "git diff failed" message.Test plan
test/ship-receipt-carry-squash.test.ts: 13 pass. Targeted lane: 20 tests, 0 failures. Free Tests at tree 95be2f798d23: CI run 41629056664 is green (34,761 tests).