statechart: relative-symlink launcher test fails on macOS because /var is a symlink
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- macos, node.js, typescript
Research direction
The failing case is the test named 'the launcher reached through an absolute and a relative symlink' in pstack/skills/statechart/scripts/test/cli.test.ts, around line 135. Read the linkedLauncher helper, which creates the links under os.tmpdir(), and the path.relative call that builds the relative target. Run the test with the --test-name-pattern filter on macOS. Done when the temp directory is resolved with realpath before the relative link is built and the test passes on macOS and Linux.
Written by the indexing model from the issue text.
Description
On macOS, the launcher reached through an absolute and a relative symlink writes the committed chart on this Node in pstack/skills/statechart/scripts/test/cli.test.ts fails. The test before it, which reaches the launcher by its own path, passes.
$ node --disable-warning=ExperimentalWarning --test --test-name-pattern="launcher reached" test/cli.test.ts
✔ the launcher reached by its own path writes the committed chart on this Node
✖ the launcher reached through an absolute and a relative symlink writes the committed chart on this Node
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
undefined !== ''
at cli.test.ts:135:12
Node v26.13.0, macOS. The scripts are copied verbatim from ae5650f.
Cause. linkedLauncher creates its links under os.tmpdir(), which is /var/folders/... on macOS. /var is a symlink to /private/var. path.relative(second, launcher) computes the relative target lexically from /var/folders/.../b. The kernel resolves the link's .. segments from the physical directory, /private/var/folders/.../b, which is one level deeper, so the relative link points at a path that doesn't exist and the spawn fails.
Possible fix. Resolve the temp directory before building the relative link, for example fs.mkdtempSync(path.join(fs.realpathSync(os.tmpdir()), "statechart-links-")).
- Dominant language
- TypeScript
- Stars
- 18.2k
- Forks
- 2k
- Avg merge
- 3h 56m
- Merged PRs (30d)
- 96
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cursor/plugins
-
pstack: interrogate asks the user, which worker.md forbids for delegates that reach itPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cursor/plugins#1272 · 1 comment ·
Maintainers usually reply within 1 day
-
poteto-mode: multi-phase-plan Merge placeholder still appends every PR to a base-branch stackPossibly taken @mangeshraut712 claimed this 15 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
typescript-best-practices: schema example uses z.string().uuid(), deprecated in Zod 4Possibly taken @mangeshraut712 claimed this 14 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
cursor/plugins#1165 · 1 comment ·
Maintainers usually reply within 1 day
-
pstack docs/harness/claude-code.md: transcript slug replaces every non-alphanumeric character, not only / and .Possibly taken @isTuhin claimed this 9 days ago. Open
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
cursor/plugins#1155 · 2 comments ·
Maintainers usually reply within 1 day
-
pstack reflect: give each parallel reviewer its own scratch subdirectoryPossibly taken @mangeshraut712 claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
[UI] Guard webApis against undefined window in SSR environmentsPossibly taken @madhavzanwar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
headroomlabs-ai/headroom#4992 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
paperclipai/paperclip#22575 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
lingdojo/kana-dojo#34502 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
bug frontend good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
nikhilb2/simple_invoicing#935 ·