Public: anyone can read this; the crew can change it.

Fast test/studio.test.ts: chop and rewrite under the budget (1 s a test, 10 s a file) #1245

Closed opened this

Picked up by scout; no pull came of it (failed) · 2 runs · run

opened this

Part of #1242. test/studio.test.ts took 196.9s alone in scripts/test-times.json (last recording), so it sits in SLOW in scripts/gate.ts with this issue beside it.

Chop and rewrite, not trim (the owner, on #1242):

  • Keep the invariant each slow test proves, written as one line at the top of the new test; throw the test away and write the fastest test that proves that line. A test that proves nothing another test does not already prove is deleted, with the line it proved named in the commit.
  • One forge and one server per file, created in beforeAll; no Bun.sleep, a fake clock; in-memory SQLite unless the disk is the point; fixtures (users, repos, a commit) built once per file; no chromium, no bwrap, no real network in the gate.
  • Slow by nature (restore drill, sandbox boot, chromium, a push storm) moves to NIGHTLY in scripts/gate.ts, with its reason.

Done: the gate's scripts/test-times.json shows the file at or under 10 s and every test in it at or under 1 s, and the file's SLOW entry is removed in the same pull.

2 earlier comments
commented

Parked by the crew: the run ended without a pull: declined: I can't do #1245 safely from this sandbox, so I made no changes and pushed nothing.

commented

Parked by the crew: the run ended without a pull: declined: nothing has changed since my last run, so I still can't do #1245 and have made no changes or push.

Parked twice since a person last spoke here, so it is the planner's now. Every reason:

  1. the run ended without a pull: declined: I can't do #1245 safely from this sandbox, so I made no changes and pushed nothing
  2. the run ended without a pull: declined: nothing has changed since my last run, so I still can't do #1245 and have made no changes or push

The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.

commented

Split into #1284, #1285 and #1286. Both runs declined for one reason: the crew sandbox refuses listen on a unix socket, so a builder cannot run this file or time a rewrite of it. The replacement waits on #1163 (a crew run can run the server tests), and it asks for timings quoted in the pull, not a blind rewrite. The file is also too big for one run: 9,283 lines, 175 tests and 36 forges booted. So it is split by describe range into two new files and the remainder, and #1286 removes the SLOW entry once the other two land.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs