From 02b8cea5c2dc73db07e31f1cc273d9228826a391 Mon Sep 17 00:00:00 2001 From: Charles Wiltgen Date: Tue, 15 Sep 2026 09:12:33 -0700 Subject: [PATCH] chore(axiom-pi): build the parity probe inside the try/finally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A setup failure (or a hard kill) would otherwise leave axiom-parity-probe-.swift in the shared temp root — the junk class this suite exists to guard against, and now harmless to the detector but still litter. --- axiom-pi/src/session.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/axiom-pi/src/session.test.ts b/axiom-pi/src/session.test.ts index d32fcb47..2ee22221 100644 --- a/axiom-pi/src/session.test.ts +++ b/axiom-pi/src/session.test.ts @@ -467,9 +467,11 @@ describe("project detection parity with project_detect.py", () => { fs.mkdirSync(path.join(tempRepo, ".git")); fs.mkdirSync(path.join(tempRepo, "ios", "App.xcodeproj"), { recursive: true }); const tempProbe = path.join(os.tmpdir(), `axiom-parity-probe-${process.pid}.swift`); - fs.writeFileSync(tempProbe, ""); try { + // Created inside the try: a setup failure must not leave the probe behind in + // the shared temp root, which is the exact junk class this suite guards. + fs.writeFileSync(tempProbe, ""); const plain = dir("plain"); const atCwd = dir("marker-at-cwd"); file("marker-at-cwd", "Package.swift");