Skip to content

fix(runtime): filter Windows MS Store Python stubs and verify runnabi…#457

Open
maxwell-orange wants to merge 1 commit intomksglu:nextfrom
maxwell-orange:fix/windows-store-python-stub
Open

fix(runtime): filter Windows MS Store Python stubs and verify runnabi…#457
maxwell-orange wants to merge 1 commit intomksglu:nextfrom
maxwell-orange:fix/windows-store-python-stub

Conversation

@maxwell-orange
Copy link
Copy Markdown

…lity (#455)

On Windows, where python and where python3 match the Microsoft Store App Execution Alias stubs under %LOCALAPPDATA%\Microsoft\WindowsApps\ even when no real Python is installed. Those stubs exit 9009 and pop the Microsoft Store, so detectRuntimes() reported python as available but every spawn failed.

Add runnableExists() helper that (1) on Windows filters where results under \Microsoft\WindowsApps\ and (2) on all platforms verifies <cmd> --version exits 0 within 5s. Use it for python/python3 detection and add py (Windows Python launcher) as a final fallback.

Verified locally: 12 Python executor tests in tests/executor.test.ts that previously failed on Windows now pass.

What / Why / How

Affected platforms

  • Claude Code
  • Cursor
  • VS Code Copilot (GitHub Copilot)
  • JetBrains Copilot
  • Gemini CLI
  • Qwen Code
  • OpenCode
  • KiloCode
  • Codex CLI
  • OpenClaw (Pi Agent)
  • Pi
  • Kiro
  • Antigravity
  • Zed
  • All platforms

Test plan

Checklist

  • Tests added/updated (TDD: red → green)
  • npm test passes
  • npm run typecheck passes
  • Docs updated if needed (README, platform-support.md)
  • No Windows path regressions (forward slashes only)
  • Targets next branch (unless hotfix)
Cross-platform notes

Our CI runs on Ubuntu, macOS, and Windows.

  • If touching file paths, verify forward-slash normalization on Windows
  • If touching hook paths, verify no backslash separators
  • Use path.join() / path.resolve(), never hardcode / separators
  • Use event-based stdin reading — readFileSync(0) breaks on Windows
  • Use os.tmpdir(), never hardcode /tmp

…lity (mksglu#455)

On Windows, `where python` and `where python3` match the Microsoft Store App Execution Alias stubs under %LOCALAPPDATA%\Microsoft\WindowsApps\ even when no real Python is installed. Those stubs exit 9009 and pop the Microsoft Store, so detectRuntimes() reported python as available but every spawn failed.

Add runnableExists() helper that (1) on Windows filters `where` results under \Microsoft\WindowsApps\ and (2) on all platforms verifies `<cmd> --version` exits 0 within 5s. Use it for python/python3 detection and add `py` (Windows Python launcher) as a final fallback.

Verified locally: 12 Python executor tests in tests/executor.test.ts that previously failed on Windows now pass.
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