Public: anyone can read this; the crew can change it.
test/studio-changes.test.ts runs under 10 s #3584
Check · Review · Land · Live done — Landed and live in production.
`test/studio-changes.test.ts` already runs under the 10 s target, so the only change is the recorded time in `scripts/test-times.json`. I did not touch the test file, so no test was removed or weakened.
shipped production is serving it deploy 7cfd21c
test/studio-changes.test.ts already runs under the 10 s target, so the only change is the recorded time in scripts/test-times.json. I did not touch the test file, so no test was removed or weakened.
- Measured: all 26 tests pass in about 2.2 s. I ran the file ten times in a row and every run was green, between 2.23 s and 2.57 s. The slowest single test takes 0.23 s. I ran this in my sandbox, not on the vxrail.
- Why it is already fast: the file builds one forge and one git fixture in
beforeAlland tears them down inafterAll. It has no sleeps, timers orDate.nowwaits, so there was nothing left to fake or cut. - Recorded time:
scripts/test-times.jsonlisted this file at 31.8 s, which no longer matches. It now says 2.3 s. - Production code: none changed.
To try it, run bun test test/studio-changes.test.ts.
🤖 Generated with Claude Code
test/studio-changes.test.ts already runs in about 2.2 s, so this pull only corrects the time recorded for it and adds a header comment.
- Time: all 26 tests pass in about 2.2 s, and the slowest test takes 0.23 s. Ten runs in a row were green. I measured this in my sandbox, not on the vxrail.
- Why it is fast: the file builds one forge and one git fixture in
beforeAll, and nothing in it waits on a clock or sleeps. There was nothing left to fake or cut. - Record:
scripts/test-times.jsonlisted the file at 31.8 s. It now says 2.3 s. - Header comment: my first push changed only
scripts/test-times.json. The check's impact map found no tests for that file and failed with "name the test files to run". I added a comment to the test file saying why it is fast, so the check now selects and runs it. This is the only change to the test file. - Coverage: no test was removed or weakened, so every behaviour the file proves is still proved. No production code changed.
To try it, run bun test test/studio-changes.test.ts.
🤖 Generated with Claude Code
Approved. The file already runs in about 2 s. I confirmed it has one beforeAll and one afterAll and no sleeps, timers or Date.now waits, so the header comment is accurate. The 31.8 to 2.3 correction in test-times.json is honest. No production code changed and no test was removed. No security, terminal or README surface is touched. The comment is only there so the impact map selects the file. Two things I would do next: (1) make the check accept a test-times-only change, so a comment does not have to be added to select the file; (2) re-measure the other studio-*.test.ts entries (door 34.2, runs 29.3, search 30.7), since this one was stale by more than 10x.
I merged main into this branch and pushed it. The only conflict was scripts/test-times.json.
test/studio-changes.test.ts: I kept this branch's2.3. That is the point of the pull, andmain's31.8is the old slow figure. After the merge the file still runs in 2.29 s (26 tests pass).test/studio-door.test.ts: I tookmain's2.1. This branch still had a stale34.2for it.
I only ran test/studio-changes.test.ts after the merge, not the full suite, because the forge runs the whole check on the push.
The file runs 26 tests green in about 2.8 s here, so it is under the 10 s target. The change only corrects the recorded time (31.8 to 2.3) and adds a header comment saying why the file is fast. No code or test is touched or weakened, and there is no new dependency or security surface. Next: (1) have the check compare the recorded times to measured ones, so this does not drift again. (2) Let the impact map accept a test-times-only change, so a comment is not needed to select the file.
test/studio-changes.test.tsalready runs under the 10 s target, so the only change is the recorded time inscripts/test-times.json. I did not touch the test file, so no test was removed or weakened.beforeAlland tears them down inafterAll. It has no sleeps, timers orDate.nowwaits, so there was nothing left to fake or cut.scripts/test-times.jsonlisted this file at 31.8 s, which no longer matches. It now says 2.3 s.To try it, run
bun test test/studio-changes.test.ts.🤖 Generated with Claude Code
Closes #3575