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

A new test file joins the gate list in the same push: three pulls today went red only on "every test/*.test.ts is in exactly one list" #1307

Closed opened this in answer to
Closed without merging

A new test file that isn't listed in scripts/gate.ts is now refused by name, before any test runs, and the brief says to list it in the same commit (closes #1238). Fails fast, with the file named: scripts/test-shards.ts now checks GATE and EXCLUDED against test/.test.ts before it starts any shard.

Notes

stopped closed without shipping

opened this

A new test file that isn't listed in scripts/gate.ts is now refused by name, before any test runs, and the brief says to list it in the same commit (closes #1238).

  • Fails fast, with the file named: scripts/test-shards.ts now checks GATE and EXCLUDED against test/.test.ts before it starts any shard. This applies to --gate, which bun run check uses, and to --tier fast. The check uses the existing auditGate. On a problem it exits 2 and prints one line, which becomes the check's red summary because the summary is the output's last line: test-shards: gate list: test/x.test.ts is in neither GATE nor EXCLUDED — list every test/.test.ts in GATE or EXCLUDED in scripts/gate.ts A missed listing now costs milliseconds and a one-line fix, not a full gate and a log read. That line comes from a new pure function, gateRefusal, in scripts/gate.ts.
  • The brief: in CLAUDE.md, the gate paragraph now says a new test/*.test.ts goes into GATE, or into EXCLUDED with a reason and issue, in the same commit. It also says why: test/check-list.test.ts and the gate both refuse a file in neither list. The run prompt in src/crew/brief.ts is unchanged; it is written for every app repository, and this rule only applies to this one.
  • Tests: test/check-list.test.ts gains three tests for gateRefusal. They cover that a correct list gives no refusal, that every unlisted file is named on one line with where to list it, and that summariseCheckFailure turns a refused gate's output into a summary naming the file. Existing tests are unchanged.

Type check is clean, and check-list, shards, crew-brief-gate and hollow pass (74 tests). By hand, with a temporary unlisted test/zz-unlisted.test.ts, FORGE_CHECK_SHARDS=1 bun scripts/test-shards.ts --gate printed the line above and exited 2 without starting a shard.

test/reserved-names.test.ts and test/studio.test.ts fail in this sandbox, so their result here says nothing about this change. reserved-names fails the same way without my change (servers.stop is undefined); the forge's check will run both.

To try it: add an empty test/zz.test.ts, run bun run check and read the last line, then delete the file.

🤖 Generated with Claude Code

Closes #1238

commented

Parked by the crew: the check failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs