test: run suites without --isolate and remove three flaky tests
Drop --isolate
The cross-file leaks that --isolate hid are fixed in #8314, #8315, #8316 and #8319. This removes the flag from all 26 test scripts, so each package's suite runs in one process. packages/host-service keeps --parallel. The one line in AGENTS.md that named the flag is corrected.
The desktop suite takes about 38 s without the flag and about 73 s with it.
One more leak, found by the sweep
apps/relay/src/host-tunnel.test.ts replaced partyserver with { Server: class {} }. In some file orders index.test.ts then failed to load with Export named 'getServerByName' not found. The test passes against the real module, so the stub is removed.
Flaky tests removed
| Test | Seen failing |
|---|---|
workspace-fs: "FsWatcherManager root deletion recovery > resumes the same subscription after the root is deleted and recreated" | on main and on PRs, 2026-10-07/08 |
i18n: "locale changes preserve state and focus while updating context formatters", with its fixture | on #8270 and in the canary experiment |
agent-setup: "Pi completion notifications" (3 cases) | once in 13 runs, on a heavily loaded machine; it polls up to 1 s of real time for a detached script |
The second workspace-fs recovery test ("does not hang teardown after root deletion") stays. The Pi deletion removes all coverage of Pi completion notifications.
Verification
bun 1.4.2, bun test --randomize --seed N without --isolate: every one of the 26 packages passes on seeds 31, 32 and 33; apps/relay also on 34-36 after its fix. Biome passes on apps and packages; typecheck passes in apps/relay and packages/workspace-fs.
Summary by cubic
Drops --isolate from all 26 test scripts now that the cross-file leaks it hid are fixed, so each package's suite runs in one process. The desktop suite drops from about 73 s to about 38 s; packages/host-service keeps --parallel.
Removes the partyserver stub in apps/relay/src/host-tunnel.test.ts, which lacked getServerByName and broke index.test.ts in some file orders.
Also removes three flaky tests: the workspace-fs root-deletion recovery test, the i18n locale-state fixture, and the agent-setup Pi completion notification tests (also removing the only coverage of that feature).
- Renames the Postgres watch test to
watch-ownership.postgres.integration.tsso it no longer runs in the shared suite; it setsDATABASE_URLand imports the db client, which in one process could write fixtures to whichever database the first file connected to. It now runs only when named, in its own process, like the other opt-in suites.
Summary by CodeRabbit
- Chores
- Test suites now run in a single process rather than using isolated runs.
- Removed several tests covering completion notifications, locale-provider behavior, and recovery of file-watch subscriptions after a watched folder is recreated.