Public: anyone can read this; the crew can change it.

The gate list finds tests by itself: every test/*.test.ts minus a short EXCLUDED list #2053

Parked opened this in answer to
Closed without merging

GATE is gone. The gate is now gateFiles() in scripts/gate.ts: presentTests() minus EXCLUDED, in name order. On this tree that is the same 329 files the hand-kept list held.

Notes

stopped parked by the crew deploy 9b34e11

opened this

GATE is gone. The gate is now gateFiles() in scripts/gate.ts: presentTests() minus EXCLUDED, in name order. On this tree that is the same 329 files the hand-kept list held. A new test/*.test.ts is gated as soon as it exists, so a pull that adds one no longer edits any shared file.

What changed

  • scripts/gate.ts: EXCLUDED is unchanged and is still the quarantine, each entry with its reason and issue. auditGate(present, excluded) now checks only exclusions: an entry for a file that doesn't exist, the same file twice, or one with no reason or no issue. The refusal's last line says <file>: fix its EXCLUDED entry in scripts/gate.ts.
  • Callers: scripts/test-shards.ts (--gate, the fast tier, mergeImpact) and scripts/flake-hunt.ts hunt take their list from gateFiles().
  • Quarantine: quarantine in scripts/flake.ts now only appends an entry to EXCLUDED, and does nothing if the file is already excluded. flake-hunt quarantine skips a Flaky: issue whose file no longer exists, because that entry would turn the audit red.
  • Impact map: gateListAdds in src/checks/impact.ts is inverted. What a scripts/gate.ts diff admits is the entries it takes out of EXCLUDED and doesn't put back, so moving an entry within the list admits nothing. Adding an entry selects nothing. A bare "test/…" line now counts as logic and runs the full tier, since there is no list left for it to belong to.
  • Docs: CLAUDE.md, README.md and .forgejo/workflows/flake-hunt.yml no longer tell anyone to add files to GATE.

Tests

  • I rewrote the tests that were built on the old two-list model: the test/check-list.test.ts audit cases, gateListAdds in test/check-tiers.test.ts, quarantine in test/flake.test.ts, and the gate-audit suites in test/shards.test.ts. They described the old design rather than being wrong about it.
  • The test the issue asks for is in test/shards.test.ts: in a temporary git repository whose only commit adds test/zz-new.test.ts, --tier fast --diff HEAD~1..HEAD plans that file as changed. On the old code it is refused as unlisted.
  • The type check is clean, bun scripts/gate.ts passes, and bun test over shards, check-list, flake, hollow, check-tiers, reserved-names and studio gives 345 pass, 0 fail.

Left alone on purpose

  • A brand-new test file now enters the gate without the ten-run admit record; only an excluded file coming back still needs it. The issue asks for this, but it is a policy change worth a look.
  • Deleting a test file that is still in EXCLUDED still means editing EXCLUDED. That case is rare and keeps stale entries from building up.

To try it: add an empty test/x.test.ts and run bun scripts/gate.ts; it still exits 0, and bun scripts/test-shards.ts --gate includes the file.

🤖 Generated with Claude Code

Closes #2037

commented

Parked by the crew: the check failed ("two forges in one process keep their own error and refusal signals") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs