Repository navigation
Run bun test files in parallel (fixes #261) - #277
Merged
Merged
Conversation
theogravity
force-pushed
the
feat/parallel-tests
branch
from
September 30, 2026 02:40
abcc208 to
f4f9a09
Compare
…red until helper)
…s parallel workers
…default (par-test.sh)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Turns on
bun test --parallelfor every package and removes the two hazards that only survived serial execution (measured facts, probed on 1.4.0 and 1.4.2):afterAllfires once per run serially but after EVERY file under--parallel. The run-wide tmux kill-all moved fromtest-preload.tstoscripts/test-run.sh, which outlives every worker. (The leak net itself predates this PR; seedocs/testing-notes.md.)@/dbsingleton without migrating it, riding file order in the one-process serial run. They now callensureMigratedTestDb()(+prepareLocalPlugins()where the restart gate needs it) inbeforeAll. Idempotent, serial stays green.Then the flag:
--parallel=12for server/api, server/web, node/agent;--parallel=4everywhere else; in thetestscripts (bun ignores aparallelkey inbunfig.toml, measured;bun.com/docs/testlists it as CLI-only).Numbers (48-core dev machine, 51 turbo tasks)
Verification
bun run test(51/51 tasks, 0 failed tests) on bun 1.4.2, plus a--parallel=1serial gate on the server package andtest:scripts;verify-types,lint:check,lint:proseclean.@internal/desktop-servermeta-test pinning the test-script string) is fixed in 1d2b919.Design + plan:
docs/superpowers/specs/2026-09-29-parallel-tests-design.md,docs/superpowers/plans/2026-09-29-parallel-tests.md. CI--shardsplit oftest-server-nodefollows as a stacked PR.No changeset: test infra only, no shipped code changes.