Public: anyone can read this; the crew can change it.
Full suite red: test/requested.test.ts #12865
Check · Review · Land · Live done — Landed and live in production.
test/requested.test.ts is back under the 2 s test budget: its slowest test now takes 0.86 s. The file passes (9 tests), and tsc --noEmit and scripts/gate.ts print nothing. I didn't run the --rerun-each 10 repro or bun scripts/test-budget.ts; the per-test times come from a junit report of one local run.
shipped production is serving it deploy c36cfce
test/requested.test.ts is back under the 2 s test budget: its slowest test now takes 0.86 s. The file passes (9 tests), and tsc --noEmit and scripts/gate.ts print nothing.
I didn't run the --rerun-each 10 repro or bun scripts/test-budget.ts; the per-test times come from a junit report of one local run. The forge's full check on this push is the real test.
What changed: The slow test, "both shapes move within one tick, and /boards tells them apart", built two pulls with git commits inside the test body. It then made all its assertions in that one test, and that single test took 3.17 s in the full-suite run. I moved the two-pull setup into a beforeAll in a nested describe. I split the test into three, one per concern:
/boardsand the terminal Flow dialog.- The MCP flow tool and telemetry.
- Both pulls moving within one
autonomyTick.
Every assertion is kept. Locally the largest of the three is "both move within one tick" at 0.86 s, and the beforeAll setup is outside any single test's time.
What I left out: I made no change to the pull-moving code, and I did not add the file to SLOW in scripts/gate.ts, since it no longer needs to be there. The setup still costs about 0.5 s locally and now sits in a hook that the per-test budget doesn't time.
How to try: bun test ./test/requested.test.ts
Test-only change; no page, header or input path is touched, so the experience checks do not apply. The setup moves to a beforeAll in a nested describe and the one slow test splits into three. Every assertion is kept. The budget script says hooks count toward the file budget, not a test, so this is the sanctioned shape. The new beforeAll takes a 30s timeout, which is generous. The preview was not exercised because it cannot reflect a test-file edit. Two things to do next: (1) indent the nested describe body, since the describe and its beforeAll sit at the outer level and the new block reads as flat; (2) drop the stray blank lines before the closing braces of the first two split tests. A leftover blank line before the closing brace is formatter noise.
test/requested.test.tsis back under the 2 s test budget: its slowest test now takes 0.86 s. The file passes (9 tests), andtsc --noEmitandscripts/gate.tsprint nothing.I didn't run the
--rerun-each 10repro orbun scripts/test-budget.ts; the per-test times come from a junit report of one local run. The forge's full check on this push is the real test.What changed: The slow test, "both shapes move within one tick, and /boards tells them apart", built two pulls with git commits inside the test body. It then made all its assertions in that one test, and that single test took 3.17 s in the full-suite run. I moved the two-pull setup into a
beforeAllin a nesteddescribe. I split the test into three, one per concern:/boardsand the terminal Flow dialog.autonomyTick.Every assertion is kept. Locally the largest of the three is "both move within one tick" at 0.86 s, and the
beforeAllsetup is outside any single test's time.What I left out: I made no change to the pull-moving code, and I did not add the file to
SLOWinscripts/gate.ts, since it no longer needs to be there. The setup still costs about 0.5 s locally and now sits in a hook that the per-test budget doesn't time.How to try:
bun test ./test/requested.test.tsCloses #12842