Skip to content

install: remove node_modules entries that left the lockfile - #32974

Open
robobun wants to merge 13 commits into
mainfrom
claude/farm/4f23685c/prune-stale-node-modules
Open

install: remove node_modules entries that left the lockfile#32974
robobun wants to merge 13 commits into
mainfrom
claude/farm/4f23685c/prune-stale-node-modules

never prune the global install dir, bun links, or filtered-out public…

2ef1052
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jun 28, 2026 in 19m 3s

Code review found 1 important issue

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

Details

Severity Count
🔴 Important 1
🟡 Nit 0
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important src/install/PackageInstall.rs:2619-2622 keep_symlinks guard fails on DT_UNKNOWN filesystems

Annotations

Check failure on line 2622 in src/install/PackageInstall.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

keep_symlinks guard fails on DT_UNKNOWN filesystems

The `keep_symlinks` guard checks `matches!(entry.kind, EntryKind::SymLink)`, but on filesystems whose `readdir` doesn't populate `d_type` (NFS, many FUSE/overlay setups, older XFS without `ftype=1`), `sys::iterate_dir` returns `EntryKind::Unknown` — so an unsaved `bun link <pkg>` symlink falls through the guard and gets `delete_tree`'d, exactly the regression `keep_symlinks` was added to prevent. The same gap exists in `prune_extraneous_scope` at line 2714. When `keep_symlinks` and `entry.kind =