Skip to content

test(cli): canonicalize temporary paths on macOS - #138

Open
en-ver wants to merge 1 commit into
AltanS:v1from
en-ver:test/cli-macos-path
Open

test(cli): canonicalize temporary paths on macOS#138
en-ver wants to merge 1 commit into
AltanS:v1from
en-ver:test/cli-macos-path

Conversation

@en-ver

@en-ver en-ver commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Canonicalize the CLI test harness TMP_ROOT with physical pwd -P; strict command/CWD/argv assertions stay unchanged.
  • No production code, version, or dependency changes.

Root cause

On macOS, /var resolves to /private/var; mktemp -d returns logical /var/folders/..., while a Bun-spawned shell's $PWD reports physical /private/var/folders/.... Raw equality fails despite the same directory and correct command order and arguments.

Solution rationale

Canonicalize the scratch root once before deriving fixtures, aligning the path vocabulary at the test boundary rather than changing production behavior or weakening assertions. This follows existing upstream portability practice.

Validation

  • On macOS, the former strict build/CWD assertion passed and the suite progressed to the unrelated final beacon section.
  • bun test ./bridge ./cli ./scripts: 3,201 passed.
  • scripts/collie-ctl.test.sh: passed.
  • Web: 3,844 passed, 18 todo under the Node 26 compatibility option NODE_OPTIONS=--no-experimental-webstorage.
  • Lint, root and web typechecks, version gates, and the production build passed.
  • The final macOS beacon assertion remains an unrelated Linux /proc limitation; this is not a claim that the complete CLI shell suite is green on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant