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

Full suite red: test/spawn-move-cell.test.ts #12854

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

I split test/spawn-move-cell.test.ts into two files so each stays under the 20 s file budget. Locally the whole file took 27 s, and the two halves now take about 10 s each. bun x tsc --noEmit and bun scripts/gate.ts are clean, and all 21 tests pass across the two files.

Notes

shipped production is serving it deploy e5f3b40

opened this

I split test/spawn-move-cell.test.ts into two files so each stays under the 20 s file budget. Locally the whole file took 27 s, and the two halves now take about 10 s each. bun x tsc --noEmit and bun scripts/gate.ts are clean, and all 21 tests pass across the two files. The branch is pushed; I did not run the full suite.

  • What moved: the original file keeps the move, interrupted-move and cell-failure tests (11 tests). The new test/spawn-move-cell-sizes.test.ts holds the other 10: the size tests, the hook test, the automatic pass and the admin action. It carries a copy of the original's setup and helper code, with the unused imports trimmed.
  • Why a split: about 0.5 s of each test is building a fresh family with makeFamily, mostly two git push calls. I didn't cache that setup. The tests change database and disk state, so sharing it risked cross-test leaks.
  • Docs: docs/THREATS.md now names both files as enforcing the move-into-a-cell invariant.
  • Not done: I didn't add the file to SLOW in scripts/gate.ts, and I didn't change any test's behaviour.
  • Margin: each half has roughly 2× headroom under the budget. A slower gate box could eat into that, and the next step would be speeding up makeFamily itself.

To try it: bun test ./test/spawn-move-cell.test.ts ./test/spawn-move-cell-sizes.test.ts.

Closes #12835

commented

I split test/spawn-move-cell.test.ts into two files so each stays under the 20 s file budget. Locally the whole file took 27 s, and the two halves now take about 10 s each. bun x tsc --noEmit and bun scripts/gate.ts are clean, and all 21 tests pass across the two files. The branch is pushed; I did not run the full suite.

  • What moved: the original file keeps the move, interrupted-move and cell-failure tests (11 tests). The new test/spawn-move-cell-sizes.test.ts holds the other 10: the size tests, the hook test, the automatic pass and the admin action. It carries a copy of the original's setup and helper code, with the unused imports trimmed.
  • Why a split: about 0.5 s of each test is building a fresh family with makeFamily, mostly two git push calls. I didn't cache that setup. The tests change database and disk state, so sharing it risked cross-test leaks.
  • Docs: docs/THREATS.md now names both files as enforcing the move-into-a-cell invariant.
  • Not done: I didn't add the file to SLOW in scripts/gate.ts, and I didn't change any test's behaviour.
  • Margin: each half has roughly 2× headroom under the budget. A slower gate box could eat into that, and the next step would be speeding up makeFamily itself.

To try it: bun test ./test/spawn-move-cell.test.ts ./test/spawn-move-cell-sizes.test.ts.

Approved

Pure test split, no behaviour change, no UI touched (nothing for phone/keyboard/no-JS). The 21 tests are preserved across both files, imports trimmed correctly, THREATS.md names both files. Two things I would do next: (1) the header comment of test/spawn-move-cell.test.ts still says it covers the too-big-size and hook cases, which now live in the sizes file; fix it and drop the trailing blank line at its end. (2) The setup block (beforeAll/afterAll, family(), events, rowOf) is copied into both files; move it into a helper next to helpers/moved-forge.ts so the two cannot drift, and add the new file to SLOW in scripts/gate.ts only if it measures over budget on the gate box.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs