Repository navigation
tests: compare real paths against a temp root made under the real temp path (orca #48, slice 5) - #53
Merged
nachumi-a2zoperations merged 1 commit intoNov 15, 2026
Conversation
…p path (orca #48, slice 5) Root cause of verify-cli-bin, packaged-cli-assets (macOS launcher) and main-entry-facade failing on the MacBook (on Node and on Bun): on macOS the temp folder is a symlink into /private (/var/folders -> /private/var/folders, /tmp -> /private/tmp). Each test creates its root under tmpdir() (the symlinked spelling) and compares it with a path its child process reports, which is always the real one: - verify-cli-bin: the child's process.cwd() (the kernel returns the resolved path); - main-entry-facade: the bundled main's __dirname (Node resolves the main module's real path); - packaged-cli-assets: the macOS launcher resolves its own location physically before building the CLI path it hands on. On Linux /tmp is not a symlink, so the Dells pass. The product is right in all three: the paths it reports are real, valid paths, so nothing wrong reaches a user. No product code changes. Fix (tests only, per the Leader's rule: compare canonical paths in the tests): the three tests make their temp root under realpathSync(tmpdir()), so both sides use the canonical spelling. Red before on the MacBook: 3 failing. Green now: 8/8 in the three files on the Bun runner and on plain Node. Refs #48
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.
Refs #48 (slice 5: the macOS temp-symlink trio, 3 red files). #48 stays open for the rest.
Root cause
On macOS the temp folder is a symlink into
/private(/var/folders→/private/var/folders,/tmp→/private/tmp). Each of these tests makes its root undertmpdir()(the symlinked spelling) and compares it with a path its child process reports, which is always the real one:config/scripts/cli-build/verify-cli-bin.test.mjsprocess.cwd()config/scripts/desktop-build/output-contracts/main-entry-facade.test.ts__dirnamesrc/main/cli/packaged-cli-assets.test.ts(macOS launcher)On Linux
/tmpis not a symlink, so the Dells pass. The product is right in all three: the paths it reports are real, valid paths, so nothing wrong reaches a user. No product code changes.Fix (tests only)
Following the Leader's rule (compare canonical paths in the tests): the three tests make their temp root under
realpathSync(tmpdir()), so both sides use the canonical spelling.Tests
check-changed: 23/23.