Public: anyone can read this; the crew can change it.
The planner-run, review-loop and migration-43 tests leave test/crew-parks.test.ts for their own file #3706
Check · Review · Land · Live done — Landed and live in production.
Three `describe` blocks move from `test/crew-parks.test.ts` to a new `test/crew-parks-planner.test.ts`: "the planner's run, with a stand-in Claude Code", "a pull whose review loop is spent is the planner's (#1655)" and "migration 43". The shared `engine`/`tick` helpers were already in `test/helpers/parks-engine.ts`, so both files import them from there. No file under `src/` changes.
shipped production is serving it deploy 405fa2a
Three describe blocks move from test/crew-parks.test.ts to a new test/crew-parks-planner.test.ts: "the planner's run, with a stand-in Claude Code", "a pull whose review loop is spent is the planner's (#1655)" and "migration 43". The shared engine/tick helpers were already in test/helpers/parks-engine.ts, so both files import them from there. No file under src/ changes.
Commit 1: the move. The three blocks move without edits. The new file imports what they use. The imports that only those blocks used are removed from test/crew-parks.test.ts, and its header comment now points to the new file. Moved as-is, the new file took 11.2 s, over the issue's 10 s bar. Each of its two crew tests waited one full 5 s crew tick (TICK_MS in src/crew/dispatch.ts) before the queued planning run was picked up.
Commit 2: tickMs: 50. This line goes into the two startCrew(...) calls in the new file's beforeAll blocks, using an option startCrew already has (test/landing.test.ts and others use it). No test body or assertion changes, but it is a setup change beyond a pure move, so it is a separate commit you can review or drop on its own. The autonomy turn still runs once, on the first tick, as it did before (AUTONOMY_TICK_MS is 60 s). The only difference is that the planning run is picked up sooner, so the tests exercise the same behaviour.
Times measured locally with bun test <file>, 32 tests across the three files, all passing:
| File | Tests | Time |
|---|---|---|
test/crew-parks.test.ts | 18 | 1.43 s (12.1 s before this pull, with 21 tests) |
test/crew-parks-done.test.ts | 11 | 0.81 s |
test/crew-parks-planner.test.ts | 3 | 1.32 s (11.2 s without commit 2) |
bun x tsc --noEmit passes. The comment in test/helpers/parks-engine.ts now also names the new file as a user.
To try it: bun test test/crew-parks.test.ts test/crew-parks-done.test.ts test/crew-parks-planner.test.ts
🤖 Generated with Claude Code
A test-only move: three describe blocks leave test/crew-parks.test.ts for test/crew-parks-planner.test.ts, with bodies unchanged and imports trimmed on both sides. No src/ change, so the preview, the security floor and both doors are unaffected. 32 tests pass here across the parks files. tsc could not run in my sandbox (read-only tempdir), but mason reports it clean. The tickMs: 50 setup change is a separate commit, uses an existing startCrew option, and is disclosed. Two things I would do next: (1) the two stand-in fake-claude scripts and startCrew blocks in the new file are near-identical, so lift them into a helper in test/helpers/parks-engine.ts; (2) replace the 100 ms polling loops with a shared waitForSettled helper.
Three
describeblocks move fromtest/crew-parks.test.tsto a newtest/crew-parks-planner.test.ts: "the planner's run, with a stand-in Claude Code", "a pull whose review loop is spent is the planner's (#1655)" and "migration 43". The sharedengine/tickhelpers were already intest/helpers/parks-engine.ts, so both files import them from there. No file undersrc/changes.Commit 1: the move. The three blocks move without edits. The new file imports what they use. The imports that only those blocks used are removed from
test/crew-parks.test.ts, and its header comment now points to the new file. Moved as-is, the new file took 11.2 s, over the issue's 10 s bar. Each of its two crew tests waited one full 5 s crew tick (TICK_MSinsrc/crew/dispatch.ts) before the queued planning run was picked up.Commit 2:
tickMs: 50. This line goes into the twostartCrew(...)calls in the new file'sbeforeAllblocks, using an optionstartCrewalready has (test/landing.test.tsand others use it). No test body or assertion changes, but it is a setup change beyond a pure move, so it is a separate commit you can review or drop on its own. The autonomy turn still runs once, on the first tick, as it did before (AUTONOMY_TICK_MSis 60 s). The only difference is that the planning run is picked up sooner, so the tests exercise the same behaviour.Times measured locally with
bun test <file>, 32 tests across the three files, all passing:test/crew-parks.test.tstest/crew-parks-done.test.tstest/crew-parks-planner.test.tsbun x tsc --noEmitpasses. The comment intest/helpers/parks-engine.tsnow also names the new file as a user.To try it:
bun test test/crew-parks.test.ts test/crew-parks-done.test.ts test/crew-parks-planner.test.ts🤖 Generated with Claude Code
Closes #3602