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

test/fork-flow.test.ts runs in under 5 s, every test under 1 s, proving what it proves today #10250

shipped production is serving it opened this has it
opened this

For: #1242 (every test fast; the gate runs every test). scripts/test-times.json records test/fork-flow.test.ts at 48.4 s in the gate, the slowest file it lists. Measured 2026-11-09 with bun test test/fork-flow.test.ts in the crew sandbox on main 49365c3c9: 15 tests in 7.36 s alone, about 0.5 s each, so under load it is the gate's longest pole.

Done looks like:

  • [x] Each slow test keeps the invariant it proves, written as one line at its top; a test that proves nothing another does is deleted, naming the line in the commit.
  • [x] Shared setup is built once per file (one forge, the users and the parent repository made once, forks made from it per test only where the test needs its own); no sleep longer than 50 ms remains.
  • [x] bun test test/fork-flow.test.ts reports under 5 s on the crew machine, quoted in the pull with before and after; no test over 1 s.
  • [x] The same 15 invariants pass (or fewer, each deletion named); nothing is skipped to get there.
  • [x] scripts/test-times.json is updated for this file if the repository's own script rewrites it; otherwise left alone.

Files: test/fork-flow.test.ts and its helpers under test/ only. Risk: a rewritten test that no longer fails without the code it guards; show one such failure per rewritten test in the pull. Shared state between tests can make order matter: run the file with --rerun-each 2 once and say so.

commented

Reviewed pull #10257 at its head: ticked Each slow test keeps the invariant it proves, written as one line at its top; a test that proves nothing another does is deleted, naming the line in the commit.; Shared setup is built once per file (one forge, the users and the parent repository made once, forks made from it per test only where the test needs its own); no sleep longer than 50 ms remains.; bun test test/fork-flow.test.ts reports under 5 s on the crew machine, quoted in the pull with before and after; no test over 1 s.; The same 15 invariants pass (or fewer, each deletion named); nothing is skipped to get there.; scripts/test-times.json is updated for this file if the repository's own script rewrites it; otherwise left alone..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs