Repository navigation
/ship can clear its test gate from CI on a branch stacked on another branch (GST-3381) - #4689
Merged
Merged
Conversation
…s (GST-3381) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…fore it reads any evidence A --base naming another branch now refuses base_mismatch for every clear route, --bundle-lane included, and a programmatic clear with no base keeps the origin/HEAD fix hint. Review-Finding: p1/outside-voice#1 reader=outside-voice Review-Finding: p1/adversarial-native#3 reader=adversarial-native Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… of the base the record names Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
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.
When a branch is stacked on another branch, /ship can now clear its test gate from a green CI run instead of refusing with
base_mismatch.Teams that ship stacked branches were stuck: the record named the stacked base, but the check read run profiles from the default branch.
Nothing to do: branches based on main behave exactly as before.
What changed
gstack-pregate clear --runreads run profiles from the base branch the gate record was made against, not fromorigin/HEAD. A new optionalclear --base <branch>names it explicitly; a--basethat differs from the record is refused withbase_mismatchbefore any evidence is read, for every clear route.gstack-pregate --base <branch>(whatgstack-ship-release accept --baseruns) clears the gate against that same base.Why
"REUSE: refused reason=base_mismatch" blocked /ship on every branch stacked on a base other than main, even with green CI at the head. The record already names its base, so the clear now trusts the same base the gate run trusted.
Blast radius
Only
gstack-pregate clearand the CI reuse insidegstack-pregate --base. Records made against main resolve to the same base as before, so their behavior is unchanged (bin/gstack-pregate:274 read; the existing clear tests in test/pregate-clear-runs.test.ts still pass). Rung: script ran (494 targeted tests).Pre-Landing Review
REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=5 fixed=2 scope=frozen ledgers_read=3 dispatches=8
Gate edits: none detected (GATE_SCAN tagged=0 at e660b0b)
Fixed in this PR: a
--basethat differed from the record could let the bundle option skip run verification (second-model review), and a programmatic clear with no base got the wrong fix hint.Review notes
Below the blocking floor; recorded here and not fixed in this PR. GSTA-724, GSTA-725 and GSTA-726 reported the refusal.
bin/gstack-pregate:274The record's base now chooses run_profiles; no consumer binds the record base to the PR base (red team and adversarial review; the ruled note in Agent notes covers the same gap).lib/pregate/index.ts:389Accepting a version-bump-only parent run on a stacked base refuses with advice to rerun against main.bin/gstack-pregate:276The early base_mismatch refusal also covers the run-URL and saved-result routes; the test covers only the run-ID and bundle routes.Documentation
Status: updated — one factual correction, no blockers.
Scope: commits 6acb93a..e660b0b against base c2b4f0d2 (bin/gstack-pregate, lib/pregate/index.ts, docs/pregate.md, test/pregate-clear-stacked-base.test.ts, changelog.d/pregate-clear-reads-record-base.md); nothing staged, unstaged or untracked. Audited docs/pregate.md, docs/troubleshooting.md, docs/ship-policy.md, the ship templates that mention
gstack-pregate clear, and docs/evals/ship-conductor-fold-prereg.md.Documentation health:
clear --base)PREGATE_RECEIPT_INVALIDentry now says run profiles come from the base pregate.json was recorded against, and that--basenaming another branch refusesbase_mismatch)Coverage debt:
gstack-pregate clear --base <branch>has reference coverage (CLI help, docs/pregate.md#run-evidence, troubleshooting) but no how-to for clearing on a stacked branch. That is a common gap.Diagram drift: none.
Tests
bun --no-env-file test --timeout=30000 test/pregate-*.test.ts: 494 pass, 0 fail at 0f09ebf (40 files; includes the new test/pregate-clear-stacked-base.test.ts, which fails on main and on 6acb93a without the --base guard).bun run test: runs in CI at this head.Agent notes
Agent notes
Refs GST-3381
Approvals
Approved: yes (record r-572964556081). The full approval record stays private.
Plan: exempt: bug fix with a failing-first test (GST-3381)
Plan check: exempt bug fix
Ruled note: lib/pregate/index.ts:131:base-binding at e660b0b ruled by GStack Minder (relayed from GSTA-36:2026-11-22T06:00:00Z) at 2026-11-22T05:46:04.123Z: finish's pregate verify does not bind the record's base to the ship base; pre-existing gap, follow-up adds verify --base and has finish pass its base (approval a-9cd4c54e2246)
gstack: ok 1.102.2.0 for=ship