Skip to content

fix Windows path handling in kensai MCP server - #4

Merged
xobotyi merged 3 commits into
mainfrom
dev-master
May 26, 2026
Merged

fix Windows path handling in kensai MCP server#4
xobotyi merged 3 commits into
mainfrom
dev-master

Conversation

@xobotyi

@xobotyi xobotyi commented May 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix PathIndex using node:path/posix for absolute filesystem paths -- path.posix.resolve() does not handle Windows drive letters. Use native path module for absRoot, readdir, and stat paths; keep posix for internal relative representation.
  • Fix RepoFs.resolve() returning platform-native backslash separators from path.relative(), breaking index lookups on Windows. Normalize output to forward slashes.
  • Add windows-latest to CI test matrix (2x2: ubuntu + windows x node lts + 26).
  • Fix test symlink target from hardcoded /tmp to tmpdir().

Test plan

  • All 268 tests pass locally (macOS)
  • CI passes on ubuntu-latest (existing)
  • CI passes on windows-latest (new)

PathIndex imported node:path/posix globally, breaking absolute
path construction on Windows -- path.posix.resolve() does not
handle drive letters. Use native path module for absRoot
resolution, readdir, and stat paths; keep posix path for
internal relative path representation.

RepoFs.resolve() returned platform-native separators from
path.relative(), producing backslash paths on Windows that
failed index lookups. Normalize output to forward slashes.

Add Windows to CI test matrix (ubuntu + windows x node lts + 26).
Fix symlink target in tests to use tmpdir() instead of /tmp.
@xobotyi
xobotyi force-pushed the dev-master branch 4 times, most recently from 8103c09 to 292f328 Compare May 26, 2026 12:51
pnpm/action-setup@v4 repo is no longer available on GitHub.
Use corepack enable pnpm instead -- the package.json already
declares packageManager for corepack to resolve.
@xobotyi
xobotyi merged commit c7e6f07 into main May 26, 2026
5 checks passed
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