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 2e50c99
Browse filesBrowse the repository at this point in the historyBrowse files
fix(drivers): address PR review threads on the install lock and resolver
Resolves 17 of the 28 open review threads on this PR (chatgpt-codex-connector,
cubic-dev-ai, kilo-code-bot, coderabbitai), leaves 7 open with a design
question or a duplicate pointer, and folds in #1205's empty-searched-roots
error-message fix (that PR was closed as redundant with this one).
Fixed:
- `isWorkspaceRoot()` compared a harvested root against ancestor `node_modules`
by exact equality, so a *nested* dependency root under an ancestor
(`.../node_modules/host/node_modules/duckdb`) slipped past the exclusion
when the CLI started below the project root — a real workspace-boundary
bypass (P1). Now uses containment via a new `isWithin` helper.
- `isRequireOfEsm()` did not recognize Node's `ERR_REQUIRE_ASYNC_MODULE` or
Bun's equivalent message, so an ESM-only driver with top-level `await`
was reported as broken instead of falling through to dynamic import.
Verified the exact Node 22 error shape empirically.
- `LockHolder` now carries an optional `budgetMs`, published from the
holder's own effective `hardStaleAfterMs` (itself now derived from the
configured install `timeoutMs`, not a fixed constant). `isStaleLock`
prefers a live holder's declared budget over a contender's own generic
backstop, so a default-configured contender no longer reclaims a lock
whose owner explicitly configured a longer install timeout.
- `isFilesystemRoot()` now recognizes extended-length UNC
(`\\?\UNC\server\share`) and forward-slash UNC (`//server/share`) roots,
alongside the plain backslash UNC form already handled.
- `DriverNotInstalledError` named no location when the searched-roots list
was empty (bare "Searched 0 locations:"); now names the expected managed
`node_modules` directory. This is #1205's fix, folded in here since that
PR was closed as redundant.
- Two detached JSDoc blocks reattached to the functions they document.
- Test-quality fixes: `resolve-chdir.test.ts` beforeEach now restores cwd
so tests don't depend on execution order; the cwd-prefix-repair test now
actually constructs a concatenated path instead of one already resolvable
without the repair; `install-lock.test.ts`'s multi-peer test gained a
start barrier so it can't pass vacuously; `resolve-argv-isolation.test.ts`
tests marked `test.serial` against a future concurrent test run.
Left open (design questions, replied in-thread rather than resolved
unilaterally):
- Stale-lock reclamation and release are built on comparing owner records
across a directory rename, which several reviewers (from different
angles — ownerless-lock races, inode reuse, TOCTOU on stale-claim
restore, non-atomic release) converge on as needing a different
primitive: an `O_EXCL` sentinel carrying an acquisition token, not the
current rename-and-compare protocol. Four of these were already
triaged and left open in-thread before this pass; seven more converging
on the same conclusion are now replied to and left open as duplicates
or extensions of that same finding.
- A contender's wait deadline is still derived only from its own
`timeoutMs`, not a holder's declared budget — attempted an unconditional
extension and reverted it after it blocked a short-timeout caller for a
holder's entire remaining budget (over two hours in testing). Left open
with two bounded-design options rather than picking one.
- Canonicalizing `ALTIMATE_DRIVER_DIR` before deriving the lock path (so a
symlink and its real path share a lock) conflicts with the explicitly
handled cold-start case where the directory does not exist yet. Left
open with two options.
Gates: `bun test packages/drivers` 289/289 green (stable across repeated
runs), `bun run typecheck` clean across all 15 typechecked packages,
upstream marker check clean (drivers is not upstream-shared).
0 commit comments