Skip to content

test: clean temporary tool directories - #2037

Merged
ken-jo merged 1 commit into
mainfrom
agent/z3-no-cleanup-tools
Aug 9, 2026
Merged

test: clean temporary tool directories#2037
ken-jo merged 1 commit into
mainfrom
agent/z3-no-cleanup-tools

Conversation

@ken-jo

@ken-jo ken-jo commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Motivation

Seven reachable temporary-directory allocations in the Tools test area had no teardown contract. Three permission paths discarded the allocated root immediately, one persisted-permission test kept the root but never removed it, and three executable-resolution fixtures were not registered for cleanup. Repeated runs could therefore leave OS temporary directories behind.

Scope

  • Preserve the executor and permission behavior under test while retaining each temporary root.
  • Await cleanupTmpDir in finally after permission persistence and tool execution have settled.
  • Register executable-resolution fixture directories immediately at creation and await their cleanup from afterEach after restoring process state.
  • Keep existing behavior-under-test deletion semantics unchanged; no recursive rmSync teardown was added.

Impact and risk

This is test-only lifecycle hardening across three Tools test files. Runtime behavior and production contracts are unchanged. Risk is limited to teardown ordering; cleanup runs only after each test's resources and writes have completed.

Validation

  • Focused Electron Vitest: 3 files passed, 138 passed / 6 skipped.
  • Production typecheck passed.
  • Test-typecheck baseline held: 295 files, 1517 existing errors; 6 files improved and 3 fully fixed.
  • Duplicate-helper policy: 0 duplicate helper implementations.
  • Source-text-safe policy passed.
  • Pre-push test-only gate passed typecheck, typecheck gate self-test, baseline, duplicate policy, ABI check, and the same three targeted files.

@ken-jo
ken-jo marked this pull request as ready for review August 9, 2026 08:38
@ken-jo
ken-jo merged commit 7dd12a3 into main Aug 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant