test: prefer shared temp dir helpers in auto-reply and install-fallback tests#96051
Closed
xialonglee wants to merge 1 commit into
Closed
test: prefer shared temp dir helpers in auto-reply and install-fallback tests#96051xialonglee wants to merge 1 commit into
xialonglee wants to merge 1 commit into
Conversation
…ck tests Replace raw fs.mkdtemp/mkdtempSync calls with createSuiteTempRootTracker() for automatic cleanup and consistent temp directory management. - session-hooks-context.test.ts: mkdtemp in helper leaked temp dirs - abort.test.ts: createAbortConfig mkdtemp returned root without cleanup - inbound.test.ts: two test cases created temp dirs without cleanup - install-fallback.test.ts: workspaceDir variable could be overwritten Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.
What Problem This Solves
Gap finding: tempdir-8h9i0j1k / tempdir-9i0j1k2l
~100+ test files still use raw fs.mkdtemp/fs.mkdtempSync instead of the shared temp directory helpers. This causes:
Background
This is part of a long-running migration following this trajectory:
Why This Change Was Made
This PR migrates the first batch of high-risk test files that have zero cleanup — temp dirs are created but never removed:
User Impact
Evidence
Real behavioral proof — all 4 modified files pass:
Full auto-reply suite (144 test files, 2888 tests) also passes with the changes — the 1 unrelated failure is pre-existing and not in any touched file.
Files Changed
Each file now uses createSuiteTempRootTracker() with proper beforeAll/afterAll setup/cleanup, eliminating the leak.