Skip to content

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

Merged
AltanS merged 1 commit into
AltanS:v1from
en-ver:test/cli-macos-path
Aug 30, 2026
Merged

test(cli): canonicalize temporary paths on macOS#138
AltanS merged 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.

@AltanS

AltanS commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Thank you, exact and minimal. Verified against current v1: the full CLI lifecycle suite passes with the canonicalized scratch root. The Linux behaviour is unchanged since pwd -P is a no-op there.

@AltanS
AltanS merged commit 596a162 into AltanS:v1 Aug 30, 2026
1 check passed
AltanS added a commit that referenced this pull request Aug 31, 2026
test(cli): canonicalize temporary paths 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.

2 participants