Public: anyone can read this; the crew can change it.
The gate is every test/*.test.ts minus EXCLUDED: GATE is deleted and a pull adding a test touches no shared file #2084
Check · Review · Land · Live done — Landed and live in production.
The gate is now every `test/*.test.ts` minus `EXCLUDED`. The hand-kept `GATE` list in `scripts/gate.ts` is deleted, so a pull that only adds `test/x.test.ts` is gated on it without touching any shared file.
shipped production is serving it deploy eb43263
The gate is now every test/*.test.ts minus EXCLUDED. The hand-kept GATE list in scripts/gate.ts is deleted, so a pull that only adds test/x.test.ts is gated on it without touching any shared file.
78f1bc51: commit 9d13a4f7 from #2060, cherry-picked onto main
scripts/gate.ts:gateFiles()returnspresentTests()minusEXCLUDED, in name order.EXCLUDEDstays as the quarantine, each entry with its reason and its issue. The audit (bun scripts/gate.ts, first in the check) now catches only bad exclusions: a missing file, a file listed twice, or an entry with no reason or issue.- Callers that follow:
scripts/test-shards.ts(--gateand the fast tier),scripts/flake-hunt.ts, andquarantineinscripts/flake.ts, which now adds a line toEXCLUDED.gateListAddsinsrc/checks/impact.tsnow treats a removed exclusion as an admission. - Tests and docs:
test/check-list.test.ts,check-tiers,flake,hollowandshardsare rewritten for the single list.CLAUDE.md,README.mdand the flake-hunt workflow are updated to match.
c1840a24: scripts/compare-changed.ts
This script imports gate.ts from older trees. It now reads gateFiles(presentTests(tree)) when that function exists and falls back to GATE for trees from before this change.
d6651da6: merge of main
Main had added four files to GATE: archive, tui-archive, archive-agent and proposal-card. With GATE gone, none of them is in EXCLUDED, so gateFiles() already runs all four. The resolution keeps this branch's gate.ts and checks that the four are in the gate.
The issue's test: test/shards.test.ts has "a pull that only adds test/x.test.ts is gated on it". A commit whose only change is adding test/zz-new.test.ts is planned by the fast tier as changed, and the audit stays green. test/check-list.test.ts also checks that gateFiles includes a new file with no list naming it.
Left out: #2060's vitals fix (c02cc14c), which main already has. Nothing went red from the new shard order on the last check run, so nothing new is quarantined.
Checks run here after the merge: bun x tsc --noEmit is clean and bun scripts/gate.ts exits 0. The check-list, check-tiers, flake and shards suites pass, along with the four newly gated files: 132 tests, 0 failures.
Policy change to review: a brand-new test file now joins the gate without the ten-run admit record. Only a file coming back out of EXCLUDED still needs that record.
To try it: add an empty test/x.test.ts. bun scripts/gate.ts still exits 0, and gateFiles() includes the new file.
Closes #2071
🤖 Generated with Claude Code
The gate is now every test/*.test.ts minus EXCLUDED. The hand-kept GATE list in scripts/gate.ts is deleted, so a pull that only adds test/x.test.ts is gated on it without touching any shared file. The two merge commits on this branch show the reason: each time, main had added files to GATE, and that one shared line conflicted.
78f1bc51: commit 9d13a4f7 from #2060, cherry-picked onto main
scripts/gate.ts:gateFiles()returnspresentTests()minusEXCLUDED, in name order.EXCLUDEDstays as the quarantine, each entry with its reason and its issue. The audit (bun scripts/gate.ts, first in the check) now catches only bad exclusions: a missing file, a file listed twice, or an entry with no reason or issue.- Callers that follow:
scripts/test-shards.ts(--gateand the fast tier),scripts/flake-hunt.ts, andquarantineinscripts/flake.ts, which now adds a line toEXCLUDED.gateListAddsinsrc/checks/impact.tsnow treats a removed exclusion as an admission. - Tests and docs:
test/check-list.test.ts,check-tiers,flake,hollowandshardsare rewritten for the single list.CLAUDE.md,README.mdand the flake-hunt workflow are updated to match.
c1840a24: scripts/compare-changed.ts
This script imports gate.ts from older trees. It now reads gateFiles(presentTests(tree)) when that function exists and falls back to GATE for trees from before this change.
d6651da6 and 618d2150: merges of main
Since the cherry-pick, main added five files to GATE: archive, tui-archive, archive-agent, proposal-card and merge-queue. None of them is in EXCLUDED, so gateFiles() already runs all five. Both merges keep this branch's gate.ts, and I checked that each of the five is in the gate.
The issue's test: test/shards.test.ts has "a pull that only adds test/x.test.ts is gated on it". A commit whose only change is adding test/zz-new.test.ts is planned by the fast tier as changed, and the audit stays green. test/check-list.test.ts also checks that gateFiles includes a new file with no list naming it.
Left out: #2060's vitals fix (c02cc14c), which main already has. The last check run before these merges was green with the new shard order, so nothing new is quarantined.
Checks run here after the latest merge: bun x tsc --noEmit is clean and bun scripts/gate.ts exits 0. The check-list, check-tiers, flake, shards and merge-queue suites pass: 122 tests, 0 failures. The whole gate was not run here; the forge's check on this push is the verdict.
Policy change to review: a brand-new test file now joins the gate without the ten-run admit record. Only a file coming back out of EXCLUDED still needs that record.
To try it: add an empty test/x.test.ts. bun scripts/gate.ts still exits 0, and gateFiles() includes the new file.
Closes #2071
🤖 Generated with Claude Code
The design is right and does what the issue asked: GATE is gone, gateFiles() is present tests minus EXCLUDED, the audit narrows to bad exclusions, and the shards test proves a pull that only adds a test file is gated on it. This is tooling with no page, so the phone and desktop pictures show nothing to judge. One list entry in the checklist is unmet, so I am requesting changes.
Fix first: two behaviours this pull adds have no test that would fail without them.
- scripts/flake-hunt.ts quarantineAll now skips a file that is not present (the new
present.has(file)guard). Nothing exercises it. Delete the guard and every test stays green. Add a test that a Flaky issue naming a missing file adds no EXCLUDED entry. That means pulling the filter into a small pure function in scripts/flake.ts or scripts/gate.ts and testing it, since quarantineAll is not importable. - scripts/compare-changed.ts has a new branch: use gateFiles(presentTests(tree)) when the old tree has it, else fall back to GATE. test/changed-compare.test.ts covers neither branch. Move the choice into a tested function, or cover it there with a tree that has GATE and one that has gateFiles.
Smaller points:
- The test "this guard is itself in the gate" in check-list and hollow now cannot fail. Any present file not in EXCLUDED passes it. Assert the file is not in EXCLUDED instead.
- The README paragraph about gate.ts now has a very long line, and the "gated the moment it exists" sentence reflows badly. Rewrap it.
- Policy: a new test file now skips the ten-run admit record, so a flaky new test can turn the gate red once before the nightly hunt quarantines it. You flagged this yourself. Say in the README that this is accepted, and that the nightly hunt is the backstop.
The gate is now every test/*.test.ts minus EXCLUDED. The hand-kept GATE list in scripts/gate.ts is deleted, so a pull that only adds test/x.test.ts is gated on it without touching any shared file.
78f1bc51: commit 9d13a4f7 from #2060, cherry-picked onto main
scripts/gate.ts:gateFiles()returnspresentTests()minusEXCLUDED, in name order.EXCLUDEDstays as the quarantine, each entry with its reason and its issue. The audit (bun scripts/gate.ts, first in the check) now catches only bad exclusions: a missing file, a file listed twice, or an entry with no reason or issue.- Callers that follow:
scripts/test-shards.ts(--gateand the fast tier),scripts/flake-hunt.ts, andquarantineinscripts/flake.ts, which now adds a line toEXCLUDED.gateListAddsinsrc/checks/impact.tsnow treats a removed exclusion as an admission. - Tests and docs:
test/check-list.test.ts,check-tiers,flake,hollowandshardsare rewritten for the single list.CLAUDE.md,README.mdand the flake-hunt workflow are updated to match.
Merges of main (d6651da6, 618d2150)
Main added five files to GATE: archive, tui-archive, archive-agent, proposal-card and merge-queue. None of them is in EXCLUDED, so gateFiles() already runs all five. Both merges keep this branch's gate.ts.
Review fixes
- Missing-file skip in quarantine: the check is now
quarantineFlaky(source, flaky, present)inscripts/flake.ts, andflake-hunt quarantinecalls it.test/flake.test.tscovers two cases:
- a Flaky: issue naming a missing file adds no EXCLUDED entry;
- a present file is quarantined once and named.
- compare-changed: the choice between old and new
gate.tsshapes is nowtreeGate(tree, key)inscripts/gate.ts.test/check-list.test.tsruns it on two scratch trees: one whosegate.tshas onlyGATE, and one carrying the currentgate.ts, where a new file is gated and an excluded one is not. - Mutation check: with the missing-file check deleted, the
quarantineFlakytests fail. With theGATEfallback replaced, the old-tree test fails. - Guard tests: "this guard is itself in the gate" in
check-listandhollownow asserts that noEXCLUDEDentry names the file, so it can fail. - README: the gate paragraph is rewrapped. A new paragraph says that a brand-new test file skips the ten-run admit record on purpose: a flaky new test can turn the gate red once, and the nightly flake hunt is the backstop. The quarantine paragraph now mentions the missing-file skip.
The issue's test: test/shards.test.ts has "a pull that only adds test/x.test.ts is gated on it". A commit whose only change is adding test/zz-new.test.ts is planned by the fast tier as changed.
Left out: #2060's vitals fix (c02cc14c), which main already has. The last check before the review fixes was green with the new shard order, so nothing new is quarantined.
Checks run here: bun x tsc --noEmit is clean and bun scripts/gate.ts exits 0. The check-list, flake, hollow, shards, check-tiers and changed-compare suites pass: 153 tests, 0 failures. The whole gate was not run here; the forge's check on this push is the verdict.
To try it: add an empty test/x.test.ts. bun scripts/gate.ts still exits 0, and gateFiles() includes the new file.
Closes #2071
🤖 Generated with Claude Code
The gate is now every test/*.test.ts minus EXCLUDED. The hand-kept GATE list in scripts/gate.ts is deleted, so a pull that only adds test/x.test.ts is gated on it without touching any shared file. Main moved three times while this pull was open, and each time GATE was the conflict.
78f1bc51: commit 9d13a4f7 from #2060, cherry-picked onto main
scripts/gate.ts:gateFiles()returnspresentTests()minusEXCLUDED, in name order.EXCLUDEDstays as the quarantine, each entry with its reason and its issue. The audit (bun scripts/gate.ts, first in the check) now catches only bad exclusions: a missing file, a file listed twice, or an entry with no reason or issue.- Callers that follow:
scripts/test-shards.ts(--gateand the fast tier),scripts/flake-hunt.ts, andquarantineinscripts/flake.ts, which now adds a line toEXCLUDED.gateListAddsinsrc/checks/impact.tsnow treats a removed exclusion as an admission. - Tests and docs:
test/check-list.test.ts,check-tiers,flake,hollowandshardsare rewritten for the single list.CLAUDE.md,README.mdand the flake-hunt workflow are updated to match.
Merges of main
d6651da6,618d2150: main added five files toGATE:archive,tui-archive,archive-agent,proposal-cardandmerge-queue. None is inEXCLUDED, sogateFiles()already runs them.601cf9b4: main admitted fourteen tui tests by deleting their exclusions, and quarantinedtui-code.test.tsunder #2082. This branch had not changed anyEXCLUDEDentry, so main'sEXCLUDEDblock is taken as it is. The audit stays at 0, the fourteen are gated, andtui-codeandtui-askedstay out, as on main.
Review fixes (d9b920c6 and the two commits before it)
- Missing-file skip in quarantine: the check is now
quarantineFlaky(source, flaky, present)inscripts/flake.ts, andflake-hunt quarantinecalls it.test/flake.test.tsshows that aFlaky:issue naming a missing file adds noEXCLUDEDentry. - compare-changed: the choice between old and new
gate.tsshapes is nowtreeGate(tree, key)inscripts/gate.ts.test/check-list.test.tsruns it on a scratch tree whosegate.tshas onlyGATEand on one carrying the currentgate.ts. - Mutation check: with the missing-file check deleted, the
quarantineFlakytests fail. With theGATEfallback replaced, the old-tree test fails. - Guard tests: "this guard is itself in the gate" in
check-listandhollownow asserts that noEXCLUDEDentry names the file, so it can fail. - README: the gate paragraph is rewrapped. A new paragraph says that a brand-new test file skips the ten-run admit record on purpose, with the nightly flake hunt as the backstop.
The issue's test: test/shards.test.ts has "a pull that only adds test/x.test.ts is gated on it". A commit whose only change is adding test/zz-new.test.ts is planned by the fast tier as changed.
Left out: #2060's vitals fix (c02cc14c), which main already has. Nothing new is quarantined.
Checks run here after the latest merge: bun x tsc --noEmit is clean and bun scripts/gate.ts exits 0. The check-list, flake, hollow, shards and check-tiers suites pass: 148 tests, 0 failures. I did not run the whole gate here, including the fourteen tui files main just admitted; the forge's check on this push is the verdict.
To try it: add an empty test/x.test.ts. bun scripts/gate.ts still exits 0, and gateFiles() includes the new file.
Closes #2071
🤖 Generated with Claude Code
The change does what #2071 asked. GATE is gone, the gate is every test/*.test.ts minus EXCLUDED, and a pull that adds a test touches no shared file. Callers, docs, the flake-hunt workflow and compare-changed (treeGate, with the old-tree fallback) all follow. The tests are real: the new-file fast-tier test, the treeGate test on both tree shapes, the quarantineFlaky missing-file test, and guard tests that can now fail. This is tooling with no user-facing surface, so the page, phone and keyboard checks do not apply. I read the diff and did not run the suite; the forge ran it and it is green.
Two things I would do next:
- Make the README gate paragraphs (around the audit and quarantine text) read as one pass. The rewraps left short, ragged lines.
- Have the nightly hunt report how many files joined without an admit record, so the accepted policy change (new tests skip the ten-run admit) stays visible.
The full gate on land was red; the pull is open again. Red tests:
- handover.drain lets go of the port before the rest of the drain, and closes only after the push is answered
- handover.drain lets go of the port before the rest of the drain, and closes only after the push is answered [4214.92ms] [shard 2]
The gate is now every
test/*.test.tsminusEXCLUDED. The hand-keptGATElist inscripts/gate.tsis deleted, so a pull that only addstest/x.test.tsis gated on it without touching any shared file.78f1bc51: commit9d13a4f7from #2060, cherry-picked onto current mainscripts/gate.ts:gateFiles()returnspresentTests()minusEXCLUDED, in name order.EXCLUDEDstays as the quarantine, each entry with its reason and its issue. The audit (bun scripts/gate.ts, first in the check) now catches only bad exclusions: a missing file, a file listed twice, or an entry with no reason or issue.scripts/test-shards.ts(--gateand the fast tier),scripts/flake-hunt.ts, andquarantineinscripts/flake.ts, which now adds a line toEXCLUDED.gateListAddsinsrc/checks/impact.tsnow treats a removed exclusion as an admission.test/check-list.test.ts,check-tiers,flake,hollowandshardsare rewritten for the single list.CLAUDE.md,README.mdand the flake-hunt workflow are updated to match.GATEhad grown since #2060 and was dropped. The README keeps main's shard-count and argon2/openDbparagraphs.test-shards.tskeeps main'sgate-summary.tsimport.c1840a24:scripts/compare-changed.tsThis script landed after #2060 and still readGATE. It importsgate.tsfrom older trees, so it now readsgateFiles(presentTests(tree))when that function exists and falls back toGATEfor trees from before this change.The issue's test:
test/shards.test.tshas "a pull that only adds test/x.test.ts is gated on it". A commit whose only change is addingtest/zz-new.test.tsis planned by the fast tier aschanged, and the audit stays green.test/check-list.test.tsalso checks thatgateFilesincludes a new file with no list naming it.Left out: #2060's second commit (
c02cc14c, the vitals disk fix). Main'stest/vitals.test.tsalready passesdiskFreeMinitself.Checks run here:
bun x tsc --noEmitis clean andbun scripts/gate.tsexits 0. The check-list, check-tiers, flake, hollow, shards and vitals suites pass: 157 tests, 0 failures. I did not run the whole gate locally, so the forge's check on this push is the verdict on the shard reshuffle. Any file that goes red only because of the new order goes intoEXCLUDEDunder a new issue of its own, in a follow-up push to this pull.Policy change to review: a brand-new test file now joins the gate without the ten-run
admitrecord. Only a file coming back out ofEXCLUDEDstill needs that record.To try it: add an empty
test/x.test.ts.bun scripts/gate.tsstill exits 0, andgateFiles()includes the new file.Closes #2071
🤖 Generated with Claude Code
Closes #2071