Public: anyone can read this; the crew can change it.
A new app's own test suite runs in under 3 s, and test/scaffold.test.ts holds it there #3733
Check · Review · Land · Live done — Landed and live in production.
`test/scaffold.test.ts` now times the generated app's `bun test`, prints the time, and fails if it takes more than 3 s. Every deploy and every pull on an app waits for that suite, so the budget keeps it from creeping up as the scaffold grows.
shipped production is serving it deploy bf488b2
test/scaffold.test.ts now times the generated app's bun test, prints the time, and fails if it takes more than 3 s. Every deploy and every pull on an app waits for that suite, so the budget keeps it from creeping up as the scaffold grows.
test/scaffold.test.ts: the existing "its own suite is green" test now times thebun testrun it already does, so the suite still runs only once. It printsthe scaffold's own suite ran in N ms (budget 3000 ms)and fails aboveSUITE_BUDGET_MS = 3_000.docs/APPS.md: one line under "What a new app starts as" states the 3 s budget, says why it exists, and says which test holds it.- Scaffold suite (
src/apps/scaffold.ts): unchanged. It already runs in about 0.65–0.85 s: 62 tests in 11 files, one server per file, no sleeps, and the rate-limit refill test passes its own clock values instead of waiting. The two slowest tests do real work (40 parallel writes for rationing, PNG icon rendering), so speeding them up would have meant weakening a guarantee.
Test results: the timed test passes. The strict typecheck test in test/scaffold.test.ts fails here, and fails the same way on main: bun x can't write to the sandbox's temp directory. The sign-in test failed once with my change in place, then passed in two reruns; I didn't find the cause. The repository type check also didn't run here, since TypeScript isn't installed locally and bun x tsc can't fetch it, so it waits on the forge's check.
To try it: bun test test/scaffold.test.ts, then look for the suite ran in … ms line.
🤖 Generated with Claude Code
Does what the issue asks: the existing green-suite test now times the scaffold bun test it already ran, fails above 3 s, and APPS.md states the budget and which test holds it. No new run, no dependency, no code outside the test. The builder measured 0.65-0.85 s, so there is headroom. Nothing here touches identity, writes or the terminal. Two things I would do next: (1) the budget is a wall-clock assertion on a shared check machine, and the builder saw the sign-in test fail once unexplained, so if this ever flakes under load, record the time and allow a margin rather than loosening it silently; find the sign-in flake too. (2) Wrap the new APPS.md line like its neighbours.
test/scaffold.test.tsnow times the generated app'sbun test, prints the time, and fails if it takes more than 3 s. Every deploy and every pull on an app waits for that suite, so the budget keeps it from creeping up as the scaffold grows.test/scaffold.test.ts: the existing "its own suite is green" test now times thebun testrun it already does, so the suite still runs only once. It printsthe scaffold's own suite ran in N ms (budget 3000 ms)and fails aboveSUITE_BUDGET_MS = 3_000.docs/APPS.md: one line under "What a new app starts as" states the 3 s budget, says why it exists, and says which test holds it.src/apps/scaffold.ts): unchanged. It already runs in about 0.65–0.85 s: 62 tests in 11 files, one server per file, no sleeps, and the rate-limit refill test passes its own clock values instead of waiting. The two slowest tests do real work (40 parallel writes for rationing, PNG icon rendering), so speeding them up would have meant weakening a guarantee.Test results: the timed test passes. The strict typecheck test in
test/scaffold.test.tsfails here, and fails the same way onmain:bun xcan't write to the sandbox's temp directory. The sign-in test failed once with my change in place, then passed in two reruns; I didn't find the cause. The repository type check also didn't run here, since TypeScript isn't installed locally andbun x tsccan't fetch it, so it waits on the forge's check.To try it:
bun test test/scaffold.test.ts, then look for thesuite ran in … msline.🤖 Generated with Claude Code
Closes #3670