You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test helpers leak temp dirs into os.tmpdir() on every test run #7884
createFakePluginHost (packages/plugin-sdk/src/testing/fake-plugin-host.ts) creates a bb-fake-plugin-host-* dir under os.tmpdir() for every host and removes it only in dispose(), so every test that skips dispose() leaks one. Other test helpers leak the same way: the agent-runtime scripted-echo harness, the parity replay default dataDir, and about a dozen individual tests. One machine running plugin tests had more than 23,000 of these dirs (3.8 GB).
Versions and environment
main at b629714, Node 24.22.2, macOS, vitest 4.1.1.
Steps to reproduce
T=$(mktemp -d)
TMPDIR=$T pnpm exec turbo run test --filter=@get-bb/plugin-sdk --env-mode=loose --force
ls "$T"| grep -c bb-fake-plugin-host
--env-mode=loose is needed because turbo strips TMPDIR otherwise, which sends tests to /tmp.
Expected vs actual
Expected: 0
Actual: 69. Other suites on main left: agent-runtime 392, bb-app 59, provider-parity 48, simple-notes plugin 31.
Evidence
process.on("exit") cleanup can't help: vitest stops its fork workers with SIGTERM, so exit never fires. A probe confirmed this in both shared and isolated workers.
What you ruled out
The tool caches (tsx-*, jiti, node-compile-cache) are not counted.
Verification: two trusted-main checkouts at 9f4c15646d; each full SDK run passed 444 tests and left 0 fake-host directories and 0 runner sandboxes. These were Linux runs; macOS was not rechecked.
Root cause: helper-local storage still depends on explicit disposal, but the shared runner now owns the entire temporary tree and removes it after the last project finishes. This protection landed in Sandbox test TMPDIR so vitest runs stop leaking temp directories #3638 on September 14, 2026, after the cited August 27, 2026 baseline.
Activity
bb-slop-cop commentedon Nov 20, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotplugins,no-repro.9f4c15646d; each full SDK run passed 444 tests and left 0 fake-host directories and 0 runner sandboxes. These were Linux runs; macOS was not rechecked.