resolver: lock DirEntry map probes against the in-place stale-generation rewrite - #37274
Merged
Merged
Claude / Claude Code Review
completed
Aug 9, 2026 in 31m 35s
Code review found 2 potential issues
Found 3 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/resolver/dir_info.rs:272-275 |
Audit missed unlocked .data.iter() sites carrying the same false 'entries_mutex held' SAFETY comments |
| 🟡 Nit | src/dotenv/env_loader.rs:24-29 |
Stale comment in load_default_files claims removed DirEntryProbe impl still exists |
Annotations
Check warning on line 275 in src/resolver/dir_info.rs
claude / Claude Code Review
Audit missed unlocked .data.iter() sites carrying the same false 'entries_mutex held' SAFETY comments
The audit missed a few sibling `.data` iteration sites that still carry the same false `// SAFETY: entries_mutex held` claim this PR removed elsewhere: `src/runtime/cli/run_command.rs:3665-3707` / `:3720-3740` (`get_entries_const()` → `entries.data.iter()`, SAFETY at :3674 and :3737) and `src/resolver/lib.rs:1937-1943` (`DirEntryDirIter::iterate`, SAFETY at :1910). The new debug assert only guards `get`/`get_comptime_query`/`has_comptime_query`, so raw `.data.iter()` bypasses it — which is why t
Check warning on line 29 in src/dotenv/env_loader.rs
claude / Claude Code Review
Stale comment in load_default_files claims removed DirEntryProbe impl still exists
nit: the inline comment inside `load_default_files` (src/dotenv/env_loader.rs:690-692) still says "`bun_resolver::fs::DirEntry` impls `DirEntryProbe`", but this PR deletes that impl from src/resolver/fs.rs. The trait-level doc at :24-29 was correctly updated to point at `DirEntryKeys`; this one was missed and should be updated or removed in the same PR.
Loading