node:worker_threads: rebind console output sink instead of replacing the global console - #34347
Closed
robobun wants to merge 6 commits into
Closed
node:worker_threads: rebind console output sink instead of replacing the global console#34347robobun wants to merge 6 commits into
robobun wants to merge 6 commits into
Claude / Claude Code Review
completed
Jul 16, 2026 in 22m 53s
Code review found 3 potential issues
Found 2 candidates, confirmed 3. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 3 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/jsc/ConsoleObject.rs:526-537 |
console.trace() output routed to worker.stdout instead of worker.stderr |
Annotations
Check warning on line 537 in src/jsc/ConsoleObject.rs
claude / Claude Code Review
console.trace() output routed to worker.stdout instead of worker.stderr
`console.trace()` in a `node:worker_threads` worker now lands on `worker.stdout` instead of `worker.stderr`: `use_stderr` is false for `(MessageType::Trace, MessageLevel::Log)`, so `override_for(false)` picks `stdout_override`. Pre-PR (and Node.js), the swapped-in `node:console`'s `trace()` did `this.error(err.stack)` → `worker.stderr`, so consumers reading `worker.stderr` for trace output now find nothing there. This does align workers with main-thread Bun's `console.trace` (which already write
Loading