Repository navigation
Stop the pre-merge check from accepting a half-finished run (GST-2194) - #4258
Merged
Merged
Conversation
|
😎 This pull request was merged. |
2 tasks done
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 rest Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ane is a remote obligation Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
force-pushed
the
pregate-verify-refuses-partial-run
branch
from
November 9, 2026 23:14
e9794d9 to
dbad74c
Compare
The train, train-ops and wave tests wrote one-check pregate records, which verify now refuses as a partial run. They now write every registered check, as test/gstack-ship-queue.test.ts already does (CI free-suite run 42718782737). Review-Finding: lib/pregate/index.ts:251:functional-contract reader=core Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Documents that verify refuses a record missing registered checks, and that a fix commit needs a full gstack-pregate run (Step 14.5 docs audit). Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
2 tasks done
capy-ai Bot
added a commit
that referenced
this pull request
Nov 10, 2026
…T-2282) (#4271) * Give the ship-queue ready tests complete pregate records The notes-push and fresh-base suites wrote a one-check pregate record, which ready refuses as a partial run since #4258. They now write every registered check, as the other queue tests do. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Add a changelog entry for the ship-queue ready test fix 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>
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.
The pre-merge check no longer accepts a record from a half-finished run. This serves the goal of only merging work whose secret scan and tests actually passed on the code that lands.
What changed
verifyPregaterefusesPREGATE_INCOMPLETEunless the record holds every registered check. Becausegstack-ship-queue readyandgstack-ship-receipt writecall it, they refuse too. The message names what is missing:pregate.json holds checks=1 of 8 (missing: regen, secrets, …). Fail, incomplete, environment and uncleared-remote records still refuse under their own codes first.PREGATE:line printschecks=N of M.--onlyor--stage preflight|testsrun keeps the checks it skipped from the record it replaces when head, tree, base commit, policy and registry all match, and printsPREGATE_MERGED: kept …. So the documented order (a full run, then--stage tests --remoteat the same head) still verifies, and a same-tree rerun can no longer drop an earliersecretsfailure. Guards-stage runs never merge, and nothing merges from the by-tree mirror (any probe run overwrites it).#same-tree-checks). docs/troubleshooting.md now names the missing-checks refusal underPREGATE_INCOMPLETEand says a fix commit needs a full run. The clone-lane mirror now stands in only for a complete record: run the fullgstack-pregate --remotein the clone, orclear --receipt.Why
The GSTA-461 audit (item 2) reproduced it. After a full run failed on
secrets(github.pat), following pregate's own "rerun--stage tests" hint gavePREGATE_VERIFY: okwith the token still in HEAD.gstack-pregate --only strays(checks=1) also verified as a full pass. docs/pregate.md already called such runs "not evidence", but the code didn't enforce it.Blast radius
Anything that verifies a pregate record:
gstack-pregate verify,gstack-ship-queue ready(its own record and the by-tree mirror),gstack-ship-receipt write/carry, and the remote-gate stand-in. A record from a standalone--stage tests --remotewith no full run at that head is now refused, which is the hole being closed. Test fixtures that wrote fake one-check records now write the full check list, including the crew queue tests (crew/test/ship-queue-train, -train-ops, -wave), which CI run 42718782737 showed failing at dbad74c (file:line read and the three files run 55 pass, 0 fail).Tests
Open notes (review round 1 at 24b3c73, all below the blocking floor, deferred)
lib/ship-queue.ts:mirrorGapand its comment still describe a tests-only mirror as enough.readytreats the missing-checks refusal as final and doesn't say why a mirror stopped standing in (red-team and adversarial agree).lib/pregate/index.ts:mergeSameTreeChecksneeds an exact base-commit match, so a moved origin/main keeps nothing and verify asks for a full rerun (fails closed).coordinator-contract.ts:22andautoplan/DRIVER.md:157still describe a staged rerun.lanes.ts:583,result-codes.ts:405/415,guards.ts:101and troubleshooting.md still say to rerun one stage. After a fix commit that alone is refused, so they should name a full run.--onlyrun.Test Coverage
Coverage: deterministic (each of the 3 changed runtime files has a changed test naming it).
Tests ran: test 1659 (files, carried from CI free-tests run 42732479322 at tree c58c4b924efe)
Pre-Landing Review
Pass 1 (full panel at dbad74c): specialist-batched, red-team, native adversarial and outside voice (GPT-6.1 Sol, CLEAN). No blocking review finding. CI free-suite run 42718782737 then failed 19 tests in three crew queue test files whose fixtures wrote one-check records; fixed in c676d76 (fixtures only). Pass 2 on dbad74c..c676d76: specialist-batched and red-team, NO FINDINGS.
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=3 fixed=1 scope=frozen ledgers_read=4 dispatches=8
Gate edits: 37 listed, 28 read, 0 findings (patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Outside review: GPT-6.1 Sol (host subagent), completed, VERDICT: CLEAN.
New notes (/ship review at dbad74c and c676d76, all below the blocking floor)
lib/ship-queue.ts:292: a partial local record vetoes a complete by-tree mirror because the missing-checks refusal reusesPREGATE_INCOMPLETE; fails closed (specialist and native adversarial).lib/ship-queue.ts:247: no queue test pins the tests-only mirror refusal; stale--stage tests --remoteguidance also sits inscripts/ubicloud/pregate-remote.sh:53andubicloud/SKILL.md.tmpl:166.lib/result-codes.ts:420andlib/pregate/remote-receipt.ts:81point at the paid--stage tests --remoterun, which verify refuses at a moved head or base, so it can waste a paid gate (red-team).--outenforces; stage clocks are not carried on an--onlyrun at--stage all(cosmetic).PREGATE_INCOMPLETE's generic opening and fix text (timeouts, missing tools) wrap the missing-check message (QA capture 003); wording.Exploratory QA
Functional smoke on the branch's
bin/gstack-pregatein an isolated worktree of dbad74c:--only straysrecordschecks=1 of 8(pass);verifyrefusesPREGATE_INCOMPLETEnaming the 7 missing checks (pass); a same-tree--only literalsprintsPREGATE_MERGED: kept strays=pass,checks=2 of 8(pass). Evidence verdict: inconclusive, because capture 001 ran the installed main-branch binary by mistake and is recorded as superseded.Eval Results
No prompt-related files changed — evals skipped (eval:select picks no gate cases; CI evals.yml covers the PR profile).
Plan Completion
Plan completion audit: not run (no plan is bound to this branch: bug fix, plan exempt).
TODOS
No TODO items completed in this PR.
Documentation
Status: updated. One factual line was added to docs/troubleshooting.md; there are no blockers.
Scope: the committed diff from 97b796e to c676d76 (pregate verify now refuses a record from a partial run, and a staged rerun on the same tree keeps the checks it skipped), plus the unstaged docs/troubleshooting.md change. Nothing was staged and there were no new files. Every .md and .tmpl file was searched for --stage tests and --only usage.
Documentation health
Coverage debt: none. The verify refusal and the PREGATE_MERGED line have reference coverage in docs/pregate.md and docs/troubleshooting.md and a how-to in the fix text.
Diagram drift: none.
Test plan
Status: ready. /ship finished at ec34bb5: two review passes, the Step 14.5 docs audit, finish and push, the CI carry from free-tests run 42732479322, the macOS named-regressions lane cleared from the same run, and
PREGATE_VERIFY: okat tree c58c4b924efe. The ship receipt is in the Agent notes.Plan: exempt: bug fix
Agent notes
GST-2194, audit GSTA-461 item 2, lane GSTA-465. Scope extensions approved by the Captain: test/gstack-ship-queue.test.ts, test/ship-accept-remote-gate-lanes.test.ts, docs/pregate.md. Rebased onto #4235's landing commit a5bcbc4 with one fixture conflict resolved. Peer note: handoffs/GSTA-465/gbrain-note.md.
REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=3 fixed=1 scope=frozen ledgers_read=4 dispatches=8
Gate edits: 37 listed, 28 read, 0 findings (patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)