Skip to content

node:diagnostics_channel: sync with Node 26 + subsystem channels - #32628

Open
cirospaciari wants to merge 59 commits into
mainfrom
claude/diagnostics-channel-node26
Open

node:diagnostics_channel: sync with Node 26 + subsystem channels#32628
cirospaciari wants to merge 59 commits into
mainfrom
claude/diagnostics-channel-node26

require: forward the two named params with $call instead of $apply(ar…

0ea7f36
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 8, 2026 in 37m 20s

Code review found 3 potential issues

Found 4 candidates, confirmed 3. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 3
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/expectations.txt:32 Stale expectations.txt entry: test-net-connect-memleak.js no longer exists
🟡 Nit src/js/builtins/CommonJS.ts:10-15 $call(this, id, options) always passes 2 args, defeating the $argumentCount() gate in overridableRequire
🟡 Nit src/jsc/bindings/NodeDiagnosticsChannel.cpp:1-2 NodeDiagnosticsChannel.cpp does not #include its own header (inconsistent with NodeV8Module.cpp)

Annotations

Check warning on line 32 in test/expectations.txt

See this annotation in the file changed.

@claude claude / Claude Code Review

Stale expectations.txt entry: test-net-connect-memleak.js no longer exists

Nit: this PR's only net change to `expectations.txt` is a `[ LINUX-X64 ] … [ FLAKY ]` entry for `test-net-connect-memleak.js`, but that file no longer exists in the tree — it was removed via merge c47b0afa (main→PR) after the entry was added in 3fbc8758. Per the file's own header ("A stale entry is invisible: the file simply never runs and nobody finds out"), delete the line; the PR description's whole `## test/expectations.txt` section ("the sibling of the already-quarantined test-tls-connect-m

Check warning on line 15 in src/js/builtins/CommonJS.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

$call(this, id, options) always passes 2 args, defeating the $argumentCount() gate in overridableRequire

Nit: `.$call(this, id, options)` always passes 2 args to `overridableRequire`, so `$argumentCount()` at CommonJS.ts:97/107 is now always 2 and the native `userArgumentCount >= 2` `[[unlikely]]` gate (JSCommonJSModule.cpp:1331) is always entered on cold-load via the bound `require`. Correctness is fine (`options` is `undefined` → `.isObject()` false) and warm requires early-return before this, so it's one extra `isObject()` per module first-load — but the count no longer distinguishes 1-arg from 

Check warning on line 2 in src/jsc/bindings/NodeDiagnosticsChannel.cpp

See this annotation in the file changed.

@claude claude / Claude Code Review

NodeDiagnosticsChannel.cpp does not #include its own header (inconsistent with NodeV8Module.cpp)

Nit: `NodeDiagnosticsChannel.cpp` doesn't `#include "NodeDiagnosticsChannel.h"`, while its sibling `NodeV8Module.cpp` added in this same PR does at line 1. The `.h` *is* consumed — `generate-js2native.ts:195` maps every `$newCppFunction("Foo.cpp", ...)` to `#include "Foo.h"` in the generated JS2Native dispatch — so the `JSC_DECLARE_HOST_FUNCTION` and `JSC_DEFINE_HOST_FUNCTION` compile in separate TUs with no shared consistency check. Add the self-include (and drop the now-redundant direct `ZigGl