Skip to content

test(runtime): reclaim direct node:test fixture roots after each case - #1333

Merged
aviggiano merged 4 commits into
unstablefrom
fup-1322-supporting-fixture-cleanup
Oct 26, 2026
Merged

aviggiano merged 4 commits into
unstablefrom
fup-1322-supporting-fixture-cleanup

Conversation

@aviggiano

@aviggiano aviggiano commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1329: reclaim fixture roots created by supporting tests that call node:test directly after each case. Keep each root available through its test's own teardown hooks, including nested and failed cases. If a teardown hook throws and skips the late cleanup hook, drain that test's pending roots before the next case or the parent's teardown.

Scope roots created inside a direct test's async teardown to that test. Preserve intentional process-lifetime fixtures: the shared lifecycle inspection project and its sibling fake runner, module-level provider homes, and the Smithers poison binary. Bun continues to use the scoped runtime wrapper because its module cache does not register these direct hooks across multiple files.

Fixes #1322.

Validation

  • pnpm install --frozen-lockfile
  • pnpm --filter @ultrafuzz/runtime... build
  • tsc -p packages/runtime/tsconfig.test.json --pretty false
  • ESLINT_PLUGIN_DIFF_COMMIT=91730f76a2c06bdf0b8f2ff1a659e72c5b032d2c pnpm -w lint:strict:ci
  • Prettier and git diff --check
  • Node focused supporting tests: 28 pass, 0 fail
  • Shared lifecycle fixture across two cases: 2 pass, 0 fail
  • Bun two-file focused tests: 10 pass, 7 intentional Node-only skips, 0 fail

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues remain.

Summary

This PR removes temporary fixtures after direct Node tests while keeping them available through each test’s teardown.

  • Direct Node tests keep scratch through teardown and clear it afterward.
  • Shared test fixtures stay available for as long as later cases need them.

Both earlier, unnumbered findings are addressed by the pending-scope drain and teardown-specific scope. No new actionable issues were found.

Reviews (4) · Last reviewed commit: "test(runtime): retain shared fixtures an..." · Reviewed by Greptile

@aviggiano
aviggiano requested a review from a team as a code owner October 26, 2026 20:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T20:39:59.011467Z 9f66755 PR opened
ℹ️ 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.

Comment thread packages/runtime/test/temporary-root.ts Outdated
Comment thread packages/runtime/test/temporary-root.ts
@aviggiano
aviggiano force-pushed the fup-1322-supporting-fixture-cleanup branch from 92d5d23 to 3e988b4 Compare October 26, 2026 20:55
@aviggiano
aviggiano merged commit 2709f32 into unstable Oct 26, 2026
16 checks passed
@aviggiano
aviggiano deleted the fup-1322-supporting-fixture-cleanup branch October 26, 2026 21:18
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.

Runtime test fixtures leak read-only temp projects: a full suite needs ~14 GB and reports ENOSPC as unrelated assertion failures

1 participant