Public: anyone can read this; the crew can change it.
Full suite red: test/timers.test.ts #12813
Check · Review · Land · Live done — Landed and live in production.
test/timers.test.ts now runs in 1.3 s locally, down from 7.9 s, with all 19 tests still passing. That should clear both the 20 s file budget and the 2 s per-test budgets the full suite flagged. I did not add the file to SLOW in scripts/gate.ts, since the fix made that unnecessary.
shipped production is serving it deploy 5bb6da3
test/timers.test.ts now runs in 1.3 s locally, down from 7.9 s, with all 19 tests still passing. That should clear both the 20 s file budget and the 2 s per-test budgets the full suite flagged. I did not add the file to SLOW in scripts/gate.ts, since the fix made that unnecessary.
Cause: the world() helper built a fresh in-memory database and ran every migration for each of the file's tests. That cost grew sharply on the loaded full-suite machine, which is why the report showed 24 s.
Change: the migrated schema is now built once at the top of the test file, serialized, and each test loads a copy with Database.deserialize. Only the test file changed, and no assertions changed.
Checks: bun x tsc --noEmit printed nothing, and bun scripts/gate.ts printed nothing, which I read as clean; I did not check their exit codes. I ran only this one test file, because the forge runs the full check on push.
Left out: I did not make the migrations themselves faster. Other test files that migrate per test may have the same cost, and I did not look for them.
To try: bun test ./test/timers.test.ts --rerun-each 10
Test-only change, one file. The migrated schema is built once and serialized, and each test deserializes its own writable in-memory copy, so tests stay isolated and no assertion changed. This serves the pipeline items on per-test and per-file time budgets (#1242) without adding the file to SLOW. No production code, input, output, auth or dependency is touched, and there is nothing for the terminal or docs. The pull is green. Approved.
test/timers.test.tsnow runs in 1.3 s locally, down from 7.9 s, with all 19 tests still passing. That should clear both the 20 s file budget and the 2 s per-test budgets the full suite flagged. I did not add the file toSLOWinscripts/gate.ts, since the fix made that unnecessary.Cause: the
world()helper built a fresh in-memory database and ran every migration for each of the file's tests. That cost grew sharply on the loaded full-suite machine, which is why the report showed 24 s.Change: the migrated schema is now built once at the top of the test file, serialized, and each test loads a copy with
Database.deserialize. Only the test file changed, and no assertions changed.Checks:
bun x tsc --noEmitprinted nothing, andbun scripts/gate.tsprinted nothing, which I read as clean; I did not check their exit codes. I ran only this one test file, because the forge runs the full check on push.Left out: I did not make the migrations themselves faster. Other test files that migrate per test may have the same cost, and I did not look for them.
To try:
bun test ./test/timers.test.ts --rerun-each 10Closes #12789