Repository navigation
Remove test temp folders when the test process exits - #220
Merged
Merged
Conversation
tmpdir() and the e2e seedHome() created a fresh home or repo for every test and never removed it: by 2026-10-15 about 170,000 such folders (24 GB) had filled the disk. Both now record what they create and remove it when the process exits (node --test runs each file in its own process; Playwright workers exit after their tests). Set MODEX_KEEP_TEST_TMP=1 to keep them for debugging. The layout test's two direct mkdtemp calls use the helper too. A full unit run now leaves about nine folders, from native helper builds and Node's compile cache, instead of hundreds. Coven-Harness: Claude Code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Unit and e2e tests created a fresh temporary home or repo for nearly every test and never removed it. By 2026-10-15,
$TMPDIRheld about 170,000modex-repo-*,modex-home-*,modex-script-*,modex-desktop-*andmodex-e2e-*folders (24 GB). The disk reached 100%, and builds and tests failed for every session on this Mac.test/helpers.ts:tmpdir(), whichgitRepo()andwriteScript()also use, records each folder and removes it when the test process exits.node --testruns each file in its own process.e2e/support.ts:seedHome()does the same for its home and repo when the Playwright worker exits. Relaunches within a test still reuse the same home.MODEX_KEEP_TEST_TMP=1keeps everything for debugging.layout.test.ts's two directmkdtempcalls now use the helper.Verified by running the full unit suite with
TMPDIRpointed at an empty folder. Before the layout change, 11 folders were left behind: 8 from native helper builds, 2modex-ws-*(now fixed) and Node's compile cache. Before this change, every run left hundreds.That run also had 9 terminal test failures. They came from the long scratch
TMPDIRpath, not this change: allterminal*tests pass with the normalTMPDIR(26 passed, 6 skipped). The layout tests and typecheck pass.