You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a698abc
Browse filesBrowse the repository at this point in the historyBrowse files
CodeRabbit and cubic-dev-ai findings on #1122. Each verified before fixing.
**A missing transitive dependency read as a missing driver.** `isModuleNotFound`
matched any "Cannot find module/package" text, but a driver whose own dependency
tree is incomplete raises exactly that shape — observed for real inside a
compiled binary as `Cannot find package 'pg-protocol' from '.../pg/lib/
connection.js'`, where pg itself is installed. The predicate now takes the
specifier and, when the runtime names the module it could not find, only counts
a name matching what was asked for. Without a specifier it stays conservative.
**A broken install could not be repaired.** `warehouse_install_driver` gated on
`isDriverInstalled`, which only asks whether the package resolves. A copy that
resolves but throws on import — a native addon for another platform, or a
half-written install — answered "already installed", so the one command that
could fix it declined to run. It now probes an actual load.
**Failed installs were recorded as successes.** `Tool` reads
`metadata.success === false` as its soft-failure signal (tool/tool.ts), and every
sibling warehouse tool sets it. This tool omitted it, so a failed install skipped
failure telemetry entirely.
**Install hints broke on paths containing spaces.** The printed
`npm install --prefix <dir>` is meant to be pasted; an unquoted path split and
npm received the wrong prefix. Added `shellQuote` and applied it at both sites.
**Two test-quality fixes.** CodeRabbit and cubic independently flagged that
"does not fall back when an ambiently-resolvable package fails to load" never
reaches the branch it names — its fixture is not ambiently resolvable, so the
disk fallback handles it first. Renamed to what it actually proves, with the
ambient branch now pinned directly through `isModuleNotFound`. Separately, a
comment claimed the catalogue test kept the tool's `DRIVER_NAMES` and alias map
in step with `DRIVER_PACKAGES`; no such test existed. It does now, and it also
asserts every `DRIVER_MAP` type resolves to an installable driver — removing the
alias map fails it, which is the #61 gap this PR set out to close.
Tests: 177 drivers unit (was 172), 4,714 opencode. Typecheck clean, 0 lint errors.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
0 commit comments