Bun.file: make exists()/size/lastModified reflect the current filesystem state - #33659
Open
robobun wants to merge 20 commits into
Open
Bun.file: make exists()/size/lastModified reflect the current filesystem state#33659robobun wants to merge 20 commits into
robobun wants to merge 20 commits into
Claude / Claude Code Review
completed
Jul 28, 2026 in 23m 56s
Code review found 1 important issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | src/runtime/webcore/Blob.rs:2257-2265 |
get_size seekable arm's self.size.set(available) still poisons later reads (shrink→grow) |
Annotations
Check failure on line 2265 in src/runtime/webcore/Blob.rs
claude / Claude Code Review
get_size seekable arm's self.size.set(available) still poisons later reads (shrink→grow)
The seekable arm's `self.size.set(available)` at line 2264 is the sibling of the stat-failed `set(0)` you dropped in f085a78 — same read-poisoning, but via *truncate* instead of *unlink*: **exists → `.size` → `truncateSync(p, 0)` → `.size` → recreate → `.text()`** now returns `""` (pre-PR it returned the recreated content). `resolve_file_stat` on a truncated regular file yields `seekable=Some(true), max_size=0`, so this arm caches `self.size = 0`, and `do_read_file` gets `max_length = 0`. The ne
Loading