Repository navigation
v1.91.282.0 fix(ship-queue): one CHANGELOG rule before and after the merge, base keys stay in slot stamps, a stacked child carries past its released parent - #3518
Conversation
…-child carry (GSTA-129) Four train-24 (GSTA-96) defects in one change. verify --train applies the same CHANGELOG rule before and after the merge: main's CHANGELOG plus the PR's own lines (its authored diff plus what mergeChangelogs writes for it). A head the pre-merge verify accepted no longer freezes the queue after its squash merge, and a freeze record lists a slot GitHub reports MERGED as merged. restamp's stamp_paths stage leaves a *_KEY_VERSION line the base introduced after the fork point alone, base merge committed or staged, and says so. mergeChangelogs with a base carries a stacked child's edits to its released parent entry as "Correction to the <version> entry below" bullets under the child's own Gate integrity section instead of returning null; the slot one-liner prints each carried correction. #3453's two 1.91.276.0 corrections are restored that way here. The digest-freshness defect is already closed by #3451 (regeneratedAtBase); docs/ship-policy.md now says how an unstamped generator change ships. Docs: ship-policy § Run a merge train, captain.md § Merge trains and the slot-call template carry the stamp-files and stacked-child rules. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… no-own-entry refusal, fail-closed base diff (GSTA-129) Pre-landing review pass 1 (six specialists and the Red Team, all INFORMATIONAL): - mergeStep unions the carried child from slot 2 on, so a stacked child behind another slot never repeats its released parent's text under a second [Unreleased] (Red Team, lib/ship-queue-train.ts). - stopped() freezes the queue when any slot is MERGED on GitHub, so a slot-1 squash that fails the post-merge check no longer answers "nothing merged" (Red Team, lib/ship-queue-train-verify.ts). - ownEntryAboveMain refuses a CHANGELOG equal to main's: no entry of the PR's own (state-machines, lib/changelog-check.ts). - branchAddedLines refuses when the base diff cannot run instead of reading it as "nothing added" (Red Team, lib/restamp.ts). - slot-call.md and docs/captain.md name the stamp files as the ones the slot call names, STAMP_FILES plus a *_KEY_VERSION file the PR introduced, matching docs/ship-policy.md (maintainability). Also: the coverage tests Step 7 added (post-merge parent check, carry shapes), and two dependency-map rows (test/helpers/free-fixtures-data.ts for the merge-train-3453 fixtures, scripts/test-pr-profile.ts for captain/templates/**) so the paid-gate selector and the FREE_FIXTURES inventory accept the new files. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ever "nothing merged" (GSTA-129)
stopped() read prState's 'unreadable' as "not merged": with nothing in
t.merged, a slot-1 squash already on main while gh pr view failed answered
"nothing of the train merged, so the queue is not frozen". It now refuses with
QUEUE_PROOF_MISSING ("whether #<n> merged on GitHub could not be read, so
whether the queue must freeze is unknown") and asks for the verify to be rerun;
no freeze, no backstop. Raised independently by five pass-2 reviewers.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…shipped train rules (GSTA-129) The /document-release audit (edit mode) corrected two docs the PR had not reached: docs/troubleshooting.md's QUEUE_TRAIN_TREE_MISMATCH, QUEUE_PROOF_MISSING, QUEUE_TRAIN_FROZEN and POLICY_SOURCE_UNAVAILABLE entries, and docs/ship-policy.md's train build conflict rule (the carried stacked child is the exception), the verify freeze paragraph (slot-1 GitHub-MERGED freeze, unreadable-state refusal) and the restamp stamp_paths stage (base-added lines stay; an unrunnable base diff refuses). Five mid-sentence colons in the PR's own paragraphs are rewritten for the prose lint, and the CHANGELOG Docs bullet names docs/troubleshooting.md. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…al at version 6 (GSTA-129) The remote free tier's only red was the HARNESS_VERSION guard: scripts/test-pr-profile.ts is a pinned shared-harness file and gained the captain/templates/** FREE_ONLY_PR_FILES row. Recorded with bump-harness-version.ts --non-behavioral: no paid case reads the crew templates, so no selection, input or verdict changes and no pass-rate series resets. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
CI's typecheck:test ratchet refused one new TS2698 (spread of a loosely typed fixture row) in the slot-1 freeze test; the row is read as any, as the neighbouring state writes already do. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…hat decided to freeze freezeQueue took a second prState read per unverified slot and filed anything but an exact MERGED under unmerged, so a slot that read MERGED at stopped() and was unreadable a moment later was recorded as unmerged (the record half of train 24's #3453 misfile). stopped() now reads each unverified slot once and passes those states in; a MERGED slot stays merged, and a slot unreadable beside a merged one is kept out of unmerged and named in the reason. The fixture's gh shim gains a per-PR vanish count so a test can change GitHub's answer between two reads. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ged one The freeze reason, docs and CHANGELOG said the slot was kept out of unmerged 'until read', but nothing reads it again: the NEXT after the repair is built from unmerged alone. Say so (the operator seats it in a train by hand once gh answers) and pin the record shape with a test. 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> # Conflicts: # CHANGELOG.md # scripts/harness-version.json # scripts/test-pr-profile.ts
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.31 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 40575759184 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> # Conflicts: # CHANGELOG.md
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
What changed
A head the pre-merge verify accepted used to freeze the queue after its squash merge (train 24: a $31 backstop); post-merge now applies the same CHANGELOG rule and confirms the slot.
Before/after as text: A head the pre-merge verify accepted used to freeze the queue after its squash merge (train 24: a $31 backstop); post-merge now applies the same CHANGELOG rule and confirms the slot.
The slot one-liner refused #3453's CHANGELOG, so the lane hand-resolved it and two wording fixes to the released 1.91.276.0 entry were lost; the merge now carries them as Gate integrity corrections in the child's own entry.
Before/after as text: The slot one-liner refused #3453's CHANGELOG, so the lane hand-resolved it and two wording fixes to the released 1.91.276.0 entry were lost; the merge now carries them as Gate integrity corrections in the child's own entry.
Why
GSTA-96 (train 24, 2026-10-27) asked: "The rule the pre-merge path applies to CHANGELOG.md must be the same rule the post-merge path applies, and the freeze record must not list a merged PR (#3453) as unmerged." The train merged #3434 and #3453, then froze on #3453's post-merge check and paid a $31 backstop, because the pre-merge verify accepted the lane's CHANGELOG as main's plus the pin's own entry while the post-merge check compared main to T2 section by section. In both slots
gstack-restampalso listedlib/ship-policy.tsas a fifth stamp file and moved main's ownDOCS_CAPS_KEY_VERSION, and the slot one-liner refused #3453's stacked CHANGELOG so two wording fixes to the released 1.91.276.0 entry were lost. After this PR a merge the pre-merge verify accepted confirms post-merge under the same rule, a freeze lists a slot GitHub reports MERGED as merged, the restamp leaves lines the base added alone, and a stacked child's edits to its released parent become Gate integrity corrections in its own entry (restored here for #3453's two edits).Blast radius
Four library modules (
lib/ship-queue-train-verify.ts,lib/ship-queue-train.ts,lib/changelog-check.ts,lib/restamp.ts) behindgstack-ship-queue verify --train,train buildandgstack-restamp, plus the docs and the slot-call template that describe them. The released 1.91.276.0, 1.91.277.0 and 1.91.278.0 CHANGELOG sections stay byte for byte main's (changelogDamageandverifycheck this; QA probe 005 read the diff against origin/main and found zero removed lines), the real train-24 CHANGELOGs are fixtures undertest/fixtures/merge-train-3453/, and every new rule has a test that fails at the base (regression proof below).lib/ship-policy.ts,.gstack/ship-policy.json, the paid gate and its thresholds are untouched. One file beyond the lane's owned list changes by one row:test/helpers/free-fixtures-data.tsregisters the new fixtures in the FREE_FIXTURES inventory. Thecaptain/templates/**row this PR had added toscripts/test-pr-profile.ts(with itsscripts/harness-version.jsonpin) landed on main in #3499 first; the merges of main 703b004 (v1.91.280.0) and 392f50d (v1.91.281.0), one merge commit each under GStack Minder's rule-19 grants, CHANGELOG by section with the released entries byte for byte main's, take main's content for both files, so against main they are unchanged. The released 1.91.279.0, 1.91.280.0 and 1.91.281.0 sections are main's as well.Approvals
No approvals recorded for branch gsta129-train-tooling.
Summary
Train 24 froze a queue the pre-merge verify had already cleared and stamped a file it should not have; this PR makes the train's tooling apply one CHANGELOG rule before and after the merge, keep the base's lines out of a slot stamp, and carry a stacked child past its released parent instead of refusing. Commit themes: the verify and freeze rules (
published,freezeQueue,stopped), the restampstamp_pathsprovenance rule,mergeChangelogs' carry (carryReleasedParent,mergeChangelogsWithNotes) andmergeStep's carried union, three review-pass fixes, the docs audit's corrections to docs/ship-policy.md and docs/troubleshooting.md, and the HARNESS_VERSION record the remote free tier asked for.Defect 4 (digest freshness) turned out to be closed already by #3451 (
regeneratedAtBase); docs/ship-policy.md now says how an unstamped head changes a release output. The #3514-slot datum: #3514 forked at 1.91.273.0, so 1.91.270.0 was never a tentative candidate for its restamp; GSTA-96's pins forked earlier, which is why the same code moved the key there. The restamp code was not the difference.Test Coverage
All new code paths have test coverage. Coverage: 87% value-weighted (26 of 30 paths by any test before rating; the three remaining paths were rated ★★★ by the read-only rating dispatch, weak gaps none).
Test value: 13 tests written (2 of them added by the Step 7 coverage dispatch, 2 by the pass-4 freeze-record fix), 0 rejected by the authoring gate, 2 existing tests extended, 0 paths weakly covered.
Regression proof (each fails at the base and passes here; proved by reverse-applying the fix range in a scratch copy during review pass 2): the train-24 post-merge confirm, the MERGED-slot freeze record, the slot-1 GitHub-MERGED freeze and unreadable-state refusal, the stacked child behind another slot (carried union),
ownEntryAboveMain's no-own-entry refusal,branchAddedLines' fail-closed base diff, the train-24mergeChangelogscarry on the real CHANGELOGs, and the restamp base-merge key test for a key older than and equal to the base version, and the freeze record built from stopped()'s one GitHub read (fails at 73a678e withunmerged #1,#2).Tests ran: focused free lanes 141 (8 files,
--timeout=30000, on the final tree c98f7b1, which merges main 392f50d (v1.91.281.0) under GStack Minder's second rule-19 grant after the first screen came back red on an unchanged judge case; train files 84 of those; docs tests 264;bun run typecheck0 errors; mapping tests 153 (eval-select profile and free-fixtures inventory). Remote free tier: see the receipt's pregate record.Pre-Landing Review
Pass 1 (six specialists and the Red Team): six INFORMATIONAL findings, five fixed in a2077ff (
mergeStepunioned the uncarried child from slot 2 on;stopped()keyed the freeze ont.mergedalone;ownEntryAboveMainaccepted a CHANGELOG equal to main's;branchAddedLinesread a failed base diff as "nothing added"; slot-call.md and docs/captain.md contradicted docs/ship-policy.md on a*_KEY_VERSIONstamp file), one noted. Pass 2 (seven reviewers): nothing blocking; five of them independently flagged thatstopped()read an unreadablegh pr viewas "not merged", fixed in ada2acc as aQUEUE_PROOF_MISSINGrefusal although it sat below the floor, because the fail-open was in pass 1's own fix. Pass 3: nothing blocking, no edits. Pass 4 (GStack Minder's rule-23 word for one pass beyond the cap, on the range 73a678e..5905c76 that fixes thefreezeQueuesecond read): five specialists, six INFORMATIONAL findings, five fixed in 351cc55 (the reason, docs and CHANGELOG promised a later read of an unreadable slot that no code performs; the unreadable-beside-merged cell had no test), one noted.REVIEW_LOOP: passes=4 blocking_found=0 deferred=0 noted=7 fixed=11 scope=frozen
Gate edits: none detected (11 listed, 1 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none). The one read hunk is an import line in test/changelog-merge-damage.test.ts.
Outside review: unavailable (Codex not installed on this machine), listed as missing coverage. The Claude adversarial pass completed: one FIXABLE (the
freezeQueuesecond read, fixed in 5905c76 on GStack Minder's word) and one INVESTIGATE (a sustainedghoutage after a bad slot-1 squash leaves main unfrozen, sinceverifyis the only writer of a freeze and no manual freeze command exists).Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR. One pass-3 note was fixed after the loop closed, on GStack Minder's word (it is defect 1's record half): freezeQueue re-read GitHub per unverified slot after stopped() had read it, so a slot that read MERGED and was unreadable a moment later was filed under
unmerged; the record is now built from stopped()'s one read, with a test that changes GitHub's answer between two reads. Pass 4 (five specialists on that range, all informational) fixed its own wording in 351cc55: the reason, docs and CHANGELOG said an unreadable slot beside a merged one was kept out ofunmerged"until read", but nothing reads it again, so they now say the operator seats it in a train by hand oncegh pr viewanswers, and a test pins that record (merged [1], unmerged []).INFORMATIONAL
lib/ship-queue-train-verify.ts:128freezeQueue recomputes the unverified slots from t.slots instead of the states Map its caller built over the same filter, so the two sets agree by convention; a second caller with a narrower Map would file a missing slot under unmergedINFORMATIONAL
lib/changelog-check.ts:303a child bullet appended at the end of a shared sub-list inside the parent's entry is attributed to the parent as an Addition; a child that edits every block of the parent's entry skips the carry and keeps the duplicated parent textINFORMATIONAL
lib/restamp.ts:524(a) a failed base diff reads as 'nothing added' and moves base lines again; (b) base-added exclusion matches by line text across the file; (c) the gate-ahead and gate callers of mergeChangelogs discard the carry notesINFORMATIONAL [ADVISORY]
lib/ship-queue-train.ts:184own runs carryReleasedParent eagerly on every CHANGELOG step although it is read only when mergeChangelogs returned null (also raised by maintainability)INFORMATIONAL
test/restamp-base-merge.test.ts:111the fail-closed test calls branchAddedLines directly; nothing drives restamp() to show the refusal surfaces as status refused with an untouched worktreeINFORMATIONAL
lib/ship-queue-train-verify.ts:189untested cell: slot-1 × stop-moved with the slot MERGED on GitHub but not in t.merged (shares the landed test with the tested tree-mismatch cell)INFORMATIONAL
test/ship-queue-train.test.ts:1026untested cell: unreadable-no-merged × moved-stop (shares stopped() with the covered TREE_MISMATCH cell)Of the
lib/restamp.ts:524note, part (a) is fixed in a2077ff; parts (b) and (c) stand as noted.Exploratory QA
Seven probes under
.gstack/qa-reports/gsta129-ship(evidence verdict pass): the carry on the real train-24 CHANGELOGs (merged, 2 corrections, released 1.91.276.0 entry unchanged), the no-base case stays null,changelogDamagestill refuses the merge-train-3345 dropped heading, the CHANGELOG diff against origin/main removes 0 lines, PROSE_LINT ok, and the restamp base-merge tests. Not run: a live train (no train is building; the fixture trains in test/ship-queue-train.test.ts stand in).Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped (
bun run scripts/eval-select.tsprints Profile: pr (dependents) after the two dependency-map rows).Plan Completion
Plan audit: no item NOT DONE or PARTIAL; defect 4 CHANGED (already closed by #3451, documented instead of re-fixed); the plan's ship, report and trail items were unverifiable at audit time and are done by this PR and the READY.
Issues
Refs #3451
Refs #3453
Documentation
Status: updated — two docs outside the PR's own edits corrected to the shipped behaviour; no blockers.
Scope. Audited the 17-file diff 1f246e3..ada2acc (lib/ship-queue-train.ts, lib/ship-queue-train-verify.ts, lib/changelog-check.ts, lib/restamp.ts, their tests and fixtures) against the docs the PR touched (docs/ship-policy.md § Run a merge train, docs/captain.md § Merge trains, captain/templates/slot-call.md, the CHANGELOG entry) and every other doc naming train, stamp, freeze or CHANGELOG-merge behaviour (docs/troubleshooting.md, captain/SKILL.md.tmpl, docs/recommended-harness.md, docs/pregate.md, docs/unattended.md, docs/review-policy.md, README, CONTRIBUTING, ARCHITECTURE, TESTING_INTERNALS). The PR's own doc changes match the code: the one CHANGELOG rule and its
main:line, the stamp files the slot call names, the stacked-child carry and its correction bullets, the GitHub-MERGED freeze record, theQUEUE_PROOF_MISSINGrefusal, and the base-added*_KEY_VERSIONline staying.Documentation health.
QUEUE_PROOF_MISSINGrefusal on an unreadable state; restamp stage 4 states that base-added lines since the fork point stay and that an unrunnable base diff refuses withPOLICY_SOURCE_UNAVAILABLE).QUEUE_TRAIN_TREE_MISMATCHmeaning/fix,QUEUE_PROOF_MISSINGtrain use,QUEUE_TRAIN_FROZENmerged list,POLICY_SOURCE_UNAVAILABLErestamp case).### Docsbullet does not list docs/troubleshooting.md).Coverage debt. Reference, how-to and explanation coverage exist for the four changed surfaces (post-merge CHANGELOG rule,
QUEUE_PROOF_MISSINGon unreadable GitHub state, restamp base-added lines,mergeChangelogsWithNotes/carryReleasedParent); none has a tutorial, which is the existing state for all controller tooling.prStateexport and theFREE_ONLY_PR_FILES/FREE_FIXTURESrows are internal. Diagram drift: none.Test plan
bun --no-env-file --config=/dev/null test test/ship-queue-train.test.ts test/changelog-merge-damage.test.ts test/restamp-base-merge.test.ts test/captain-skill.test.ts test/free-fixtures.test.ts test/gstack-restamp-queue.test.ts test/ship-queue-train-logic.test.ts test/gstack-ship-queue.test.ts --timeout=30000on the final tree c98f7b1: 141 pass, 0 fail (train files 84 of those)bun --no-env-file --config=/dev/null test test/troubleshooting-anchors.test.ts test/captain-skill.test.ts: 264 pass, 0 failbun run typecheck: 0 errors;bun run typecheck:test: 819 known diagnostics, none newbun --no-env-file --config=/dev/null bin/gstack-prose-lint CHANGELOG.md docs/ship-policy.md docs/troubleshooting.md docs/captain.md captain/templates/slot-call.md --base origin/main --gate: PROSE_LINT: ok files=5gstack-pregate --stage all --remote --spend-cap 2 --timeout 2700 --allow-repo-commands: run 10 on c98f7b1, remote free tier 11329 tests 0 failed ($0.05), 7 local checks, two requires-remote lanes (macOS named regressions, Windows shard) cleared from the head's own CI runs🤖 Generated with Claude Code