FileSink: settle the pending write()'s promise in every synchronous close()/end() flush arm - #35365
Merged
Jarred-Sumner merged 4 commits intoJul 24, 2026
Merged
Claude / Claude Code Review
completed
Jul 24, 2026 in 26m 19s
Code review found 1 potential issue
Found 2 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | test/js/bun/util/filesink.test.ts:377 |
Dead readFdOpen guard in drained test |
Annotations
Check warning on line 377 in test/js/bun/util/filesink.test.ts
claude / Claude Code Review
Dead readFdOpen guard in drained test
Nit: `let readFdOpen = true;` is never flipped to `false` in this test — unlike the sibling 'reader gone' tests it was copied from, this one only drains `readFd` and never closes it in the try body, so the `if (readFdOpen)` guard in the finally block is vacuously true. Drop the variable and call `fs.closeSync(readFd)` unconditionally in the finally (REVIEW.md: "Every line you add must be demonstrably live"). Behavior is correct either way — `readFd` is still closed.
Loading