Repository navigation
v1.93.7.0 fix(restamp): a branch-added stamp at the fork version moves, and every stamp check accepts it (GST-963) - #3862
Merged
Conversation
…(GST-963) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…d finish (GST-963) A stamp row the branch added at its fork version now passes every stamp check, not only the restamp writer: stampOnlyLine takes the branch side (its own lines and fork version), and stampedFiles, the tree receipt and the receipt carry all pass it. The stamp-only checks move to lib/stamp-only.ts to keep lib/restamp.ts under the module-size ratchet. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…or as the base (GST-963) The train restamp moves a branch-added row left at the predecessor version, so stampMismatch and the three train-verify receipts pass baseRef (the gated commit first parent), and the tree receipt applies the branch side even when the slot keeps its claimed VERSION. Failing-first: test/ship-queue-train-stamp.test.ts refused with QUEUE_TRAIN_STAMP_MISMATCH before this commit; on main the pin stamps but the row stays stale. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…gaps (GST-979, GST-980) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s (GST-979, GST-980) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This was referenced Nov 2, 2026
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.
What changed
A version stamp row that a branch adds at its fork point's version is now treated as that branch's stale stamp once main moves past it.
gstack-restamp --nextrewrites it to the new version, and every check that reads a stamp commit accepts that move on the branch's own line:gstack-ship-release finish, the tree receipt behindgstack-ship-queue stamp/verify, and the merge train's stamp and verify checks. They share one stamp bound,stampOnlyLine(..., side)andbranchSides()in the newlib/stamp-only.ts. A row the base carries at that version, and a row below the fork version, are still left alone and still refused, unless the base row's text duplicates a line the branch added (GST-979). The /ship receipt carry can still refuse the move, and a kept VERSION claim still routes it as behavior in carry and finish (GST-980).Before → after on the gbrain #8425 shape (fork 1.2.3.0, branch adds
since: '1.2.3.0', main moves to 1.2.4.0):skipped("no tentative mention") →done, row moves to the new versionbehavior=1 metadata=1→behavior=0 metadata=2TREE: changed(with only the writer fixed) →same-modulo-stampsstampChainaccepts itWhy
On gbrain #8425 (GBRA-277, GST-963), a branch added a stamp_patterns row naming its fork point's version. After main moved, the restamp skipped the row, so the merged stamp kept the old version. Then finish counted the line as a behavior change and the docs stage flagged a product edit. Fixing only the writer would have been worse. Round-1 review showed the tree receipt and carry still floored every line at the gated VERSION. The stamp commit would read
TREE: changed, and the train would refuse the PR withQUEUE_STAMP_NOT_STAMP_ONLY. So the writer and all four checks now use one bound.Blast radius
This touches release and merge tooling, namely the restamp writer, the finish route, the tree receipt, the train stamp and verify checks, and the receipt carry. It does not touch product skills. The bound only widens on a line the branch itself added (by position for the writer, by text for the checks) and only for versions at or above the fork version, so a base row moved the same way is still refused, unless its text duplicates a branch-added line (GST-979). That was walked in the tests below and in a fixture repro by the reviewers. The Ubicloud remote pregate ran the selected free tier on the frozen tree: 5646 tests, 0 failed.
Scope note. Only the fork version itself is added. Versions below the fork point stay untouched on purpose, because a branch can legitimately add a doc line naming an older release, and the Captain ruled that stays out of scope.
Security read. No network calls, environment reads, secrets, permission changes, workflow, setup, install or dependency changes. Pure version-string comparison over git diffs the tools already read.
Approvals
No approvals recorded for branch gst-963-fork-version-stamp. The two extra fix rounds after round-1 and round-2 review (be94808, 0ead1ce) were granted by GStack Minder under crew rule 23, as relayed by the GSTA-234 lane.
Failing-first proof
skippedinstead ofdonefor both the since: template and the built-in quoted form, and ROUTE countedbehavior=1 docs=0 metadata=1.gstack-tree-receiptprintedTREE: changedfor the GST-963 stamp commit; both GST-963 cases failed. The GST-895 lost-slot stamp passed the receipt in that run and still does.QUEUE_TRAIN_STAMP_MISMATCH: S1 (#1): the stamp changed more than stamps: docs/f.md. On main 69c14b1 the train stamped, but the row stayed at// since: 1.2.3.0instead of// since: 1.2.4.0.GST-895 note. The GST-895 lost-slot case is still covered. Its stale stamp (newer than the fork, older than the gated VERSION) now passes the tree receipt through the same side-aware bound (
the lost-slot stamp passes the tree receipt), and its finish route stays metadata.Test Coverage
Each changed runtime file has a changed test naming it (preflight audit: deterministic coverage).
Tests ran: touched 80 (
gstack-ship-release finishlane at 97595f4: restamp-mentions, ship-rereview-triggers, gstack-ship-receipt-docs, restamp-base-merge, tree-receipt-stamp-sensitive, ship-queue-train-stamp, ship-queue-train-verify; 80 pass, 0 fail)Remote pregate (Ubicloud, owner gsta234) at 97595f4, tree 46e16da0d34c: 5646 tests, 0 failed, $0.05. Earlier runs at 0ead1ce (tree 3e87d526d728) and 5cec99e (tree 6d779508b752) were also 5646/0.
Pre-Landing Review
REVIEW_LOOP: passes=1 blocking_found=2 deferred=0 noted=7 fixed=2 scope=frozen fix_checks=3
From the tool (
gstack-review-scope summary): passes=1, deferred=0, scope=frozen, rounds=1, and the specialist and red-team dispatches. Hand-written because the tool undercounts: blocking_found=2 and fixed=2 (the tool reads 0 because the pass-1 row holds the round-1 findings unclassified, and the two fix-checks have no review-log rows), noted=7 (the open notes below; the tool reads 0), fix_checks=3, and the targeted and outside-voice dispatches (the tool does not count them). The outside voice marked its three findings as blocking; GStack Minder ruled them below the rule 23 floor and they ship as open notes, so blocking_found stays 2.Round 1 (full panel, gate class): specialist (batched) and red-team ran. Red-team CRITICAL, fixed in be94808: the tree receipt and carry did not accept the writer's new move. The voices did not run because the lane stopped at its budget for the Captain's call.
Round 2 (scoped fix-check on be94808): CRITICAL, fixed in 0ead1ce: the train stamp and verify checks passed no
baseRef.Round 3 (scoped fix-check on 0ead1ce, the Captain's last grant): no blocking finding.
Round 4 (scoped review of the one-sentence docs/ship-policy.md hunk in 97595f4, GStack Minder's last grant, after finish routed that gate doc as behavior): NO FINDINGS.
Targeted gate reader (classes=gate, the required check, run once at pin 0ead1ce on the whole frozen diff, no edits after): 2 informational findings, judged at their severity,
VERIFY: clean.Gate edits: UNAVAILABLE — the gate-edit judgment step (Phase 4) did not run under the R51 round cap; the gate-class hunks were read by the red-team and both fix-checks instead.
Outside review: GPT-6.1 Sol (cross-family outside voice, one read-only pass at 0ead1ce on the whole diff) recommended "Request changes" with three findings. GStack Minder chose to ship them as open notes (GST-979, GST-980); see below.
Review notes
Open notes (informational, below the rule 23 floor, not fixed here):
lib/restamp.ts(fork-version add): the fork version is added even when the base has not moved past it. A stamped branch whose base is still at its fork version X, and that adds a stamp-form line naming X, now has that line moved by--next.lib/pregate/remote-receipt.ts:106:substituteStampOnlyTreestill classifies without a side, so a lane stamp that moves the fork version forces a second remote gate on gate-ahead repos. It fails closed and only costs time. Filed as GST-973.lib/stamp-only.ts:31:side.addedholds line text, not positions. A hand edit of a base row whose text equals a branch-added row reads as a stamp (fails open). This is a narrow edge, and stampedFiles already behaved this way under GST-895. The targeted reader raised the same point for the tree receipt and train checks.lib/stamp-only.ts:30,51, rated High by the voice): the same text-not-position gap. A branch that adds a duplicatesince: 1.2.3.0line lets a hand edit of the base copy passbuildReceiptas same-modulo-stamps (reproduced with the copies at lines 10 and 2). Tracked in GST-979.bin/gstack-ship-receipt:511-517): the carry still counts the branch-added row as product, so a valid fork-version stamp after the reviewed VERSION moved getsRECEIPT_CARRY_PRODUCT_CHANGED. It fails closed, and a fresh /ship is the way through. Tracked in GST-980.lib/ship-receipt.ts:205,lib/ship-bin-common.ts:123): when old VERSION equals new VERSION,stampOnlyTextandstampedFilesstill refuse the move the writer and tree receipt now accept, so carry rejects it and finish routes it as behavior. It fails closed. Tracked in GST-980.lib/ship-queue-train-verify.ts:82: plain-trainmergedInat slot 2 and later bounds at T_i's VERSION, not the lane's own fork. A pin row the lane's own restamp moved can still read as "differs from T2". This is not a regression: the fix only widens the old floor.lib/tree-receipt.ts:132(targeted reader): the new|| ownsends a file whose VERSION did not move (oldV === newV) intostampOnlyHunks, andstampOnlyLine's oldV-floor branch still runs on every line. So a base line that moves a newer stamp-form version down to newV (for examplesince: '1.3.0.0'to'1.2.4.0') reads as same-modulo-stamps. Before this diff, oldV === newV always read as changed. The restamp writer never makes that edit, so it takes a hand-made stamp commit. Suggested follow-up: when oldV === newV, accept a line only through the branch-side bound.Issues
ISSUE_LINKS: none. Follow-ups: GST-973 (remote-receipt side), GST-979 (line positions, not text), GST-980 (carry and kept-claim routing).
TODOS
No TODO items completed in this PR.
Documentation
Status: current. Read-only audit of gst-963-fork-version-stamp at 97595f4 (base 69c14b1); no doc corrections needed. The gst963-docs-3 blocker (docs/ship-policy.md Step 4 stamp_paths contradicting the fragment) is resolved by 97595f4.
Scope: 18 committed files in the candidate, with no staged, unstaged or untracked changes. The worktree matched the candidate (head and all 152 hashes). The 135 discovered docs were inventoried; the changed contracts were verified against lib/stamp-only.ts, lib/ship-bin-common.ts and lib/ship-receipt.ts.
Documentation health:
Coverage debt: No new public surface (CLI flag, command or env var); the change alters stamp semantics only. Reference coverage is in docs/ship-policy.md; no tutorial or how-to exists for the fork-version stamp, which is common-gap debt, not a blocker. No ASCII or Mermaid diagram drift found. The GST-980 gaps (carry refusal, VERSION-claim routing) stay documented debt.
The final audit (gst963-docs-4, read-only) was the fourth launch, which is past the Step 14.5 budget of one audit plus one re-audit. Attempt 1 was refused at the install check (the verdict covered another checkout) and audited nothing, but the helper counted it. Attempt 2 was current. Attempt 3 blocked on docs/ship-policy.md Step 4 still claiming the carry accepts the move, which 97595f4 corrected under GStack Minder's grant.
Test plan
gstack-ship-release finishlanetouchedat 97595f4 (7 files, git.real first on PATH to sidestep the local Capy git-shim log): 80 pass, 0 failUBI_OWNER=gsta234 gstack-pregate --stage tests --remote --spend-cap 2 --timeout 2700 --allow-repo-commandsat 97595f4: 5646 tests, 0 failed on tree 46e16da0d34cbun run typecheck: 0 errors