Skip to content

fix(plugin): resolve Windows Node to an absolute executable - #788

Open
xinoai wants to merge 2 commits into
mainfrom
fix/windows-node-launch
Open

fix(plugin): resolve Windows Node to an absolute executable#788
xinoai wants to merge 2 commits into
mainfrom
fix/windows-node-launch

Conversation

@xinoai

@xinoai xinoai commented Sep 2, 2026

Copy link
Copy Markdown

Summary

The Windows MCP launcher should select one Node executable and launch it consistently. Resolve node.exe from PATH once, then invoke its absolute path.

Changes

  • Replace the separate where and bare node commands with the shell's built-in executable lookup.
  • Keep the existing working-directory change and managed runtime priority.
  • Add a native Windows regression test covering command extensions, caller-directory candidates, quoted paths, argument forwarding, exit codes, and a missing runtime.

Testing

  • bun test --timeout 30000 tests-ts/mcp-launcher.test.ts: passed the MCP smoke test on Linux; native Windows case skipped.
  • pnpm run types: passed.
  • pnpm run format: passed.
  • All three required portable plugin source checks: passed.
  • pnpm run test --seed 12345 and pnpm run test: both passed on Linux (2,241 passed, 42 skipped in each run).
  • Native Windows regression and full CI test matrix: passed. An unrelated subprocess test passed on retry.

Risk and rollout

The PATH fallback requires a native node.exe. Installations using script-only PATH shims can use the existing CODEX_MCP_NODE_PATH override. No commands, flags, or public environment variables are added. The native Windows regression passed in CI.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the bug Something isn't working label Sep 2, 2026
@xinoai
xinoai marked this pull request as ready for review September 2, 2026 13:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T13:44:03.379078Z a6f1db6 Draft marked ready
🔒 Security Review Completed 2026-09-02T13:45:22.121454Z a6f1db6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sylvesterkaczmarek sylvesterkaczmarek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the Windows fallback path. The managed-runtime branches still win first; the PATH fallback now resolves one native node.exe through cmd's %~$ENV:I lookup and invokes that exact executable instead of doing a second command search. The native regression also covers quoted PATH entries, caller-directory shims/candidates, argument forwarding, exit status and no-runtime behavior. Looks sound.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants