Repository navigation
v1.91.238.0 fix(ship): gate-diff base in single-branch clones, gstack-post release versions and receipt ids, evidence tests_ran, restamp duplicate headings and stamp prompt (GSTA-102) - #3439
Merged
Conversation
|
😎 This pull request was merged. |
garrytan
force-pushed
the
fix/ship-friction-gate-diff-post-evidence
branch
2 times, most recently
from
October 26, 2026 03:53
902442f to
1c813ae
Compare
…h exists; the no_base fix line fetches into the tracking ref Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…n ids are not pii.ip_public or pii.phone.e164 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… test counts into tests_ran Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
… PR introduces checkChangelog takes the base branch's CHANGELOG: a heading the base already carries N times may appear N times on the PR (inherited released history), and only a further copy is a duplicate. gstack-restamp passes origin/<base>'s CHANGELOG at the plan's base sha, so a base like gbrain's master, which heads one version twice, can be stamped; a duplicate the PR adds is still refused with nothing written. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…o edit the CHANGELOG Under a train the stamp commit may hold only restamp's own output: the train's verify accepts the CHANGELOG only as the base's plus the PR's own entry re-headed, and a lane that followed the old "write the CHANGELOG entry text" prompt froze the queue. The claim-at-open wording is unchanged. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
garrytan
force-pushed
the
fix/ship-friction-gate-diff-post-evidence
branch
from
October 26, 2026 05:52
1c813ae to
23995aa
Compare
5 tasks done
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
capy-ai Bot
added a commit
that referenced
this pull request
Oct 26, 2026
…me and hints the dispatch route on a conflicting PR (#3460) * fix(version-gate): a release output regenerated at the base VERSION is not a stamp Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(version-gate): run the head release tool with a bare env, drop outputs it must rewrite, prune the staging worktree Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(version-gate): regenerate at the merge base VERSION, read tool output from a file, never follow a VERSION symlink Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(version-gate): kill a release tool that ignores TERM at the limit, read a bounded log Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship-queue): ready counts the latest run per check name and hints the dispatch route on a conflicting PR; ship-policy follows #3439 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship-queue): key the latest run on app and name, keep undated runs standalone, quote the hint branch; restore the full CHANGELOG Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship-queue): refuse a dash-led branch in the hint, soften the green hint, restore the CHANGELOG tests bullet Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(ship-policy): name the refusal this branch prints for --screen on a conflicting PR 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.
What changed
Five /ship frictions the unattended crew lanes hit after Garry's Oct 25 "we should really be using the gstack ship skill before merging PRs". Each fix is its own commit; each adds tests that reproduce the lane's failure on
main.gstack-gate-diff in a clone with no local
main. Before:GATE_ERROR=no_base … fix=git fetch origin main, and that fix did not help. After: the base resolves toorigin/main(said once on stderr); when the tracking branch is missing too, the printed fix fetches into it and the next run lists the hunk.gstack-post on a body naming a gstack release. Before: exit 2 with a MEDIUM
pii.ip_publican unattended run cannot confirm. After: posted; the control body with two real public IPs still stops with the same RULE lines.gstack-evidence wrapping
gstack-pregate --stage tests --remote(the captured output intest/fixtures/evidence/). Before:tests_ran=unknown. After:tests_ran=9658, the count the gate printed, on the record and incheck.gstack-restamp --next on the test fixtures. Before: a base that already heads a version twice (gbrain's
master) was refused outright, and a clean stamp'snext:line told the lane to write CHANGELOG text, which the train's verify then refused (#3422). After: the inherited duplicate stamps and both copies stay; a third copy the PR adds is refused, with the base's count in the message; the stamp-at-mergenext:line asks for the stamp diff alone.1.
gstack-gate-diff <base>with no local<base>branch (bin/gstack-gate-diff,lib/gate-diff/git.ts)resolveBase()tries the ref, then<remote>/<ref>(origin first, then the other remotes), preferring a candidate that shares history with HEAD (a stale localmainunrelated to HEAD yields toorigin/main, and the stderr note says which case it was), but only for a branch name: a sha,~/^/@{,*HEADandrefs/never get a remote twin (isBranchName()). The merge-base againstorigin/mainis the same commit, so the candidate is unchanged; a one-line stderr note says which ref was used and theGATE_SUMMARYstdout line keeps its shape.defaultBase()walks the same remote list (remoteHEADsymref, thenmain/masterlocally or through any remote's tracking ref).noBaseFix()for a branch name printsgit fetch <remote> +<branch>:refs/remotes/<remote>/<branch>(--unshallowon a shallow clone). A baregit fetch origin mainonly updates FETCH_HEAD in a single-branch clone, which is the clone shape the lanes run in; ,{1,2}) is single-quoted, since the line is meant to be run verbatim.test/gate-diff-cli.test.ts): a--single-branch --branch featureclone with no localmainand noorigin/main(asserts the error, runs the printed fix verbatim, expects the next run to list the fixture's RH-1 hunk); upstream-only and two-remote clones; the default base in an upstream-onlymasterrepo; a--depth 1clone; a stale localmainwith no shared history;rel;echo pwnedas a base;HEAD~9,FETCH_HEAD,refs/heads/nosuchandfeature~1(itsorigin/feature~1is resolvable and must still beno_base). Verified under git 2.55 here and git 2.43 (Ubuntu 24.04, the Ubicloud lane).2.
gstack-postand the repository's own numbers (lib/gstack-post.ts)repoReleaseVersions(env)reads the rootVERSION(when four-part) and every release heading in the rootCHANGELOG.md(## [1.2.3.4],## v1.2.3.4;## [1.128.1.0 mirror]is not one) and passes those exact strings as the scan'sallowlist, computed only when a part contains a dotted quad.receiptDigitTokens()adds the exact digit tokens of a receipt: a 12-digit sha right after the receipt keystree=/tree,gated_tree=,head=,predecessor=, an 11-digit run id right afterrun/run #or/actions/runs/.lib/redact-patterns.tsis untouched (fix(redact): env.kv's code-expression exemption reaches Dart, not only TS #3418/fix(redact): env.kv's code-expression exemption reaches Python's:forms #3419 own it).pii.ip_publicby the repository's released version set andpii.phone.e164by exact receipt tokens in receipt position, and nothing else. The controls, all intest/gstack-post.test.ts:(1.91.191.0)in prose,v1.91.226.0,release 1.91.190.0;tree=704992822996,head=193687123456 gated_tree=704992822996 predecessor=123456789012,run 19368712345,run #19368712345, an/actions/runs/19368712345link;8.8.8.8and203.0.113.7in prose, a quad the repo never released (1.128.1.0),host: 1.91.192.0, the same(1.91.191.0)outside a git repo and in a repo whose VERSION is three-part (2.4.0); a+1-prefixed E.164 US number, the same 11 digits bare outside receipt position,runbefore 10 digits,tree=before 11 digits, andsubtree=before 12 (not a receipt key).isPublicIPv4and every other detector are unchanged;docs/troubleshooting.mdnotes the exemption. Adversarial-review residual (recorded, informational):runfollowed by an 11-digit 1-prefixed US number without+is allowlisted; the+form is not.3.
gstack-evidenceand the two runners that printed no per-test counts (bin/gstack-evidence)tests_rannow parses the remote pregate lane (PREGATE_REMOTE: tree=… tests=N failed=M, whole-line, with the pregate table'slanes:prefix, and the obligation'scleared by remote-gate tree=… tests=Nreceipt; the later line wins) and gstack's own shard runner ([test:free] full suite:/files-from/QUICK SUBSET:start line, thenFILES-FROM RESULT … tests=Nor the sum of whole-line[test:free] PASS — N tests, F files, Ss. Full log: <path>epilogues; aFAIL —/FLAKY-PASS —/PASS — ?epilogue without a total isunknown; only the last run counts). Once the runner spoke its sum stands for the whole tail: the tail is stdout then stderr, so position cannot order bun's stderr counts against the runner's stdout epilogues, and a focusedbun testbefore the suite no longer records its count (or ZERO-RUN) for the 10k-test run. A verdict line whose start line fell out of the tail, or fewer PASS epilogues than the start line's shard count (a killed run), isunknown, never a partial sum; an empty shard's0 filesline counts as zero. For these two runners the number is bun's terminal total, so it is "ran, skips included" (header,docs/designs/HONEST_WORK_GATE_INTEGRITY.mdW3 and CHANGELOG say so). The exit code is never changed by the parse.test/fixtures/evidence/, registered intest/helpers/free-fixtures-data.ts, VM ids and IPs scrubbed):pregate-remote-failed.out(a real--remoterun, 9658 tests, exit 1 →tests_ran=9658, never FRESH),pregate-remote-cleared.out(9660, cleared),shard-runner-files-from.out(124 lines of a realtest:ubicloudstream, 16 PASS epilogues,FILES-FROM RESULT files=275 tests=10138). All three parse asunknownonmain. The lane that gated this PR is the live proof: the installed main binary recordedtests_ran=unknownfor the 10,495-test remote lane; this branch'sbin/gstack-evidenceover the same log recordstests_ran=10495.4.
gstack-restampand a base whose history already heads a version twice (lib/changelog-check.ts,lib/restamp.ts)CHANGELOG_DUPLICATE_HEADINGcompared the branch's headings with themselves, so gbrain'smaster(two historical## [0.38.0.0]sections its own check requires to stay) could never be stamped.checkChangelog(text, expectedTop, file, base[])now counts each heading against readings of the base CHANGELOG, taken atorigin/<base>and at the commit the branch's own lines are counted from (its fork point, or the predecessor's head in a gate-ahead stamp), the larger count winning: a heading the base carries N times may appear N times, and only a further copy is refused, with a message that says how many the base has. When a reading is unavailable (the PR adds the file) the stage detail and refusal name it. The section being re-headed andgstack-version-bump write --changelogkeep the strict rule;docs/troubleshooting.mdandlib/result-codes.tssay so.test/gstack-restamp-queue.test.ts): a fixture whosemainheads one patch version twice stamps and keeps both copies, and still does aftermaincollapsed the copies behind the PR's back; a PR that adds a third copy, one that adds the first duplicate on a clean base, and one whose new CHANGELOG on a base without one heads a version twice, are refused with nothing written; one readable reading counts from that reading and says so; unit rows for the count arithmetic, several readings, and[Unreleased]placeholders.5.
gstack-restamp --nextunder a train no longer asks the lane to edit the CHANGELOG (bin/gstack-restamp)next:line told every stamp to "write the CHANGELOG entry text"; the lane that obeyed on v1.91.230.0 feat(design-shotgun,design-html): archetype handoff and persisted craft exceptions (GSTA-92 phase 2) #3422 added a release summary under the new heading, the train's verify refused the head (the CHANGELOG must equal the base's plus the PR's own entry re-headed) and the queue froze. Underqueue_mode stamp-at-mergethe line now says to commit and push only the stamp diff with no edit of the lane's own; the claim-at-open wording is unchanged, since that bump still writes its entry at /ship's CHANGELOG step. Tests: the stamp-at-merge fixture's output carries no instruction to edit the CHANGELOG by hand; the claim-at-open fixture still does.CHANGELOG
Five bullets under
## [Unreleased]; VERSION, package.json and the digest stay at main's (CREW rule 15).Why
Every crew lane now runs /ship unattended before READY, and /ship's own helpers were the first thing to break: the gate-integrity list could not find its base in the lanes' single-branch clones, the docs audit stopped on a MEDIUM finding about a gstack version number that no unattended run can confirm, and the ship receipt said
tests_ran: unknownfor the one lane that had just run 10,000 tests on Ubicloud (and, found by GSTA-94 on #3424, for gstack's own shard runner too). Then two restamp frictions from the train itself: gbrain's base could not be stamped at all, and a lane that followed restamp's own prompt froze gstack's queue (#3422). These fixes let an unattended /ship finish on a clean branch with a receipt that carries the real count, and a stamp slot complete without a hand edit.Approvals
No product or behaviour decision beyond the detector narrowing argued above; no threshold, budget, timeout or trial count changed.
Summary
gstack-gate-diffresolves a bare base branch through its remote-tracking twin and prints a fix line that works in single-branch and shallow clones.gstack-postno longer confirms-or-stops on the repo's own release versions or a receipt's tree hash / run ids; real IPs and E.164 numbers still stop.gstack-evidencerecordstests_ranfor the remote pregate lane and the shard runner instead ofunknown.gstack-restamprefuses only the CHANGELOG duplicates the PR introduces, and its stamp-at-mergenext:line never asks for a hand edit.Test Coverage
Step 7 audit (invocation 4 final pass, read-only, re-verified against the pushed tree which differs by one test timeout option): 27/30 code paths tested (90%), ★★★ 23, ★★ 4, gaps 3 (A5 origin-first remote order unobservable, A6 remote HEAD symref, B8 the
hasQuadgate's false branch), 0 weak gaps, 0 E2E/eval gaps. Unit tests on the touched files:bun test test/evidence.test.ts test/gate-diff-cli.test.ts test/gstack-post.test.ts test/gstack-restamp-queue.test.ts103 pass, 0 fail (plus the sync-spawn tripwire).Pre-Landing Review
Four /ship invocations, each a five-specialist review army plus Red Team and the Claude adversarial pass (codex unavailable on this machine). Invocations 1–3 covered fixes 1–3 (0 CRITICAL; fixes folded into the commits). Invocation 4 added fixes 4 and 5 and ran three fix cycles, a final pass and a tests-only re-bind: 0 CRITICAL; the informational findings worth fixing landed (the evidence parser's stream-order arbitration, restamp's base-tip-only reading and silent fallback, gate-diff's stale-local-main loop, the receipt-key allowlist, shell-quoted fix lines, dead fields and stale docstrings); the rest are recorded as skipped with reasons (per-heading count rather than per-body identity, guarded by the train's
ownEntryAboveMain;gstack-version-bump write --changelogstrict by design; hex-shaped branch names; the gate-ahead reading untested;docs/ship-policy.mdlines 471 and 520 describe the old restamp behaviour and belong to another in-flight PR). Review binding verified on the pushed tree 8e694f83. Gate edits: none detected (GATE_SUMMARY listed=13 eligible=2 inspected=2 unread=0 tagged={} unmatched=11).Exploratory QA
/qa functional probes on every reviewed tree (gate-diff clone shapes including a stale unrelated local
main, gstack-post receipt and control bodies through a stubgh, gstack-evidence over the fixtures and a bun-block-before-runner shape, restamp fixtures with inherited, collapsed and PR-introduced duplicates, the stamp-at-mergenext:line) — all pass; reports under.gstack/qa-reports/ship-GSTA-102/(untracked).Eval Results
No skill prompt changed.
bun run eval:selectmaps the diff to the whole PR profile (139 behaviors;lib/gstack-post.tsis a derived reference of 250 cases andtest/helpers/free-fixtures-data.tsa global touchfile), so there is no focused paid case for these three bins; the train screen covers it (--screen).Greptile Review
Skipped:
GREPTILE_API_KEYis not set on this machine and the PR has no Greptile review.Issues
ISSUE_LINKS: none
Verification Results
PREGATE_REMOTE: tree=8e694f83… tests=15726 failed=0 spent=0.05(gstack-evidence FRESH, exit 0, 2026-10-26T05:51:47Z; the installed binary saystests_ran=unknown, this branch's parser over the same log says 15726). The lane before it, on b92db281, failed exactly one test: the sync-spawn timeout tripwire on a new test'sspawnSync, fixed by the one-line timeout the tree differs by.bun run typecheckexit 0;bun run typecheck:testwithin the ratchet;bun run gen:skill-docsleaves the tree clean; gstack-redact scan of the push range HIGH=0 MEDIUM=0 LOW=0; sealed guard: no policy.pull_requestworkflow on this head because it conflicts withmainon CHANGELOG.md alone (two stamps since the fork; the train merges that by section); the Free Tests and Windows Free Tests workflows were dispatched on this head byworkflow_dispatchinstead (run ids in the receipt and the READY).tests_ran: remote lane 15726 (ran, skips included).TODOS
No matching entries; nothing added or completed.
Documentation
Status: current — no documentation edits needed; no blockers.
Scope. Branch
fix/ship-friction-gate-diff-post-evidenceat 5ddd7395e against merge base 8d95013 (four commits, 18 files; staged/unstaged/untracked empty). Audited the four behaviour changes against the docs that describe them: gate-diff base resolution through the remote-tracking twin and the forced-refspecno_basefix line;gstack-post's exemption of the repo's own four-part release versions and receipt digit tokens;gstack-evidencetests_ranfor gstack's shard runner and thegstack-pregate --remotelane; base-awareCHANGELOG_DUPLICATE_HEADING. The doc edits already on the branch (HWGI W1 base/exit contract and W3 runner list, troubleshootingpii.ip_publicnote andCHANGELOG_DUPLICATE_HEADINGentry) were verified line by line againstlib/gate-diff/git.ts,bin/gstack-gate-diff,lib/gstack-post.ts,bin/gstack-evidence,lib/changelog-check.ts,lib/restamp.ts(baseRef isorigin/<base>,sinceis the fork point, rehead still refuses a twice-headed source section,gstack-version-bumpstill self-compares) andlib/result-codes.ts. Banned terms: none configured.Documentation health:
README.md Current (gstack-evidence row still accurate; no gate-diff/post/restamp rows exist)
CLAUDE.md Current (redaction guard pointer unchanged)
docs/CONTRIBUTOR_REFERENCE.md Current (engine-level redaction reference; the post-level release-version allowlist lives in troubleshooting)
docs/troubleshooting.md Current (pii.ip_public note and CHANGELOG_DUPLICATE_HEADING entry on the branch match the code)
docs/designs/HONEST_WORK_GATE_INTEGRITY.md Current (W1 base default, exit contract and W3 runner list on the branch match the code)
docs/pregate.md Current (PREGATE_REMOTE line format unchanged)
docs/ship-policy.md Stale at line 520 on the duplicate-heading rule — owned by another PR, reported to the coordinator, not edited
review/gate-integrity.md Current
ship/sections/tests.md.tmpl Current (three tests_ran states unchanged)
CHANGELOG.md Not audited here (Step 5 skipped in ship-owned mode)
Documentation coverage:
gate-diff remote-tracking base + forced-refspec fix line reference ✅ CHANGELOG how-to ✅ (fix line printed by the tool) tutorial ❌ explanation ✅ HWGI
gstack-post release-version allowlist (pii.ip_public) reference ✅ CHANGELOG how-to ✅ troubleshooting tutorial ❌ explanation ✅ lib header
gstack-post receipt digit tokens (pii.phone.e164) reference ✅ CHANGELOG how-to ❌ (no troubleshooting entry) tutorial ❌ explanation ✅ lib header
gstack-evidence tests_ran: shard runner + remote lane reference ✅ CHANGELOG how-to ❌ tutorial ❌ explanation ✅ HWGI W3
CHANGELOG_DUPLICATE_HEADING base-aware count reference ✅ result-codes how-to ✅ troubleshooting tutorial ❌ explanation ✅ troubleshooting
Debt: a
pii.phone.e164troubleshooting entry for the receipt-token exemption (new section, not added); docs/ship-policy.md:520 wording (other PR's file). Diagram drift: none (no diagram names a changed entity).Test plan
bun test test/gate-diff-cli.test.ts test/gstack-post.test.ts test/evidence.test.ts test/gstack-restamp-queue.test.ts(103 pass) on the final treegstack-gate-diff mainin a fresh--single-branchclone (fix line executed, next run lists the hunk);gstack-post pr-commentwith the version, receipt and control bodies through a stubgh;bin/gstack-evidence runover the three fixtures and the live lane log;gstack-restamp --nexton restamp fixtures with inherited and PR-added duplicates--screen)Evidence
Head pinned at READY:
23995aaeab40418ebf3730c63f2405acca71086e; theSHIP_RECEIPTblock above carries the per-lane counts and the pregate receipts. No flaky case.