Repository navigation
v1.91.329.0 pregate: always run the whole-tree tests listed in .gstack/always-run.json (GST-167 PR 1, GST-98) - #3626
Merged
Merged
Conversation
….json A diff-selected run never maps a touched file to a scanner that reads the whole tree, so tripwires, ratchets and conformance tests passed the selected gate and failed CI after review (#3592, #3593). The lanes selection now adds every tracked test the list's globs name whenever the branch selects a test, owes a lane or edits the list. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…ations for the always-run list 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>
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
gstack-pregate's lanes selection now always includes the whole-tree tests listed in a new.gstack/always-run.json: tripwires, ratchets, env-host fence conformance, free-fixtures, bun-entry-isolation and egress wiring. They are added whenever a branch selects any test, owes a lane, or edits the list itself.--explainprints each one as<test> (always_run, .gstack/always-run.json). A glob that matches nothing prints<glob> matches no test file. A docs-only branch adds nothing.lib/pregate/lane-selection.ts:ALWAYS_RUN_PATHandalwaysRunTests()(malformed JSON or a non-string glob stops with a message naming the file); the list file is a pin file that pregate validates, so it owes no lane..gstack/always-run.json(new, force-added like pregate.json): gstack's list, which matches 15 test files. The 13 with a seed inscripts/free-test-durations.json(recorded 2026-10-19) total about 13 s there;bun-entry-isolationandlaunch-env-echo-ratchethave no seed yet.host-conformance, which runs./setup, is deliberately left off.docs/pregate.md: a section on the file and why it is separate frompregate.json(older readers reject unknown keys there).On this branch, the remote pregate against main added 11 of the 15 tests to the selection (the other 4 were already selected by the import graph).
Why
GST-98 / GST-167 PR 1. A diff-selected pregate never maps a touched file to a scanner that reads the whole tree, so those scanners passed the selected gate and failed CI only after review. That happened on #3592 (egress and script-invocation tripwires) and #3593 (env-host fence conformance and free-fixtures), and cost about 4M tokens. Garry, 2026-10-29: "do it" on the GST-167 plan (handoffs/GSTA-151/gst167-plan-v2.md in the GStack Minder drive).
Blast radius
Pregate selection only: more tests run locally and on the remote gate for code PRs. CI workflows, the paid lane and the train are unchanged. gbrain sees no change unless it adds the file (handoffs/GSTA-151/gbrain-note.md).
Tests
test/pregate-always-run.test.ts(new, fails against main): covers a code change adding the scanner the graph never selects; the same change with no list file; a docs-only branch; an edit to the list; malformed lists; and gstack's own list, which names only tracked tests and includes the GST-98 scanners.Approvals
Plan approved by Garry 2026-10-29 ("do it"), relayed by GStack Minder; autoplan run ap-20261029205119.
Issues
Refs #3592
Refs #3593
Pre-Landing Review
REVIEW_LOOP: passes=1 blocking_found=0 deferred=0 noted=6 fixed=0 scope=frozen dispatches=7
Reviewers: a core checklist pass, one batched specialist pass (testing, maintainability, security, performance, simplification, state machines, red team), a native adversarial pass, and a cross-family outside voice (openai/gpt-6.1-sol). None of them found anything at the blocking floor. Before the review, /ship restored the tail of docs/pregate.md, which fa8fa63 had truncated by 498 lines.
Gate edits: none detected (1 listed, 0 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Review notes
These are informational and were not looped, under crew rule 30:
lib/pregate/lane-selection.ts:28: the list is read from the branch's own tree, so a branch could drop a scanner it breaks from its own selected gate (CI still runs it). Follow-up: take the union with the merge-base list.lib/pregate/lane-selection.ts:272: always-run tests in the Windows set add a Windows requires-remote obligation. That set already holds 1,421 tests, so nearly every code branch owed it before..gstack/always-run.json:3: single-segment globs leave outbrowse/test/server-route-dispatch-ratchet.test.ts.test/pregate-always-run.test.ts: no bin-level case for a malformed list reachingPREGATE_INCOMPLETE.docs/pregate.md: "tracked test file" also covers untracked files on disk, the same as graph selection.Documentation
Status: current. The new
.gstack/always-run.jsonsection in docs/pregate.md is accurate, and no other doc contradicts it or needs a pointer.Scope: 5 committed paths (53db038..f970eb9:
.gstack/always-run.json,lib/pregate/lane-selection.ts,docs/pregate.md,CHANGELOG.md,test/pregate-always-run.test.ts); no staged, unstaged or untracked content. I read all of docs/pregate.md and searched docs/ship-policy.md, docs/TESTING_INTERNALS.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md, docs/captain.md, docs/troubleshooting.md, README.md and ARCHITECTURE.md for descriptions of pregate selection.Documentation health:
docs/pregate.md Current (the new section matches the code; the 15-test count and the
git add -fnote checked out)docs/ship-policy.md Current (no description of lanes selection)
docs/TESTING_INTERNALS.md Current (covers paid diff selection only)
CONTRIBUTING.md Current (links to the remote gate only)
AGENTS.md Current
CLAUDE.md Current (test selection there is the paid touchfile runner)
docs/captain.md Current (links to the remote gate only)
CHANGELOG.md Current ([Unreleased] entry, not polished in ship-owned mode)
Documentation coverage:⚠️ partial (format, git add -f) ❌ ✅ docs/pregate.md
[entity] [reference] [how-to] [tutorial] [explanation]
.gstack/always-run.json ✅ docs/pregate.md
Documentation Debt
.gstack/always-run.jsonis read from the branch or fromorigin/<base>. The code reads the branch's working tree, unlike pregate.json..gstack/files still need a lane, but the pin files (pregate.json, generated.json, now always-run.json) owe none. This predates the branch.Diagram drift: none (ARCHITECTURE.md does not mention pregate).
Test plan
bun run typecheck,bun run typecheck:test(814 known diagnostics, none new),git diff --check: cleanbun teston the 10 pregate and ratchet files: 104 pass, 0 fail