Ultimate

X_SKIP_CLEANUP_UNREACHED

Means

a test file resets a process-global registry from inside a .skipIf( block, where it never runs

Typical cause

Bun evaluates a skipped file's module body — so a module-scope entity() REGISTERS — and then does not run a hook inside describe.skipIf(true). Measured 2026-08-26 with TEST_DATABASE_URL unset: 19 live suites leaked 36 entities, where the next same-named entity() is an X_ENTITY_DUPLICATE nobody can attribute. The leak WAS the house convention, so it appears only in the one configuration a live suite is never deliberately run in

Fix

bun run skip-if-cleanup --json — move the reset into a hook at column 0 and guard nothing on the skip condition; a file-scope hook that returns early on it leaks identically

Listed under CLI and verify

This page as markdown