Skip to content

test: remove the temporary directories tests create - #468

Merged
Mearman merged 1 commit into
mainfrom
fix/test-temp-cleanup
Oct 27, 2026
Merged

Mearman merged 1 commit into
mainfrom
fix/test-temp-cleanup

Conversation

@Mearman

@Mearman Mearman commented Oct 27, 2026

Copy link
Copy Markdown
Member

Tests made their throwaway directories under the system temporary directory and never removed them, so every run left directories behind. Every test directory now comes from a scratchDirectory helper that tracks what it creates and removes it when the test file finishes, with a process-exit sweep for anything left. The mesh smoke runner points its children at a directory it owns, because a child killed on a timeout cannot clean up.

Closes #462

Tests made their throwaway directories with fs.mkdtempSync under the
system temporary directory and never removed them, so every run left
directories behind.

Every test directory now comes from a scratchDirectory helper that tracks
what it creates. A vitest setup file removes the tracked directories when
each test file finishes, and the helper removes any still left when the
process exits. The mesh smoke runner points its child processes at a
directory it owns, since a child killed on a timeout cannot clean up.

Fixes #462
@Mearman
Mearman marked this pull request as ready for review October 27, 2026 20:43
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ⚠️ Failed 2026-10-27T20:44:02.284898Z
We couldn’t complete this review. Comment @codex security review to try again.
8afcd09 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@Mearman
Mearman merged commit c1eb377 into main Oct 27, 2026
8 checks passed
@Mearman
Mearman deleted the fix/test-temp-cleanup branch October 27, 2026 20:44
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 8.15.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests leave their temporary directories behind

1 participant