Repository navigation
fix(desktop): restore Node discovery for WSL providers - #11741
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused WSL runtime bug fix with isolated production logic and targeted regression coverage, without product-default or static-analysis configuration changes. An unresolved high-severity finding about not passing the server Node engine range remains a material correctness risk to address. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe WSL runtime probe now resolves version-managed Node before capturing PATH for provider CLIs. Node remains optional for standalone runtime readiness. Tests cover nvm discovery, missing Node, and unavailable ChangesWSL runtime PATH resolution
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The WSL runtime probe change includes coverage for version-managed Node discovery and fallback behavior, with no concrete merge-blocking issue identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What changed
Codex can become unavailable after upgrading the Windows nightly when the WSL environment uses nvm-managed Node. The standalone T3 backend starts, but its PATH omits Linux Node needed by provider launchers. In the observed pnpm installation, the launcher falls back to Windows Node and exits before initialization. npm's Linux launcher also needs Node on PATH, so changing package managers does not address the missing-Node cause.
Restore the existing version-manager discovery before the packaged WSL runtime captures PATH. Discovery is best effort, so standalone T3 still starts without Node or bash.
Fixes #11740.
Why
#11511 removed the Node dependency for the T3 executable, but provider CLIs can still depend on Node. Reuse the existing discovery code that the mounted runtime already runs.
Validation
DesktopWslEnvironment.test.tsandDesktopBackendConfiguration.test.tspass with it, including startup without Node and fallback without bash.checkCodexProviderStatusinside Ubuntu using the running server's environment and working directory. Before the fix it reproduced the exit-code-1 error. With only the patched probe's PATH applied, Codex 0.154.0 reported authenticated and ready, with six models and 17 skills.Checklist
GPT-6 via Codex.
Summary by CodeRabbit