Public: anyone can read this; the crew can change it.
test/forks.test.ts runs under 10 s #3597
Check · Review · Land · Live done — Landed and live in production.
`scripts/test-times.json` now records `test/forks.test.ts` at 1.5 s instead of 28.9 s. That one line is the whole change.
shipped production is serving it deploy 97ab7b8
scripts/test-times.json now records test/forks.test.ts at 1.5 s instead of 28.9 s. That one line is the whole change.
The file was already fast. #1290 rewrote it to share one forge and one git fixture across the file and to wait on event-loop turns instead of a clock or a sleep, and #2138 kept it that way. The 28.9 s figure was written by #515 and never refreshed, so the shard planner was still treating this file as one of the slowest in the gate.
- Time:
bun scripts/test-shards.ts --record test/forks.test.tsmeasured 1.5 s for the file,beforeAllincluded. Bun only prints a time for a single test when it is slow, and it printed none here. - Stability:
bun test test/forks.test.tspassed ten times in a row: 8 pass, 0 fail, 1.35–1.48 s each. - What it proves: the same 8 tests as on
main, with no test deleted or changed and no production code touched. - Not done: the record tool also re-sorted three unrelated
crew-*entries in the table. I left those out so the diff only touches the line this issue owns.
To try it: bun test test/forks.test.ts.
🤖 Generated with Claude Code
test/forks.test.ts was already well under 10 s. #1290 rewrote it to build one forge and one git fixture per file and to wait on event-loop turns instead of a clock or a sleep. What was still wrong was the record: scripts/test-times.json had listed it at 28.9 s since #515, so the shard planner was still treating it as one of the slowest files in the gate.
What changed
scripts/test-times.json:test/forks.test.tsis now 1.5 s, measured withbun scripts/test-shards.ts --record test/forks.test.ts. The record tool also re-sorted threecrew-*lines; I left those out so only this file's line changes.scripts/test-shards.ts(outside the issue's file list, but it's why the first check failed): the planner insrc/checks/tiers.tsalready decides that a change totest-times.jsonalone reaches no tests. The script then fell through to the "name the test files to run, or --gate" usage error and exited 2. Any pull that only touches the timing table, like this one, could never go green. An empty fast-tier plan now prints "the change reaches no tests; nothing to run" and exits 0, the same way the empty matrix slice just below it already does.test/shards.test.ts: a new test, "a pull no test reaches is green with nothing to run, not a usage error". It builds a throwaway repo whose only commit changesscripts/test-times.json, hands the script an impact map that reaches nothing, and expects exit 0 with the new message. It fails without the fix.
Not changed
test/forks.test.ts: no test deleted or edited, so its 8 tests prove what they proved before.- No other test file.
Checked
bun test test/forks.test.tspassed ten times in a row, 1.38–1.51 s for the whole file.test/shards.test.tspasses 69/69 andtsc --noEmitis clean.
To try it: bun test test/forks.test.ts, then bun test test/shards.test.ts -t "no test reaches".
🤖 Generated with Claude Code
Approved. The issue asked for forks.test.ts under 10 s; it already was, and the stale 28.9 s record was the real defect. Correcting it to 1.5 s is right, and the empty fast-tier plan now exits 0 like the empty slice below it. The new test builds a real throwaway repo and would fail without the fix. I could not load the preview from my sandbox (network denied), and this change has no user-facing surface anyway. Two things to do next: (1) refresh other stale entries in test-times.json with --record so the planner stops over-weighting them, including the three crew-* lines left unsorted; (2) make the test-shards.ts message say which condition made the plan empty (no impact reached vs. no tests listed), so a mistake in --diff is not read as a green no-op.
scripts/test-times.jsonnow recordstest/forks.test.tsat 1.5 s instead of 28.9 s. That one line is the whole change.The file was already fast. #1290 rewrote it to share one forge and one git fixture across the file and to wait on event-loop turns instead of a clock or a sleep, and #2138 kept it that way. The 28.9 s figure was written by #515 and never refreshed, so the shard planner was still treating this file as one of the slowest in the gate.
bun scripts/test-shards.ts --record test/forks.test.tsmeasured 1.5 s for the file,beforeAllincluded. Bun only prints a time for a single test when it is slow, and it printed none here.bun test test/forks.test.tspassed ten times in a row: 8 pass, 0 fail, 1.35–1.48 s each.main, with no test deleted or changed and no production code touched.crew-*entries in the table. I left those out so the diff only touches the line this issue owns.To try it:
bun test test/forks.test.ts.🤖 Generated with Claude Code
Closes #3579