Repository navigation
v1.91.315.0 ship-receipt: carry a stacked child after its parent lands - #3572
Conversation
…wed tree after a rebase A base merge whose only product-side change is a registered output the pregate regen check proved fresh now carries the receipt. A rebased head carries when its tree is one the receipt covers and its product patch-id against the current base matches (RECEIPT_CARRY_TREE_MISMATCH otherwise). Docs: merge main into a reviewed branch, never rebase it. 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>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The regen check deletes each touched output in its scratch worktree before the command runs and records the ones recreated byte-identically as proven. gstack-ship-receipt carry exempts only those paths, and only when the check ran origin/<base>'s registry at the commit the carry reads. A file under an output glob that the generator never writes stays product (pre-landing review, #3564 pass 1). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…tured review-loop exception (#3559) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The regen verdict comes from the unmodified run again, so a generator that reads its own registered output (gen-skill-docs and qa/templates/functional-report-template.md) passes as before; the proof is a second run with the touched outputs deleted, and its failure only means not proven. The carry ignores a proven path with glob syntax, since it uses the paths as pathspec globs (pre-landing review, #3564 pass 2). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…x line Documentation audit for #3564 (/document-release, audit ship3564-docs-1). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…7-review-depth Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # docs/ship-policy.md
… checks) - carry refuses a --head other than the checked-out HEAD, a receipt with gstack_version but no review_depth, and an owner exception that no longer stands; a dirty or foreign checkout makes the write-time gate scan unavailable (full) - the queue binds a gate scan only to the full bound commit and recomputes the scope signals with gstack-diff-scope <base> --head <sha>, the same range the writer uses - the queue checks the review-loop exception's fix-check ancestry - a package.json version line counts as stamp-only only when it is a bare version key - docs and help name what review_depth is and which registry the queue reads 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>
When the carry base differs from the receipt's (a stack parent landed and the PR was retargeted), the receipt carries only when HEAD's product diff against the base equals the range reviewed against the parent branch. 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>
A retargeted carry compared the reviewed range with a patch-id whose pathspec came from the reviewed head..HEAD range, so a parent's package.json change that never reached the base dropped out and the receipt carried. Compare with HEAD's whole product patch-id against the base (the one write records), rebind the receipt's base on a retarget carry, and cover the parent-metadata, landed- with-changes and test-only-child cases. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… field 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>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…'s depth field" This reverts commit e9ec264.
…47-squash-parent Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> # Conflicts: # bin/gstack-ship-receipt # docs/troubleshooting.md
…d binds at the queue; docs: split the --head carry advice 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>
E2E Evals: ✅ PASS (flaky: 1 case(s) passed on their one rerun)125 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $32.24 rule/judge cost | reconcile exit: 0 Profile: pr / mode Derived dependents (scripts/pr-dependencies.ts):
Rule and judge shards
Fail-closed reconciliationSliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry. Flaky: failed once, passed on its one rerun (rule 16)Each failed and passed on its rerun in run 40828580338 at the attempts named above. Logged for the daily flaky-fix pass in this run's Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
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>
Stacked on #3567 (review depth in the receipt), which sits on #3564 (receipt carry rules). This PR's diff is against
gsta147-review-depth.What changed
The stacked-carry suite on #3564's head (before) and on this PR (after): a child now carries once its parent lands, and every fail-closed case still refuses.
Before/after as text: The stacked-carry suite on #3564's head (before) and on this PR (after): a child now carries once its parent lands, and every fail-closed case still refuses
gstack-ship-receipt carryfollows a stacked child after its parent lands. A child PR's /ship receipt is written against its parent branch, so itsbasenames that branch and itsproduct_patch_idis the child's own range. After the parent squash-merges (or merges), GitHub retargets the PR to main, the lane merges main in, and /ship's carry check runs with--base main.writerecords it. The reviewed range is the recordedproduct_patch_id, or for a receipt that predates it, the range againstorigin/<parent>while that branch still resolves.stack parent <branch> landed, and itsbasenow names main, so later carries are ordinary base-merge carries.package.jsonchange that never reached main givesRECEIPT_CARRY_PRODUCT_CHANGED. An older receipt whose parent branch is gone givesRECEIPT_CARRY_REFUSED.base. The depth is recomputed byreceiptDepthAtHeadagainst the new base, so the carriedreview_depth.baseis the new base's sha and its gate scan names HEAD: the same inputs the queue'sreceiptDepthVerdictrecomputes. A head that needs more depth than the receipt recorded refuses, anddeeper()never lowers it.RECEIPT_CARRY_PRODUCT_CHANGEDandRECEIPT_CARRY_REFUSEDexplain the stacked cases;RECEIPT_CARRY_REFUSEDnow lists both this PR's and v1.91.307.0 ship: proportional review depth (light, standard, full) with depth-checked receipts #3567's refusals, and the advice for a--headthat is not the checked-out HEAD is its own sentence.Fixes #3570
Why
"Every stacked child paid a full /ship after its parent merged" (#3570). Carry compared the child's diff from the old fork point, which still contained the whole parent, with HEAD's diff against the new main, which no longer does. GSTA-2 measured this as possibly the largest single source of reruns (gstack-evals#19 at 01a8227, parent #18). Now a child whose own reviewed code is unchanged keeps its receipt once the parent lands. This is PR 3 of GSTA-147, added by GStack Minder within Garry's "rec" on the plan.
Blast radius
The change is limited to
carrywhen--basediffers from the receipt'sbase; receipts carried against their own base take the unchanged path (same planCarry inputs, base untouched; read at bin/gstack-ship-receipt and covered by the existing carry and rewrite suites). Only HEAD's whole product diff equal to the reviewed range can carry, so an unlanded parent change, release metadata included, refuses. That rung is a walked failure path, with a regression test that fails on the pre-fix code and passes now. The queue'sready,train buildandverify --trainread the PR's base, neverreceipt.base(file read), so rebindingbaseon a retarget changes no queue decision. The depth a retarget carry records is measured against the same new base the queue checks, so the carry cannot record a depth the queue then rejects; if the parent's non-product paths never reached main, the measured depth only rises and the carry refuses.Approvals
No approvals recorded for branch gsta147-squash-parent.
Context from GSTA-147 (not an approval row): plan approved by Garry ("rec", gate_rev 2, GSTA-147). PR 3 scope was added by GStack Minder: "It's the same goal (rerun waste) and only tightens what carry checks." The lane never merges.
Summary
"Every stacked child paid a full /ship after its parent merged." The carry now recognises a retargeted child whose reviewed range is exactly its product diff against the new base and carries its receipt; everything else still refuses. /ship's own review found a fail-open in the first version (a parent's
package.jsonchange that never reached main carried) and this PR fixes it, with tests for that case, a parent landed with changes the child never merged, a test-only child and a second carry after the rebind.Test Coverage
Coverage: 78% value-weighted (7 of 9 traced paths before this run's tests); this run's pass-1 fixes added the test-only-child case (audit GAP 1). The remaining gap,
productPatchAgainstBasefailing while the parent still resolves, needs a fault-injection seam no production caller needs and was rejected.Tests: test/ship-receipt-carry-squash.test.ts 3 → 6 tests (+3 new, 1 extended). After the merge with #3567, the first test also asserts that the carried
review_depth.baseis origin/main's sha, that its gate scan names HEAD, and thatbindShippedReceiptaccepts the receipt against origin/main.Regression proof — against ed93c9f's
bin/gstack-ship-receiptthe parentpackage.jsontest fails, and so does the first test's new assertion that the carried receipt names main; the other four pass · after the fix all six pass.Tests ran: remote free tier 11165 (Ubicloud, tree 258401074f92, 0 failed)
Tests ran: focused 20 (ship-receipt-carry-squash, ship-receipt-carry-rewrite, ship-receipt-depth, spawnsync tripwire)
Pre-Landing Review
This head (range 12759e0..33f29a3: the merge with #3567 and its follow-up). Pass 1: testing, maintainability, security, performance, simplification and state-machine specialists, plus red team and native adversarial, on the conflict resolution and on how cmdCarry's depth record meets the retarget
baserebind. No findings at the floor; two informational items were fixed (the retarget test now checks the rebound depth and the queue binding; the--headadvice got its own sentence). Pass 2 (one testing reviewer on the fix commit): no findings.REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=0 fixed=2 scope=frozen
Earlier run at 12759e0, before the merge: one blocking fail-open fixed (a retargeted carry compared against a pathspec from the reviewed head..HEAD range, so a parent's
package.jsonchange that never reached main carried); five below-floor items fixed in the same batch.Gate edits: none detected (1 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: not run. Crew rule 30(a) keeps the cross-family voice for PRs that publish numbers, and this one publishes none; this is missing outside coverage, not a pass.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
bin/gstack-ship-receipt:539testFrom is computed against fromBase on the new base, so a retarget carry reports 'test-only change' whenever the parent touched tests; reason text only.test/ship-receipt-carry-squash.test.ts:138The package.json regression test landed in the same commit as its fix; record its fails-at-ed93c9f / passes-after-fix run. (Recorded under Test Coverage.)bin/gstack-ship-receipt:550--baseis trusted and never checked against the PR's real base. The same-base path had the same exposure before; /ship, the only caller, passes the PR's base. AbaseRefNamecheck under--pris a follow-up for the receipt owner.bin/gstack-ship-receipt:560A tests- or metadata-only parent that never landed still lets the child carry (its product is unchanged, so the review holds) with the reasonstack parent <branch> landed, which overstates what happened.Exploratory QA
No separate QA checkpoint. The changed surface is a CLI exercised end to end by the fixture suite (real git repositories with an origin, a squash merge, retargeted carries and refusals), which ran locally and in the remote free tier.
Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Greptile Review
No Greptile comments.
Scope Drift
Scope Check: CLEAN
Plan Completion
Plan: issue #3570. 3 of 4 items DONE, 1 CHANGED (the child's range comes from the recorded
product_patch_id, else the merge-base range againstorigin/<parent>, instead of from the old parent head; same goal), 0 NOT DONE.Issues
Fixes #3570
Verification Results
Step 8.1: the plan's acceptance (a squash-merged parent carries; any product difference refuses) is executed by test/ship-receipt-carry-squash.test.ts, and all six of its tests pass.
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. One factual fix in docs/troubleshooting.md; no blockers.
This head: the merge with #3567 changed docs/troubleshooting.md only.
RECEIPT_CARRY_REFUSEDjoins both PRs' refusals; the--headsentence was split out in 33f29a3. docs/ship-policy.md#receipt-carry still matchescmdCarry.Scope: release diff 3b90122..8b9c893 (
gstack-ship-receipt carrycarries a stacked child after its parent lands, #3570), with nothing staged, unstaged or untracked. Audited every doc that describes the receipt carry: docs/ship-policy.md#receipt-carry, docs/troubleshooting.md, docs/captain.md, docs/unattended.md, docs/pregate.md, docs/review-policy.md, captain/templates/CREW.md, ship/SKILL.md.tmpl Step 1, and CHANGELOG.md (read only).Documentation health:
RECEIPT_CARRY_REFUSEDnames the new cause (a retargeted stacked PR whose older receipt has noproduct_patch_idand whoseorigin/<parent>no longer resolves), and its Fix says to run /ship.RECEIPT_CARRY_PRODUCT_CHANGEDsays a retarget refusal names the parent branch and the base, and its Fix list of carry cases includes a stacked retarget.cmdCarry).Documentation Debt
Diagram drift: none (no diagrams describe the carry).
Test plan
gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands --base gsta147-review-depth: 11165 tests, 0 failed on tree 258401074f92 ($0.05), base origin/gsta147-review-depth@621baec9b8e5bun test test/ship-receipt-carry-squash.test.ts test/ship-receipt-carry-rewrite.test.ts test/ship-receipt-depth.test.ts test/spawnsync-timeout-tripwire.test.ts: 20 pass, 0 failbun run typecheckandbun run typecheck:test: clean, no new diagnostics🤖 Generated with Claude Code