fix(ship): finish takes a landed stack parent as the reviewed base, fail-closed on metadata and never bounded (GST-1399)

Ported from #4013 onto #4020's route: the stacked-parent path judges every
shipped path's metadata class against main, counts stamp_paths and
release_outputs only while stamp-only, and never feeds the bounded route.
The receipt carry's landed-parent search finds a squash main edited since.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-11-05 04:35:48 +00:00
1 parent e4f2930812
commit e428843faa
8 files changed
+443 -28

No files matched your search

+31 -1
View File
@@ -1685,7 +1685,37 @@ 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
difference refuses with `RECEIPT_CARRY_PRODUCT_CHANGED`.
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
change are tried newest first (at most 200), so the squash itself still counts
(GST-1399).
**finish after a stack parent lands (GST-1399).** A child reviewed against its
parent branch passes the parent's head to `gstack-ship-release finish
--reviewed-base`, even after the parent squash-merged and the child merged the
base. finish takes it when the branch contains it and a base commit holds its
change outside release metadata and changelog fragments (a release folds every
fragment on the base), found as the carry finds a landed parent, and
prints `REVIEWED_BASE: stack parent <sha12> landed on origin/<base> at <sha12>`.
The route, a granted fix-check's sides, the scoped-review packet and the docs
carry then compare each commit's patch from that parent, so the parent's and the
base's edits route as `base=`. The route also reads every path the branch ships
against the base, changed since review or not, and judges every shipped path's
release-metadata class against the base, so a parent change the base never
received (a `package.json` script, even after the child's version bump) or a
merge that kept a line the base changed since still stops. Both the landed check
and this class count a `stamp_paths` or `release_outputs` file as metadata only
while its edit is a version stamp, as `stamp_files` are; any other edit to one
must be held by the base or stop. A landed stack parent never takes the bounded
route: a post-review edit that a child reviewed against the base would send to
one scoped reader stops for Steps 5–11.5 instead. A path the child no longer changes against the base routes as base only
when the base already holds the reviewed change to it (a three-way merge of the
reviewed change into the base leaves the base's bytes, and a reviewed mode change
is the base's mode); a post-review revert to the base's content or mode still
stops. Any other commit
off the base, a parent the base never received included, stops with
`--reviewed-base <sha> is not on origin/<base>, nor a landed stack parent`.
Since the release that added `review_scope`. A `/ship` receipt names the head it
reviewed, so a conflict-only merge of the base or a test-only fix used to