Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The statechart launcher's relative-symlink test fails on macOS because
os.tmpdir()can return/var/folders/..., while/varresolves to/private/var.path.relativecounts lexical path segments, creating a dangling link;spawnSyncreturnsENOENTbefore the launcher runs.Canonicalize the temporary directory before constructing the relative link. Regenerate the shipped harness with the existing native command
node scripts/generate-pstack-harness-trees.mjs. No new scripts or runtime launcher behavior changes.Evidence
ENOENTand undefined stderr.After: the case passes and the full CI test command exits 0 under Node 22.23.4: 334 tests, 267 passed, 67 existing skips, 0 failed.
git diff --checkpass.Merge Danger
Door: two-way
Blast Radius: tests
Only the fixture and generated harness copy change.
Note
Low Risk
Test-only fixture change with no impact on launcher runtime or production code paths.
Overview
Fixes a macOS-only flake in the launcher test that exercises absolute and relative symlinks to
statechart.The
linkedLauncherhelper now wraps the temp directory frommkdtempSyncwithfs.realpathSyncbefore building paths and a relative symlink viapath.relative. On macOS,os.tmpdir()can sit under/var/folders/...while the real path is under/private/var, so a non-canonical base produced a broken relative link and the test sawspawn ENOENTbefore the launcher ran.No production launcher or runtime behavior changes—only the test fixture setup.
Reviewed by Cursor Bugbot for commit 8d77413. Bugbot is set up for automated code reviews on this repo. Configure here.