Repository navigation
v1.91.374.0 ship: pause /ship on a red base instead of failing (gstack-base-red, conditional receipts) (GSTA-157 PR 1) - #3611
Conversation
…-red, conditional receipts) (GSTA-157 PR 1) 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>
…, readPause, wait unconfigured) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ers an invalid base policy Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ify usage before fetch, unresolved-head detail) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
E2E Evals: ✅ PASS125 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $32.85 rule/judge cost | reconcile exit: 0 Profile: pr / mode Full gate restored by:
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. Dispatched narrow screen (gstack-ship-queue ready --screen) of merge commit |
… 2026-10-31); CHANGELOG entry moved to changelog.d fragment Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…py/ship-queue-merge-trains (rule 19 grant, GStack Minder 2026-10-31) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
What changed
Step 5 now proves a red base with
gstack-base-red classifybefore the T3 question, and pauses /ship with a conditional receipt instead of failing.Before/after as text: Step 5 now proves a red base with gstack-base-red classify before the T3 question, and pauses /ship with a conditional receipt instead of failing
A repo opts in with a
base_red: { setup, select, timeout_sec }block in its base-branch ship policy.gstack-base-red classifycalls a failure base-red only when every failure is named, the PR touches neither the failing test nor any path its error names, and the same test fails the same way at the base head and at HEAD in scratch worktrees. Anything else stays in-branch. A paused /ship writes a conditional receipt (abase_redblock):gstack-ship-receipt resultprintsSHIP_PAUSEDwithstatus=incomplete, andready,train build,verify --trainandcarryrefuse it withQUEUE_RECEIPT_CONDITIONAL.gstack-base-red waitreturns once a new base head passes the paused cases, and/ship --resumereruns Step 5.Why
Truther's main went red 7 times in 24 hours, and its two main-red fixes (#815 and the cover-contract branch) each failed only on the other's red cases, so a Captain folded them into #818 by hand. Lanes also held /ship by hand while main was red. Now a lane whose only failures are the base's own pauses and resumes on its own once the base is green (GSTA-157; plan approved by Garry: "Do it. Order priority by what saves money fastest").
Blast radius
The feature is opt-in per repo. With no
base_redblock on the base branch,classifyreturnsBASE_RED_UNCONFIGUREDand Step 5 triages exactly as before (smoke-probed against this repo's main, which declares none). Every receipt binder exceptresultrefuses a receipt carryingbase_red, so a paused PR cannot READY, train or merge (read in lib/ship-receipt.tsbindReceipt, lib/ship-queue-train-verify.ts andcarry; covered by test/base-red.test.ts). No gate, threshold or trial count changes.Approvals
Source: gstack-approvals record for gsta157-base-red-pause (display only; not an approval citation).
Summary
/ship's Step 5 used to fail or ask the fix/TODO/blame/skip question whenever main was red for a reason outside the PR. It now proves the red belongs to the base (reproduced at the base head and at HEAD) and pauses with a conditional receipt that the queue refuses until
/ship --resumewrites a full one. This /ship run also moved the scratch-command runner ontorunBashSync(the CI tripwire for #3197), added coverage tests for every proposed gap (two generation passes), and documented the paused ending in docs/unattended.md.Test Coverage
Tests: 1534 → 1534 (+0 new files; test/base-red.test.ts extended over two generation passes)
Coverage: 92% value-weighted (92% including 0 weakly covered paths)
Test value: 3 tests written in pass 2 (3 in pass 1), 1 rejected by the authoring gate, 1 existing test strengthened, 0 paths weakly covered (weak = ★, gate-failing or unrated).
Coverage gate: PASS (92% value-weighted, target 80%). Pass 2 (option A) added
write --base-red, thebase_red=summary part and classify usage-before-fetch tests, and pinned the unresolved-head detail (proved red with the guard removed in a scratch copy). The two corrupted-repo paths stay rejected (no_credible_regression). Rating dispatch: all 8 audit-added tests ★★ or better.Pre-Landing Review
After the main merge (7954471, rule 19 grant from GSTA-36). Merging origin/main a305302 (v1.91.365.0) resolved 9 conflict hunks by keeping both sides: receipt KEY_ORDER (
review_targetedandbase_red), the ShipReceipt type, the receipt write call, policy key versions, POLICY_KEY_INTRODUCED, validatePolicy and its helpers, the docs/ship-policy.md key table, and CHANGELOG.md. The CHANGELOG entry moved to the fragment changelog.d/gsta157-base-red-pause.md, because main now uses changelog fragments. The receipt could not carry (RECEIPT_CARRY_PRODUCT_CHANGED), so, per the Captain's ruling, one fix-check reviewer (Claude Opus 5.5) read the resolution hunks, the fix list, the callers and the test results: NO FINDINGS. The targeted pass that main's /ship now runs on gate-class diffs (classes=gate) also ran on the whole diff: 1 informational finding, the samelib/base-red.ts:66defect already listed under Review notes. Head unchanged at 7954471; no fixes.No blocking findings. The coverage pass-2 tests (test-only) went to one fix-check reviewer on the touched hunks: NO FINDINGS. Six informational findings are listed under Review notes and were not fixed (CREW rule 30a: informational findings go in the PR body, never a loop).
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=7 fixed=0 scope=frozen fix_checks=2 dispatches=9 est_input_tokens=17187
Gate edits: 3 listed, 1 read, 0 findings — the RH-12 hunk in lib/base-red.ts sets
CIfor the reproduction child so it matches CI; it relaxes no gate.Outside review: missing coverage. Codex CLI is not installed on this machine and no cross-family voice was dispatched under the lane's review sizing (CREW rule 30); the native adversarial pass (Claude Opus 5.5) completed.
Blocking finding fixed before review:
lib/base-red.tsspawnedbashdirectly, which failstest/script-invocation-tripwire.test.ts(#3197) in CI;shellRunnernow callsrunBashSync(5876005).Review notes
lib/base-red.ts:66from the first note below: a PR-caused failure that shares a generic first error line with a real base failure in the same file can be paused as base-red. The queue still refuses the conditional receipt. Recommended follow-up, not fixed here.lib/base-red.ts:66reproduces()matches the test id and signature anywhere in one combined run, so a case that passes at base ((pass) <id>) next to a real base red sharing a generic first error line counts as base-red. A lane can pause on its own regression; the receipt still cannot READY and--resumereruns Step 5. Fix: match(fail) <id>and the signature inside that test's failure block, or run each case alone. Found by red-team and the adversarial pass independently; reproduced end to end. Recommended follow-up.lib/base-red.ts:65a killed or timed-out run whose partial output matches counts as reproducing; treatstatus === nullorerrorasBASE_RED_REPRO_ERROR.lib/base-red.ts:188waitBaseGreenignores the fetch result and marks a head checked after a failed checkout, so one transient fetch failure can skip a green head until timeout.lib/base-red.ts:84a timeout kills only bash, and a SIGKILLedwaitskips thefinally, leaving scratch worktrees; kill the process group and prune stale scratch worktrees at start.bin/gstack-base-red:58the pause file is keyed onrev-parse --abbrev-ref HEAD, which isHEADwhen detached, so detached lanes share one pause file; fall back to the head sha.lib/base-red.ts:139readPausedoes not re-validatecases[].filethe wayparseEvidencedoes (no injection path found).Exploratory QA
Smoke probes on 74600b8's tree (product code unchanged since):
gstack-base-red --helpexit 0;classifywith no args exit 2;classifyagainst this repo's main (nobase_red) printsIN_BRANCHandBASE_RED_UNCONFIGURED, exit 1; evidence with../a.test.tsrefused as not repo-relative, exit 2;wait --pause /nonexistentexit 2. The adversarial reviewer also ran an end-to-end classify on a scratch repo (the finding above).Design Review
No frontend files changed — design review skipped.
Eval Results
Prompt-bearing templates changed (ship/sections/tests.md.tmpl, pr-body.md.tmpl). No paid eval ran in this /ship; the paid screen runs through
gstack-ship-queue ready --screenand the train's full gate.Greptile Review
No Greptile comments.
Plan Completion
Plan: autoplan run autoplan-20261029035910 (GSTA-157), PR 1 scope. 4/12 done, 3 changed, 3 partial, 2 not done. Items 7–15 belong to PR 2. Not done here:
ready --base-red --fixer,FIXES_BASE_RED,QUEUE_BASE_RED_NO_TRAIN(moved to PR 2 by decision-trail row 11) and the handoffs/GSTA-157/gsta154-seam.md note. Partial: the interactive "continue, then pause" T3 option, worktree cleanup asserted on the success path only, and resume paths untested.Verification Results
At the merge head 7954471:
bun run typecheckexit 0; focused set of 17 files green (506 tests, no failures);gstack-prose-lint changelog.d/gsta157-base-red-pause.md --gate: ok;gstack-ship-receipt docs-caps: none declared. Before the merge: Remote pregate on the frozen head (see Test plan);bun run typecheckexit 0;bun run gen:skill-docsand--host codexproduced no changes; parity-suite, module-size ratchet, skill-md-size guard, bun-entry isolation, doctor-components and troubleshooting-anchors all green (302 tests, no failures).TODOS
No TODO items completed in this PR.
Documentation
After the main merge: docs/ship-policy.md keeps both the
base_redandchangelog_fragmentsrows (checked by the fix-check); the CHANGELOG entry is now changelog.d/gsta157-base-red-pause.md.Status: updated — two factual additions, no blockers.
Scope: committed diff ad8e12d..289aeda (3 commits, 18 files); no staged, unstaged or new files. The red-base pause feature:
gstack-base-redclassify/wait, thebase_redpolicy key, conditional receipts (QUEUE_RECEIPT_CONDITIONAL),SHIP_PAUSEDin the result line.Documentation health:
base_redsection and table row match the code)BASE_RED_UNCONFIGUREDnow notes that an invalid base policy produces it too)SHIP_PAUSED/status=incompleteending to /ship's result endings)Coverage debt:
gstack-base-redhas reference coverage (ship-policy.md, troubleshooting.md) and how-to coverage (tests.md.tmpl Step 5, captain.md), with no tutorial. Common gap: no worked example of a full pause → wait →/ship --resumecycle. Diagram drift: none.Test plan
UBI_OWNER=gsta157 gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands) at 7954471 (after the main merge): 24346 tests, 0 failed on tree 030133343ae1, $0.09. Earlier run at 9d7f7ab: 23675 tests, 0 failed.bun test test/base-red.test.tsgreen (15 tests, no failures);bun test test/script-invocation-tripwire.test.ts test/spawnsync-timeout-tripwire.test.tsgreen🤖 Generated with Claude Code