From 7789f77763fec0f0efcdd2bad36fd095ebfb7f49 Mon Sep 17 00:00:00 2001 From: Vincent Drozdzyniak <253480973+VDrozd-Cyclis@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:31:02 +0100 Subject: [PATCH] test(pstack): resolve the temp folder before the statechart launcher's relative symlink The launcher test links b/statechart to the launcher with path.relative from a folder under os.tmpdir(). When TMPDIR goes through a symlink that changes the path depth, such as macOS's /var -> /private/var, the kernel resolves the relative link from the real folder, one level deeper, so the link points at a missing file and spawnSync fails with no stderr. Resolve the folder with realpathSync first. --- .../claude-code/skills/statechart/scripts/test/cli.test.ts | 2 +- pstack/skills/statechart/scripts/test/cli.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts b/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts index 97b71c30c..6d4284b0c 100644 --- a/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts +++ b/harness/pstack/claude-code/skills/statechart/scripts/test/cli.test.ts @@ -113,7 +113,7 @@ const launcherTools = () => { }; const linkedLauncher = () => { - const links = fs.mkdtempSync(path.join(os.tmpdir(), "statechart-links-")); + const links = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "statechart-links-"))); const [first, second] = [path.join(links, "a"), path.join(links, "b")]; fs.mkdirSync(first); fs.mkdirSync(second); diff --git a/pstack/skills/statechart/scripts/test/cli.test.ts b/pstack/skills/statechart/scripts/test/cli.test.ts index 97b71c30c..6d4284b0c 100644 --- a/pstack/skills/statechart/scripts/test/cli.test.ts +++ b/pstack/skills/statechart/scripts/test/cli.test.ts @@ -113,7 +113,7 @@ const launcherTools = () => { }; const linkedLauncher = () => { - const links = fs.mkdtempSync(path.join(os.tmpdir(), "statechart-links-")); + const links = fs.realpathSync(fs.mkdtempSync(path.join(os.tmpdir(), "statechart-links-"))); const [first, second] = [path.join(links, "a"), path.join(links, "b")]; fs.mkdirSync(first); fs.mkdirSync(second);