Skip to content

install: re-resolve a peer row instead of binding it to a stale bun.lock leftover - #38901

Open
robobun wants to merge 7 commits into
mainfrom
farm/a1038672/peer-row-reresolve
Open

install: re-resolve a peer row instead of binding it to a stale bun.lock leftover#38901
robobun wants to merge 7 commits into
mainfrom
farm/a1038672/peer-row-reresolve

install: rebind the passed-over peer copy on any manifest miss, not o…

f6c6fbd
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 15, 2026 in 44m 35s

Code review found 1 important issue

Found 1 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 1
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit src/install/PackageManager/PackageManagerEnqueue.rs:2903-2930 Root-only peer edit silently violates an unchanged member's peer constraint on the first install

Annotations

Check warning on line 2930 in src/install/PackageManager/PackageManagerEnqueue.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

Root-only peer edit silently violates an unchanged member's peer constraint on the first install

The inverse of the tested "member edited, root unchanged" case — root peer `^1.0.0`→`^2.0.0`, member A stays `^1.0.0` — is silent on the install that introduces the conflict: root's row falls through (A's row is `owner != 0 && is_peer()` so `would_revive_leftover`'s scan skips it) and resolves 2.0.0, A satisfies-scan-binds the leftover 1.1.0 with `satisfied=true`, then `Tree::hoist_dependency` dedupes A onto root's 2.0.0 at the pre-existing `// TODO: warning about peer dependency version mismatc