Repository navigation
fix(drivers): check a relative driver folder once in the Windows npm lookup - #1833
Conversation
…lookup A relative cwd (relative ALTIMATE_DRIVER_DIR) was resolved against itself, so npm in that folder was missed. Resolve it once. Adds tests for the default file probe and the Windows paths that never look npm up. Closes #1832. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YNQjkagE4uMJQBGtuEq7oN
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
@codex review against the numbered claims and the disclosed residuals in this PR's description: report only a reproducible trace that violates a numbered claim, or a defect the residuals don't disclose. Name the claim, the input, and the line. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
No issues found across 2 files
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
The core fix is correct: resolving the cwd once makes the current-directory probe name Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Reviewed by deepseek-v4.1-flash-1017 · Input: 83.3K · Output: 32K · Cached: 1.2M Review guidance: REVIEW.md from base branch |
🤖 Code Review — OpenCodeReview (Gemini) — No Issues FoundNo comments generated. Looks good to me. |
hkaltai
left a comment
There was a problem hiding this comment.
Peer review (Claude + Codex Sol 6.1 + lead), with one convergence round. The fix is correct and minimal: cwd is resolved once, so an absolute cwd probes the same paths as before, and relative PATH entries are still read from the driver folder. Covers all of #1832. bun test test/resolve-unit.test.ts on the head: 90 pass, 0 fail. Codex separately reproduced the regression on base and saw it fixed on head. Approving.
Nit
packages/drivers/test/resolve-unit.test.tsL1146:if (process.platform !== "win32") returnmakes the test report pass on Linux/macOS instead of skip. No CI job runs the drivers suite on Windows, sofindOnWindowsPathwith the defaultisRegularFileis never checked end to end in CI. Only the directisRegularFiletests cover it, as R1 notes.test.skipIf(process.platform !== "win32")(...)would make that visible in the output.
Issue for this PR
Closes #1832
Type of change
What does this PR do?
On Windows, after a failed npm run,
findOnWindowsPathchecks whether cmd.exe could find npm: the current directory first, then each PATH entry. The current-directory entry was cwd itself, and each candidate was resolved against cwd again, so a relative driver folder (a relativeALTIMATE_DRIVER_DIR) was probed as<folder>\<folder>\npm.cmd. An npm in that folder was missed, and a real install failure was reported as "npm is not available". cwd is now resolved once and that folder is probed.Claims:
Residuals:
How did you verify your code works?
rel-drivers\npm.cmdand npm not on PATH, the lookup for npm from the relative folderrel-driverscomes back empty on main and finds its npm.cmd with this change. The test file there: every lookup and npm-runner test passes, including the Windows-only one; 3 POSIX-quoting tests fail there on main too.test/resolve-unit.test.tspass; typecheck clean.Cost side effects
None.
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01YNQjkagE4uMJQBGtuEq7oN
Summary by cubic
Fixes Windows npm lookup so a relative driver folder (a relative
ALTIMATE_DRIVER_DIR) is probed correctly. Previously, after a failed npm run,findOnWindowsPathresolved the current directory against itself, so an npm in that folder was missed and a real install failure was reported as "npm is not available".Adds tests for the relative-folder probe, the default file probe, and the Windows paths that skip looking up npm. Closes #1832.
Written for commit a98ef0e. Summary will update on new commits.
Summary by CodeRabbit