/ship counts a clean base merge as reviewed (GST-3562) (#4754)

When you merge main into a reviewed branch and your own lines, file
modes and symlink targets come through byte-identical, /ship now treats
the head as reviewed and lets CI check it, instead of asking for another
reader.

Why: these routine merges cost a reader stop on almost every PR that sat
a day, and the reader only ever re-read lines that had not changed.

Part of the /ship simplification Garry approved (items G and H); 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/outside-voice#3 reader=outside-voice
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/targeted#1 reader=targeted
Review-Finding: p1/adversarial-native#1 reader=adversarial-native
Review-Finding: p1/adversarial-native#4 reader=adversarial-native
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-24 02:41:52 +00:00
1 parent e78a1bfe32
commit 6ef3861302
14 files changed
+423 -228

No files matched your search

+9 -6
View File
@@ -2353,13 +2353,14 @@ receipt when the base moves:
| What changed since /ship | The receipt |
|---|---|
| a merge of the base, product diff unchanged (tests, release metadata, registered outputs the pregate's regen check proved) | carries; no review reruns |
| a merge of the base that edited lines next to the branch's unchanged hunks (the branch's +/- lines identical and in the same places) | carries after one fix-check reviewer reads the hunks and comes back clean (`RECEIPT_CARRY_SCOPED_REVIEW`, then `carry --scoped-review <record.json>`) |
| a merge of the base that edited lines next to the branch's unchanged hunks (the branch's +/- lines, file modes and symlink targets identical and in the same places) | carries with no reader; CI on the merged head is the check (reason `base context moved next to unchanged own lines`, GST-3562) |
| a merge of the base that spliced lines into one of the branch's hunks (the base replaced the very lines the branch replaces and the merge kept both, GST-2975) | carries after one scoped reader reads the hunks and comes back clean (`RECEIPT_CARRY_SCOPED_REVIEW`, then `carry --scoped-review <record.json>`) |
| a merge of the base that only re-records the harness pin of a product file (`scripts/harness-pins/<file>.json`; a pinned test or metadata file's pin stays product): at both heads the pin is a regular file (not a symlink), both pinned files resolve, the pin's `blob` is its file's blob, its other fields are the reviewed ones, and `scripts/harness-version.json`'s version and patterns did not move; the pinned file itself still counts as product | carries (reason `regenerated outputs`, GSTA-749) |
| a merge of the base whose resolution changed product code, or moved the branch's lines elsewhere | a fresh /ship (`RECEIPT_CARRY_PRODUCT_CHANGED`) |
| a rebase or force-push onto a tree the receipt covers, product diff against the new base unchanged | carries (`carry.ancestry: rewritten`) |
| any other rebase or force-push | a fresh /ship (`RECEIPT_CARRY_TREE_MISMATCH`) |
| a stacked PR whose parent landed (squash or merge), retargeted to the base with the base merged in, HEAD's product diff exactly the one reviewed against the parent branch | carries (reason `stack parent <branch> landed`) |
| a stacked PR whose receipt was written against the base, after its parent landed and the base was merged in, HEAD's product diff exactly the reviewed range from the parent's head | carries (reason `stack parent <sha12> landed`); base context next to the child's hunks is `RECEIPT_CARRY_SCOPED_REVIEW` |
| a stacked PR whose receipt was written against the base, after its parent landed and the base was merged in, HEAD's product diff exactly the reviewed range from the parent's head | carries (reason `stack parent <sha12> landed`); base context next to the child's unchanged hunks carries too, and a spliced hunk is `RECEIPT_CARRY_SCOPED_REVIEW` |
| a stamp on the branch's own rows in a stamp file the branch also changed as product: every changed line at a branch-added position, the file's mode unchanged, the base not touching it, the rest of the product diff unchanged | carries (reason `a stamp on the branch's own rows (<file>)`) |
| a stamp file the branch changes, against each head's base, by no more than a stamp (back at the base's content after a changelog-fragment conversion, or only its version field moved), whatever else the base changed in it | carries (reason `release metadata`, GST-1210) |
@@ -2398,7 +2399,8 @@ every path whose content at the reviewed head is the base's (a base merge the
child made before its receipt brought it in) unless HEAD changed it against the
base (GST-1214): an equal
patch-id carries with reason `stack parent <sha12> landed`, base context next
to the child's unchanged hunks is `RECEIPT_CARRY_SCOPED_REVIEW`, and any other
to the child's unchanged hunks carries too, a spliced hunk is
`RECEIPT_CARRY_SCOPED_REVIEW`, and any other
difference refuses with `RECEIPT_CARRY_PRODUCT_CHANGED`. When merging the commit
into the current base conflicts because the base edited the landed lines
afterwards, the base commits since the fork that touched every path of its
@@ -2494,7 +2496,7 @@ along the receipt's own history, `rewritten` once any hop was a rebase;
skill=ship status=complete` line, and its summary line ends with
`carried_from=<old12>`. `CARRY: current` means the receipt already names HEAD;
`--dry-run` prints `CARRY: would carry …` and writes nothing. When the only
difference is base context next to the branch's unchanged hunks and none of
difference is a hunk the base merge spliced and none of
carry's other checks would refuse, `--dry-run` refuses
`RECEIPT_CARRY_SCOPED_REVIEW` without writing the packet; carry without
`--dry-run` writes it.
@@ -2502,7 +2504,8 @@ carry's other checks would refuse, `--dry-run` refuses
A changed product path, or a product patch-id that differs, is
[`RECEIPT_CARRY_PRODUCT_CHANGED`](troubleshooting.md#receipt-carry-product-changed)
(exit 3; the refusal names the paths), except when the only difference is
base context next to the branch's unchanged hunks, which is
base context next to the branch's unchanged hunks, which carries with no
reader (GST-3562), or a hunk the base merge spliced, which is
[`RECEIPT_CARRY_SCOPED_REVIEW`](troubleshooting.md#receipt-carry-scoped-review)
until one fix-check reviewer clears the packet; a working tree with uncommitted
changes is [`RECEIPT_CARRY_REFUSED`](troubleshooting.md#receipt-carry-refused).
@@ -2543,7 +2546,7 @@ generated skill file whose only branch-side difference after a base merge is
that id compares as unchanged. A reviewed line that the base also replaced,
where the current line is the base's new line plus exactly the tokens the
branch added to the reviewed line (both sides appended an entry to one
expected-value list), is base context: it goes to the one scoped reader, never
expected-value list), is a spliced hunk: it goes to the one scoped reader, never
through silently. A resolution that drops, invents or rewrites anything on the
branch's own lines stays a changed path.
+15 -12
View File
@@ -7886,30 +7886,33 @@ landed on the base, a stamp on the branch's own rows in a stamp file it also
changed as product (every changed line at a branch-added position, the mode
unchanged, the base not touching the file), a stamp file the branch changes by
no more than a stamp against each head's base (a changelog-fragment conversion
that puts `package.json` back at the base's content), or base context next to unchanged
hunks after a clean scoped review ([`RECEIPT_CARRY_SCOPED_REVIEW`](#receipt-carry-scoped-review)), which the
that puts `package.json` back at the base's content), base context next to unchanged
hunks, or hunks the base merge spliced after a clean scoped review ([`RECEIPT_CARRY_SCOPED_REVIEW`](#receipt-carry-scoped-review)), which the
`carry` object in the carried receipt records with the product patch-id and
the range-diff evidence ([unattended.md](unattended.md#the-terminal-line)).
<a id="receipt-carry-scoped-review"></a>
### `RECEIPT_CARRY_SCOPED_REVIEW`
**Meaning.** Every product path the branch touches has the reviewed +/- lines
in the same places, but the base edited context lines next to some of them, so
the 3-line patches differ (GST-384: main reworded the line above the PR's
hunk). A hunk whose added lines are unchanged but whose removed lines changed with
the base (the base took `SAVE_VERSION := 83` under the branch's `:= 84`) doesn't
count: the PR's own removed lines changed, so it's `RECEIPT_CARRY_PRODUCT_CHANGED`
and a full review (GST-2706). The merge may have spliced the two, as in a JSON entry where the branch
changed one key and the base the next, so the receipt does not carry silently.
**Meaning.** The base replaced the very lines one of the branch's hunks
replaces, and the merge kept both: each current line is the base's new line
plus exactly the tokens the branch added, as when both sides appended an entry
to one expected-value list (GST-2975). The branch's own lines are not the
reviewed bytes, so the receipt does not carry silently. Base context that only
moved next to the branch's unchanged hunks (GST-384: main reworded the line
above the PR's hunk) no longer stops here: when the branch's +/- lines, file
modes and symlink targets are the reviewed ones, the carry passes and CI on the
merged head is the check (GST-3562). A hunk whose added lines are unchanged but
whose removed lines changed with the base (the base took `SAVE_VERSION := 83`
under the branch's `:= 84`) is `RECEIPT_CARRY_PRODUCT_CHANGED` and a full
review (GST-2706).
The refusal names the paths and a packet file with the hunks that differ and
the base's own change. The same lines moved somewhere else are
`RECEIPT_CARRY_PRODUCT_CHANGED`, not this code. A packet section with over
200 of the branch's own +/- lines takes the full loop instead. Nothing else
counts toward that limit: the context lines and headers of the branch's hunks,
which a base merge can move (GST-2229), and the base's own change, already
merged at base (GST-1226), are shown and not counted, so a large base edit next
to the branch's hunks still gets the scoped read. A base change over 2,000 lines
merged at base (GST-1226), are shown and not counted. A base change over 2,000 lines
in one file counts in full again and takes the full loop.
**Fix.** Dispatch one fix-check reviewer
+2 -2
View File
@@ -311,8 +311,8 @@ now names HEAD with a `carry` object holding the `git range-diff` evidence, and
`ship-run.json` gains `carried_from` and `carry_reason`; the `review_loop`
counters are kept, because the reviewed product diff is unchanged or its only
difference passed a scoped review. `CARRY: current` means nothing moved.
`CARRY: refused (RECEIPT_CARRY_SCOPED_REVIEW)` means the base edited context
next to reviewed hunks. Carry without `--dry-run` writes the packet the
`CARRY: refused (RECEIPT_CARRY_SCOPED_REVIEW)` means the base merge spliced
lines into reviewed hunks (moved context next to unchanged hunks carries). Carry without `--dry-run` writes the packet the
refusal names (a dry run writes none), one fix-check reviewer reads it, and a
clean record reruns carry with `--scoped-review <record.json>`
([troubleshooting](troubleshooting.md#receipt-carry-scoped-review)). `CARRY: refused (RECEIPT_CARRY_PRODUCT_CHANGED)`,