Bun.file().slice(): reject delete()/writer()/write(), fix exists(); cap chardev slice reads - #35822
Open
robobun wants to merge 5 commits into
Open
Bun.file().slice(): reject delete()/writer()/write(), fix exists(); cap chardev slice reads#35822robobun wants to merge 5 commits into
robobun wants to merge 5 commits into
Claude / Claude Code Review
completed
Jul 28, 2026 in 15m 41s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/webcore/Blob.rs:1287-1293 |
get_exists_sync: redundant second stat() on nonexistent un-sliced files |
Annotations
Check warning on line 1293 in src/runtime/webcore/Blob.rs
claude / Claude Code Review
get_exists_sync: redundant second stat() on nonexistent un-sliced files
The new `seekable.is_none()` fallback fires even when `resolve_size()` at L1269 already ran and its `resolve_file_stat` failed (ENOENT is swallowed at L6228, leaving `seekable` still `None`). So `await Bun.file('/nonexistent').exists()` — the common pre-creation check — now issues two `stat(2)` syscalls instead of one. Correctness is unchanged; consider capturing `let did_resolve = self.size.get() == MAX_SIZE;` before L1269 and gating the fallback on `!did_resolve`, or replacing the `resolve_siz
Loading