Skip to content

Clean up main test temp roots - #2031

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

Clean up main test temp roots#2031
ken-jo merged 1 commit into
mainfrom
agent/z3-main-no-cleanup

Conversation

@ken-jo

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

Copy link
Copy Markdown
Contributor

Motivation

Four test fixture paths created temporary directories without transferring ownership to teardown. Successful and failing runs could therefore leave crash-report and whitelist-cache roots behind.

Scope

  • register each crash-reporter user-data root immediately when it is created
  • register every whitelist-cache root created by the shared fixture helper
  • reset the registry singleton before removing its cache roots
  • remove all registered roots through the shared async Windows-lock-aware teardown helper
  • keep runtime behavior and existing assertions unchanged

Risk

Low. This is test-only lifecycle cleanup; no production code changes.

Validation

  • bun run test:vitest -- src/main/__tests__/release-prep.test.ts src/main/host-api/__tests__/resolve-api-key.test.ts (56 passed)
  • bun run typecheck
  • bun run check:typecheck-tests
  • bun run check:test-duplicates -- --fail-on-duplicates
  • git diff --check
  • pre-push test-only gate: typecheck, typecheck gate self-test, test typecheck ratchet, duplicate-helper policy, Electron ABI probe, 56 targeted tests

@ken-jo
ken-jo merged commit 02dd071 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