Skip to content

fix: normalize macOS paths and isolate tests#12

Open
krzysztofwojt wants to merge 1 commit into
DFKHelper:mainfrom
krzysztofwojt:codex/fix-macos-path-test-isolation
Open

fix: normalize macOS paths and isolate tests#12
krzysztofwojt wants to merge 1 commit into
DFKHelper:mainfrom
krzysztofwojt:codex/fix-macos-path-test-isolation

Conversation

@krzysztofwojt

Copy link
Copy Markdown
Contributor

Summary

  • normalize macOS /var and /private/var aliases to one stable path identity
  • restore relative skeleton, outline, trace, project discovery, settings, and doc-compact lookups under temporary paths
  • isolate Darwin test data through HOME and USERPROFILE
  • run TypeScript subprocess fixtures without the IPC-based tsx CLI
  • enable the direct database-key assertion on macOS

Root cause

On macOS, os.tmpdir() commonly returns /var/..., while process.cwd() returns /private/var/... after chdir. String-only path normalization therefore produced different cache and index keys for the same physical file. The test harness also redirected Linux and Windows data-directory variables but not the HOME value used by Darwin, allowing tests to see the live worker and data directory. Finally, the tsx CLI created an IPC socket that restricted sandboxes reject even though the fixtures themselves require no IPC.

Validation

  • Node 24.18.0
  • npm run build
  • npm run lint
  • npm run typecheck
  • npm run test:guards — 13/13
  • npm test — 4931 passed, 2 Windows-only skipped
  • npm run test:matrix — 104/104
  • repeated process-race and lock-heartbeat tests — 24/24

@krzysztofwojt krzysztofwojt marked this pull request as ready for review July 10, 2026 10:28
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