Skip to content

util.inspect: freeze builtInObjects to Node's 47-name bootstrap set - #36138

Open
robobun wants to merge 6 commits into
mainfrom
farm/e65b4392/util-format-s-buffer
Open

util.inspect: freeze builtInObjects to Node's 47-name bootstrap set#36138
robobun wants to merge 6 commits into
mainfrom
farm/e65b4392/util-format-s-buffer

util.inspect: freeze builtInObjects to Node v26.3.0's exact bootstrap…

02b6385
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 27, 2026 in 16m 59s

Code review found 2 potential issues

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

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/node/util/node-inspect-tests/parallel/util-format.test.js:247-253 MyBuffer subclass fixture does not exercise the subclass prototype path
🟡 Nit test/js/node/util/node-inspect-tests/parallel/util-inspect.test.js:239-243 prettier-ignore disables formatting on ~1500-line test body

Annotations

Check warning on line 253 in test/js/node/util/node-inspect-tests/parallel/util-format.test.js

See this annotation in the file changed.

@claude claude / Claude Code Review

MyBuffer subclass fixture does not exercise the subclass prototype path

The `MyBuffer` subclass fixture doesn't exercise the subclass prototype path — the deprecated `Buffer(size)` constructor doesn't honor `new.target`, so `new MyBuffer(2)` returns an object whose `[[Prototype]]` is `Buffer.prototype` directly (not `MyBuffer.prototype`), making this assertion redundant with the `Buffer.from("ab")` case four lines above. To actually cover the extra prototype-chain hop through `hasBuiltInToString`, use `Object.setPrototypeOf(Buffer.from([0x68, 0x69]), MyBuffer.protot

Check warning on line 243 in test/js/node/util/node-inspect-tests/parallel/util-inspect.test.js

See this annotation in the file changed.

@claude claude / Claude Code Review

prettier-ignore disables formatting on ~1500-line test body

The `// prettier-ignore` here applies to the next AST node — the entire `test("no assertion failures 2", ...)` expression statement — so all ~1580 lines of the callback body are now permanently exempt from auto-formatting. Rather than trading a one-time reindent for permanent format-exemption of a large ported test, consider extracting the slow surrogate-pair loop into its own `test()` with the debug timeout (which also keeps the timeout scoped to the code that actually needs it), or just accept