Files
Trevin Chow 717884222b perf(ci): run the test suite in parallel worker processes
The CI `Run tests` step is the whole job: it took 193-237s (median ~224s)
across the last seven successful runs, while every other step in the job
totals ~12s.

Almost none of that is CPU. The suite is ~98 files that spend their time
blocked on subprocesses -- `python3` script invocations, `bash` sandbox
scripts, `git` fixture repos, and `bun run src/index.ts` CLI spawns -- plus
deliberate real sleeps in the peer-job-runner and cross-model route tests.
Bun ran all of it in one process, so the runner's other cores sat idle.

Bun 1.3 can distribute test files across worker processes, so put
`--parallel` on the package `test` script and have CI invoke `bun run test`.
Keeping the flag in the script rather than the workflow means the command
CI runs and the command a contributor runs cannot drift apart.

`--parallel` implies `--isolate`, which promotes cross-file isolation from
incidental to load-bearing: a test file may no longer rely on another file's
leftovers. Documented in AGENTS.md, along with the one deliberate exception
(ce-code-review-cross-model-routes stages a repo-root marker to exercise
dirty-tree handling, and cleans it up in afterAll).

Claude-Session: https://claude.ai/code/session_01EW4bpYuKU2KpVy3qqEZX9r
2026-07-22 18:57:18 -07:00
..