You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pm-dispatch validate.test.ts: 'fixture cleanup' test deletes its fixture and asserts nothing #12670
The file has no afterAll or afterEach (grep -n afterAll returns nothing).
Why it matters
Order-dependent: the temp directory is removed only when this test runs. A filtered run (bun test -t <name>), a shard, or a -bail stop skips it and leaks a dispatch-3999-* directory in tmpdir.
No signal: expect(true).toBe(true) always passes, so the test reports a pass even if the removal failed.
Low severity, but it is the kind of test-quality drift the testing doctrine (doc/agents/testing-doctrine.md) asks us to avoid.
Suggested fix shape
Move the rmSync into an afterAll in that describe block and delete the fixture cleanup test. If the teardown must be checked, assert existsSync(base) === false in afterAll or in a dedicated test.
Verified first-hand on current main: pm-stack/dispatch/test/validate.test.ts imports afterAll (line 1) and the session directory symlink confinement (issue #3999) describe block tears the fixture down in afterAll (line 444: rmSync(base, { recursive: true, force: true })).
The fixture cleanup test that asserted nothing is gone — grep "fixture cleanup" over the file on main returns no match.
Activity
developing-today commentedon Nov 22, 2026
CODE-4659
dezren39 commentedon Nov 23, 2026
Done-check — Lane KV (archer), 2026-11-23. This issue's premise no longer holds on current main; the fix landed before this pickup:
99008f9427"pm-dispatch: tear down the symlink-confinement fixture in afterAll", merged via PR pm-dispatch: tear down the symlink-confinement fixture in afterAll #12676 at 2026-11-22T20:47:28Z (~25 minutes after this issue was filed).pm-stack/dispatch/test/validate.test.tsimportsafterAll(line 1) and thesession directory symlink confinement (issue #3999)describe block tears the fixture down inafterAll(line 444:rmSync(base, { recursive: true, force: true })).fixture cleanuptest that asserted nothing is gone —grep "fixture cleanup"over the file on main returns no match.Closing as completed.