install: key npm cache entries by their integrity, derive URL-based cache names with SHA-256 - #37756
Closed
Jarred-Sumner wants to merge 10 commits into
Closed
install: key npm cache entries by their integrity, derive URL-based cache names with SHA-256#37756Jarred-Sumner wants to merge 10 commits into
Jarred-Sumner wants to merge 10 commits into
Claude / Claude Code Review
completed
Aug 12, 2026 in 12m 43s
Code review found 1 important issue
Found 2 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/PackageManager/PackageManagerResolution.rs:207-211 |
resolve_from_disk_cache never finds cached npm packages (offline auto-install broken) |
Annotations
Check failure on line 211 in src/install/PackageManager/PackageManagerResolution.rs
claude / Claude Code Review
resolve_from_disk_cache never finds cached npm packages (offline auto-install broken)
`resolve_from_disk_cache` passes `&Integrity::default()` to `path_for_cached_npm_path`, so it looks up `<name>/<version>@@@1` — but the version-index symlink is now written at `<name>/<version>@@@1_integrity=<hex>` (extract_tarball.rs derives `dest_name` from the integrity-suffixed `folder_name`; the PR's own bun-run-dir.test.ts asserts this). `readlinkat` therefore ENOENTs on every entry, and since this is the sole disk-cache resolution path for `OfflineMode::Offline` (resolver.rs:3634), `bun -
Loading