s3: resolve streamed write/download with the byte count, not 0 - #35671
Open
robobun wants to merge 8 commits into
Open
s3: resolve streamed write/download with the byte count, not 0#35671robobun wants to merge 8 commits into
robobun wants to merge 8 commits into
Claude / Claude Code Review
completed
Jul 25, 2026 in 22m 43s
Code review found 2 potential issues
Found 1 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/webcore/streams.rs:2164-2168 |
flush() return value inconsistent: cumulative when async, still 0 when synchronous |
Annotations
Check warning on line 2168 in src/runtime/webcore/streams.rs
claude / Claude Code Review
flush() return value inconsistent: cumulative when async, still 0 when synchronous
This PR changes the async `flush_promise` resolution here (and in `wrapper_callback`) to the cumulative `this.wrote`, but the two synchronous return sites in `NetworkSink::flush_from_js` — `self.done` and the queue-empty fallthrough — still return `js_number(0.0)`. So `await writer.flush()` now returns cumulative bytes when it has to wait but 0 when it resolves immediately, meaning the value can go *down* between successive calls. Per REVIEW.md 'fix the whole class', those two `0.0` sites are si
Loading