Skip to content

test(updates): dispose orchestrator fixture temp dirs - #403

Merged
andrescera merged 2 commits into
mainfrom
test/orchestrator-fixture-tempdir-cleanup
Oct 22, 2026
Merged

andrescera merged 2 commits into
mainfrom
test/orchestrator-fixture-tempdir-cleanup

Conversation

@andrescera

Copy link
Copy Markdown
Member

What

The orchestrator test helper now removes every temp directory it creates (a disposer run from the consuming tests' cleanup), instead of relying on a process exit handler that bun test never runs.

Why

Every fixture leaked an empty orchestrator-intent-memory-* directory; the package-scope race sweep builds thousands of fixtures per run.

Verification

A leak probe shows N leaked directories before and none after; a mutant that drops the registration turns the probe red; only directories the helper itself created are removed; gates pass.

Limits

Test helper only; no product code.

The memory-persistence helper created one temp directory per fixture and relied on process.once("exit"), which bun test never runs, so every fixture leaked an orchestrator-intent-memory-* directory.

Register created roots and arm an afterEach on the first fixture to remove them. Removal is idempotent and limited to registered roots; the new test proves the disposer removes its own directories and leaves an unowned sibling alone.
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 847b6720-d596-4cff-9e95-f260103a144c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@andrescera
andrescera merged commit 5474c23 into main Oct 22, 2026
18 checks passed
@andrescera
andrescera deleted the test/orchestrator-fixture-tempdir-cleanup branch October 24, 2026 08:31
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