Repository navigation
v1.91.278.0 fix(ship-queue): readiness takes dispatched Free Tests, stamp paths accept tentative key versions, ready and train build read the base overlap, pr-wait --exclude, restamp prints the corrected order - #3514
Merged
Merged
Conversation
…eads key=value pairs, stamp paths accept tentative key versions, ready and train build read the base overlap, pr-wait --exclude, restamp prints the corrected order Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
Pass 1 of /ship's review on #3514: the prose check skips a key: value pair's value whatever the whitespace, the restamp recompute keeps a merged-not-in-base predecessor and says to fetch, stampOnlyLine applies the version-width bound, pr-wait --exclude excludes nothing while the required checks are unreadable, baseOverlap reports a failed git read as unknown and gives no verdict at train build, readiness lets a pull_request run outrank a dispatched one, and the READY conflict refusal follows the crew template's rule 14 instead of a crew-local rule. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…QUEUE_STALE merged-not-in-base fix Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
MERGE_CONDITION: sha=89d173c036fd34e456df496f303c94c04edca758 next: NEW_VERSION=1.91.278.0; commit and push only the stamp diff above (FILES), with no edit of your own: the train's verify accepts the CHANGELOG only as the base's plus this PR's entry re-headed; merge with the expected head 89d173c and recompute on a stale queue. GSTACK_RESULT: skill=restamp status=complete run=/workspace/gstack/.gstack/tmp/restamp-journal.json Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
5 tasks done
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.
Why
A merge-train lane kept getting refused for things the tooling itself could see. A head whose only conflict with main was the CHANGELOG got its Free Tests through the dispatch route and the paid screen still called it NOT-RUN (#3508). The receipt-versus-prose check read the canonical
REVIEW_LOOP:line, with itskey=valuecounters, as a false mismatch (#3513). A PR that writes a new*_KEY_VERSIONconstant as a tentative next-minor version, the convention #3511 introduces, could not clear the train's stamp-only receipt (#3512). A pooled pin learned that main had moved onto its files only when the train was built, and a filling train'sQUEUE_TRAIN_WAITINGproved nothing about conflicts (handoff GSTA-119, #3485).gstack-pr-waithad no way to leave a stuck non-required check out of its verdict (#3495 follow-up). And a lane that passed the slot call's remaining order togstack-restampwithout its own PR got the same stale list back as the fix.Summary
Six fixes to the ship-queue and readiness tooling, each with a regression test. Readiness accepts a
workflow_dispatchFree Tests run at the exact head when no pull_request run exists there. The prose check reads akey=valueorkey: valuepair's number as that key's claim alone. The tree receipt, the carry and the train's tree-modulo-stamps digest accept a stamp-paths line whose stamp-form version moved to the released version from a tentative value of the same width not older than the gated head's.gstack-ship-queue readyandtrain buildread the base-overlap fact from git and run the scratch merges before the fill rule; a git read that fails printsconflicts unknownand refuses nothing.gstack-pr-waitgains--exclude, inert while the required set cannot be read. The restamp'sQUEUE_STALErefusal prints the corrected--expect-order, keeping a merged-not-in-base predecessor withfix: git fetch origin <base>.#3512 design options
The issue asked the stamp-only receipt to accept a
*_KEY_VERSIONconstant written tentatively. Three bounds were considered: (a) accept any stamp-form rewrite to the new version whatever the old value, which lets a hand-moved released key through the receipt; (b) accept only the exact gated version, which is what refused #3511's constant; (c) accept a rewrite whose old value is at least the gated head's version and of the repo's version width. (c) is what shipped: the stamp commit stays tool output, and a hand-moved released key or a 3-digit pin stayschanged.Blast radius
The train's verify path (
sameModuloStamps,mergedIn) now accepts a stamp commit that moves a tentative key version; the bound that keeps a hand-moved released keychangedis the gated head's version and the repo's version width (lib/restamp.tsstampOnlyLine), proven by the tree-receipt and train-gate fixtures (walked and run).train buildwrites the dry-run prefix commits into object storage on every call instead of only at dispatch; they are deterministic (fixed identity and date), so the same pins give the same objects. Readiness now lets apull_requestrun at the head outrank a dispatched run, so a red pull_request run is no longer overridden by a green dispatch (scripts/eval-readiness.ts, test both ways).Files touched
Commit 0ac5c6f (the six fixes):
scripts/eval-readiness.ts,test/eval-readiness.test.ts,docs/TESTING_INTERNALS.md,lib/ship-receipt-prose.ts,test/ship-receipt-prose.test.ts,lib/restamp.ts,lib/tree-receipt.ts,lib/ship-receipt.ts,bin/gstack-ship-receipt,scripts/train-gate.ts,test/tree-receipt-stamp-sensitive.test.ts,test/train-gate.test.ts,test/gstack-ship-receipt-docs.test.ts,lib/ship-queue-train.ts,lib/ship-queue-train-ready.ts,test/ship-queue-train.test.ts,test/ship-queue-train-ops.test.ts,docs/ship-policy.md,lib/pr-wait.ts,bin/gstack-pr-wait,test/pr-wait.test.ts,docs/standalone-binaries.md,test/gstack-restamp-queue.test.ts,docs/troubleshooting.md,CHANGELOG.md.Commit 957be63 (pass-1 review fixes):
lib/pr-wait-github.ts(new in the diff) plusCHANGELOG.md,docs/TESTING_INTERNALS.md,docs/ship-policy.md,docs/troubleshooting.md,lib/pr-wait.ts,lib/restamp.ts,lib/ship-queue-train-ready.ts,lib/ship-queue-train.ts,lib/ship-receipt-prose.ts,scripts/eval-readiness.tsand the teststest/eval-readiness.test.ts,test/gstack-restamp-queue.test.ts,test/gstack-ship-receipt-docs.test.ts,test/pr-wait.test.ts,test/ship-queue-train-ops.test.ts,test/ship-queue-train.test.ts,test/ship-receipt-prose.test.ts,test/tree-receipt-stamp-sensitive.test.ts.Commit 89d173c (docs audit):
docs/ship-policy.md,docs/pregate.md,docs/troubleshooting.md.The PR conflicts with main on
CHANGELOG.mdalone (main moved to d87eec9, v1.91.274.0); main was not merged (crew rule 19, no grant) and the train merges CHANGELOGs additively. GitHub schedules no pull_request run on the conflicted head, so Free Tests and Windows Free Tests were dispatched at the head (the dispatch route in docs/ship-policy.md) and clear the pregate's remote obligations.What changed
gstack-pr-wait gains
--exclude: a stuck non-required check can be left out of the verdict; a check the base requires is refused and still gates. The five other fixes are CLI-output and library changes without a visible surface; their before/after is the regression tests named under Test Coverage.Before/after as text: gstack-pr-wait gains --exclude: a stuck non-required check can be left out of the verdict; a check the base requires is refused and still gates
Approvals
No approvals recorded for branch capy/ship-queue-backlog-3508-3513-3512.
Test Coverage
Each fix carries its regression test:
test/eval-readiness.test.ts(dispatched run decides when no pull_request run exists; a pull_request run outranks a dispatch both ways),test/ship-receipt-prose.test.ts(the canonicalREVIEW_LOOPline in itskey=valueandkey: valuespellings, a one-pass line with no blocking findings),test/tree-receipt-stamp-sensitive.test.tsandtest/train-gate.test.ts(tentative key moved by the stamp is stamp-only; a hand-moved released key, an older version or another width stays changed),test/ship-queue-train.test.tsandtest/ship-queue-train-ops.test.ts(BASE_OVERLAP and MERGE_CHECK lines atreadyandtrain build, QUEUE_TRAIN_CONFLICT at slot 1 while the train fills, the unknown line on a failed git read),test/pr-wait.test.ts(--exclude parsing, an excluded failing check does not block, a required name is refused, an unreadable required set refuses every exclusion),test/gstack-restamp-queue.test.ts(QUEUE_STALE prints the corrected order; merged-not-in-base is kept with the fetch fix). The Step 7 coverage audit's numeric summary was not retained in this run's record, so no value-weighted percentage is claimed.Tests ran: remote free tier 10750 (Ubicloud, tree 215aaf431547, 0 failed).
Pre-Landing Review
Two passes over the frozen in-diff scope. Pass 1 (whole branch, DIFF_BASE a1934a1): testing, maintainability, security, performance, simplification, state-machines and Red Team returned 12 informational findings, 8 fixed in commit 957be63 (the
key: Nwhitespace skip in the prose check; correctedOrder keeps a merged-not-in-base predecessor and QUEUE_STALE names the fetch; stampOnlyLine refuses a moved mention of another version width;--excludeis inert while the required set is unknown; baseOverlap reports a failed git read as unknown and train build prints the files without a verdict; a pull_request run outranks a dispatched run; the READY fix text follows the crew template's rule 14; the "crew rule 25" wording replaced). Pass 2 over 0ac5c6f..957be63 returned 9 informational findings, none at the blocking floor, all recorded below. Adversarial pass (Claude subagent, same range): 1 Medium INVESTIGATE and 2 Low FIXABLE, below the floor, recorded below with the controller decision they need.REVIEW_LOOP: passes=2 blocking_found=0 deferred=0 noted=13 fixed=8 scope=frozen
Gate edits: none detected (listed=17 eligible=5 inspected=5 unread=0; every eligible hunk is this branch's own test edit, none a relaxation; coverage RH-1, RH-3, RH-4, RH-12, RH-13, RH-14, RH-15, RH-16)
Outside review: unavailable — Codex is not installed on this machine (
codex_reviewsunset), so outside coverage is missing; the native adversarial pass ran.Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
Pass 1:
scripts/train-gate.ts:150stampFreeText collapses every stamp-form mention, so the backstop digest cannot tell a train stamp from a hand edit that only moves a versionlib/pr-wait.ts:142--exclude takes a comma list (and repeats) while gstack-ci-gate --exclude takes one name per flag, though the usage claims paritylib/pr-wait.ts:319private excluded() has one caller and restates the dropped filter poll() computes inlinelib/restamp.ts:310tentativeMentions still runs its own scanner loops; stampMentions() below is that scanPass 2:
lib/restamp.ts:139the merged-not-in-base fetch hint and fix cover ahead PRs only; a behind PR in that state is kept in the corrected order with no hintdocs/ship-policy.md:473docs and CHANGELOG cite 'the crew template's sibling trial merge', which captain/templates/CREW.md does not holdlib/pr-wait-github.ts:213a classic-protection 403 (non-admin token) sets known=false, so --exclude is inert for such tokens even when the rulesets read returned the complete setlib/ship-queue-train.ts:218the unknown BASE_OVERLAP reason reads the failed git call's stdout (empty) so the parenthetical is always 'git read failed'test/tree-receipt-stamp-sensitive.test.ts:62the extended Deferred review finding: lib/tree-receipt.ts:53 — stampOnlyHunks accepts a removed/added pair only as rewriteStamps(remo #3512 test overruns bun's default 5 s per-test timeout when run bare (8.1 s here; 6.6 s before the change); the shard runner's 30 s hides it in CIlib/ship-receipt-prose.ts:52the pair-value skip could fold into the lookbehind and drop the Set and the exec looplib/ship-queue-train.ts:226mergeStep's own git failures come back as parenthesised conflicts entries, so ready --no-screen refuses QUEUE_TRAIN_CONFLICT for an environment failurelib/restamp.ts:141a CLOSED or unknown predecessor is reported as 'must merge before this PR stamps' and kept in the corrected order, so the recompute repeats the refusalscripts/eval-readiness.ts:133the runs listing is one page of 20 at the head across events; with 20+ dispatches the pull_request run falls off the page and a dispatched run decidesAdversarial pass (Claude subagent):
lib/pr-wait-github.ts:212any non-404 failure on either required-checks source sets known=false, and the classic-protection read returns 403 for a token without admin scope, so under the usual Actions token --exclude is refused on every run (fails safe, but gstack-ci-gate reads required-ness fromgh pr checks --requiredand its overrides work for the same token). Controller decision: treat a classic 403 as "rulesets suffice", keep refusing and reword the docs, or fall back togh pr checks --required.lib/ship-queue-train.ts:225mergeStep reports infrastructure failures ((git merge-tree failed: …),(cannot stage …)) as pseudo-conflicts, so ready --no-screen refuses QUEUE_TRAIN_CONFLICT with the error text as the file; mapping entries that start with(to the unknown line would follow the rule this range adds.lib/restamp.ts:146for a merged-not-in-base predecessor the printed recompute pins --expect-base to the local base the fix tells the lane to fetch past, so the sequence converges in three refusals; omit --expect-base from that recompute.Exploratory QA
Two passes of bun-native and CLI probes against the changed contracts, read-only on this checkout (
.gstack/qa-reports/ship-3514-p1,ship-3514-p2, gitignored). Pass 1 (12 probes) reproduced three defects red before the pass-1 fixes and revalidated them green after: thekey: Nspelling produced false prose mismatches, correctedOrder dropped a merged-not-in-base predecessor, stampOnlyLine accepted a width-mismatched mention; the usage, the empty--excluderefusal, the dispatched-run precedence and the baseOverlap unknown line matched expectation. Pass 2 (6 probes at 957be63) covered the same contracts on the clean tree; every probe matched expectation. Verdict both passes: pass.Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Greptile Review
No Greptile comments.
Plan Completion
No plan file was present for this branch; the lane's scope was the Captain's six-item list, all six delivered.
Issues
Fixes #3508
Fixes #3512
Fixes #3513
Refs #3514
Related: #3510 (@shahinsamiur)
Verification Results
No Step 8.1 obligations were recorded (no plan file). The focused suites, the guard suites, the typecheck and the typecheck:test ratchet were rerun at the final head and are listed under Test plan; the remote free tier ran on the final tree.
TODOS
TODOS.md does not exist in this repository; no TODO items completed in this PR.
Documentation
Status: updated — three docs corrected for the #3512 stamp rule and the #3513 prose rule, plus the QUEUE_STALE merged-not-in-base fix; no blockers.
Scope. The PR branch (#3514) against
a1934a1(26 committed files, no staged/unstaged/untracked content):gstack-pr-wait --exclude, theBASE_OVERLAP:/MERGE_CHECK:lines atreadyandtrain build,QUEUE_TRAIN_CONFLICTat READY, the correctedgstack-restamp --expect-orderrecompute, readiness acceptingworkflow_dispatchFree Tests, the tentative-key stamp rule (stampOnlyLine,stampFreeTree,stampOnlyText) andkey=valueprose parsing. Each doc claim the branch added was checked against the source;gstack-banned-termsfound no list.Doc diff.
docs/ship-policy.md: carry rule and tree-receipt hunk rule now say a stamp path's rewrite may also move a newer tentative same-width version (older or other-width versions stay hand edits, #3512); prose-against-the-receipt notes akey=/key:value is that key's claim alone (#3513).docs/pregate.md: the remote-receipt paragraph citing the tree receipt's version rule gets the same #3512 clause.docs/troubleshooting.mdQUEUE_STALE: the Fix covers amerged-not-in-basepredecessor and itsfix: git fetch origin <base>.Documentation health:
README.md Current
AGENTS.md / CLAUDE.md Current
ARCHITECTURE.md Current (no diagram names a touched module)
CONTRIBUTING.md Current
CHANGELOG.md Current (untouched;
[Unreleased]covers every change)docs/ship-policy.md Updated (stamp rules #3512, prose clause #3513)
docs/pregate.md Updated (tree-receipt version rule #3512)
docs/troubleshooting.md Updated (QUEUE_STALE merged-not-in-base fix)
docs/standalone-binaries.md Current (branch's
--excluderow verified)docs/TESTING_INTERNALS.md Current (branch's readiness paragraph verified)
TODOS.md Skipped (file does not exist)
Documentation coverage (reference / how-to / tutorial / explanation):
gstack-pr-wait --exclude ✅ ✅ ❌ ✅
BASE_OVERLAP / MERGE_CHECK / ready conflict ✅ ✅ ❌ ✅
gstack-restamp --expect-order recompute ✅ ✅ ❌ ✅
readiness workflow_dispatch ✅ ❌ ❌ ✅
tentative-key stamp rule ✅ ❌ ❌ ✅
key=value prose parsing ✅ ❌ ❌ ✅
Debt. No critical gaps. Common gap, pre-existing: no tutorial walks the ship queue end to end, and
docs/ship-policy.mdis not linked from README.md, CLAUDE.md or CONTRIBUTING.md directly. Diagram drift: none.Test plan
bun run typecheck: clean (gstack-evidence label typecheck, exit 0, count unavailable)bun test test/ship-queue-train.test.ts test/ship-queue-train-ops.test.ts test/train-gate.test.ts test/pr-wait.test.ts test/eval-readiness.test.ts test/ship-receipt-prose.test.ts test/gstack-ship-receipt-docs.test.ts test/tree-receipt-stamp-sensitive.test.ts test/gstack-restamp-queue.test.ts --timeout 60000: 180 pass, 0 fail (label focused)bun test test/changelog-guards.test.ts test/troubleshooting-anchors.test.ts test/module-size-ratchet.test.ts test/testing-internals-anchors.test.ts --timeout 60000: 264 pass, 0 fail (label guards)bun test test/testing-internals-anchors.test.ts test/typecheck-test-ratchet.test.ts --timeout 60000: 10 pass, 0 fail (label anchors)bun run typecheck:test: 819 known diagnostics, none new (label typecheck-test)gstack-prose-lint CHANGELOG.md docs/ship-policy.md docs/pregate.md docs/troubleshooting.md --base origin/main --gate: okgstack-pregate --allow-repo-commandsthengstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commands: remote free tier on Ubicloud, 10750 pass, 0 fail on tree 215aaf431547 ($0.05); secrets stage warns on 43 MEDIUM non-credential pii.phone.e164 / pii.ip_public matches, all 4-part version strings in test filesgstack-pregate clear --remote … --run-url, thengstack-pregate verify)🤖 Generated with Claude Code