Skip to content

fix: avoid Windows path alias mismatch in symlink map - #2411

Open
luantaraschi wants to merge 1 commit into
isomorphic-git:karma-matrixfrom
luantaraschi:fix/karma-windows-symlink-path
Open

fix: avoid Windows path alias mismatch in symlink map#2411
luantaraschi wants to merge 1 commit into
isomorphic-git:karma-matrixfrom
luantaraschi:fix/karma-windows-symlink-path

Conversation

@luantaraschi

@luantaraschi luantaraschi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Run git ls-files from the fixture root so Git returns paths relative to the same directory used by Node.

Why

The regression test added in #2410 fails on the GitHub Windows runner. Git reports the temporary profile through its short RUNNER~1 alias, while Node keeps the runneradmin path. Calling path.relative() across those two forms produces a pathspec outside the repository, which git ls-files rejects.

Running the command from the fixture root avoids that path conversion and keeps the map entries relative to root on every platform.

Validation

  • server-only.test-make-symlinks-map.js: 1 passed
  • nps build.indexjson: preserved the symlink map and removed its fetch-index entry
  • ESLint passed for the helper and regression test
  • git diff --check passed
  • The full Node suite passed 185 of 191 suites and 1,313 of 1,345 tests locally. The remaining 14 failures require Windows symlink privileges and reproduced unchanged on the clean karma-matrix head.

Follow-up to #2410. This fixes the Windows failure currently reported on #2383.

Summary by CodeRabbit

  • Bug Fixes
    • Improved symlink discovery for fixture-based workflows.
    • Ensured symlink paths are resolved correctly relative to the fixture root.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6522e957-2f25-4c6f-8725-e81c843281c2

📥 Commits

Reviewing files that changed from the base of the PR and between d2027e1 and bda6bfc.

📒 Files selected for processing (1)
  • __tests__/__helpers__/make-symlinks-map.cjs

📝 Walkthrough

Walkthrough

The symlink helper now runs git ls-files from the fixture root and resolves Git index paths directly against that root. Repository-root and fixture-relative path derivation were removed.

Changes

Fixture symlink discovery

Layer / File(s) Summary
Fixture-root-relative Git lookup
__tests__/__helpers__/make-symlinks-map.cjs
The helper runs Git index lookup from root with . and resolves matched symlink paths against root.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to bda6b

This localized change adjusts symlink-map path handling for Windows without introducing a known correctness or production risk; no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit hops through paths so neat,
From fixture root to symlink feet.
Git finds each link without delay,
And roots the map the proper way.
“No extra paths!” the bunny sings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing a Windows path alias mismatch in the symlink map.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jcubic

jcubic commented Aug 15, 2026

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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