From 99008f9427efcf44336f0c94812a3ca7096e70f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 20:45:59 +0000 Subject: [PATCH] pm-dispatch: tear down the symlink-confinement fixture in afterAll The fixture directory was removed by a 'fixture cleanup' test that asserted nothing, so a filtered or bailed run leaked a dispatch-3999-* directory in tmpdir. Cleanup now runs in afterAll for the describe block, and the no-op test is gone. Refs #12670 Co-Authored-By: Claude Opus 5.5 --- pm-stack/dispatch/test/validate.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pm-stack/dispatch/test/validate.test.ts b/pm-stack/dispatch/test/validate.test.ts index 9897dab37d..415c234101 100644 --- a/pm-stack/dispatch/test/validate.test.ts +++ b/pm-stack/dispatch/test/validate.test.ts @@ -1,4 +1,4 @@ -import { describe, expect, test } from "bun:test"; +import { afterAll, describe, expect, test } from "bun:test"; import { mkdtempSync, mkdirSync, realpathSync, rmSync, symlinkSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; @@ -440,6 +440,11 @@ describe("session directory symlink confinement (issue #3999)", () => { const inner = join(clone, "inner"); const outside = join(base, "outside"); const outsideSub = join(outside, "sub"); + + afterAll(() => { + rmSync(base, { recursive: true, force: true }); + }); + mkdirSync(inner, { recursive: true }); mkdirSync(outsideSub, { recursive: true }); symlinkSync(outside, join(clone, "worktrees"), "dir"); @@ -512,9 +517,4 @@ describe("session directory symlink confinement (issue #3999)", () => { expect(resolveSessionDirectory("oidc", code, alias, repoDirs)).toBe(clone); expect(resolveSessionDirectory("oidc", code, join(alias, "inner"), repoDirs)).toBe(inner); }); - - test("fixture cleanup", () => { - rmSync(base, { recursive: true, force: true }); - expect(true).toBe(true); - }); });