Summary
Classic (Node) stream objects do not expose their EventEmitter / Writable methods
on some construction paths: calling .on(), .write(), or .pipe() throws
"TypeError: is not a function". A parity sweep shows 65 failures
with this signature, overwhelmingly in node:stream.
Evidence (from scripts/parity_gap_report.py, 2026-05-31)
65 failures. Categories: stream (49), zlib (5), async_hooks (3), string_decoder
(2), fs (2), events (2), http (1), crypto (1) — i.e. anything that hands back a
stream object.
Representative cases:
stream/test-stream-pipe-cleanup.js — on is not a function
stream/test-stream-pipe-event.js — on is not a function
stream/test-stream-pipeline.js — pipe is not a function
stream/test-stream-duplex.js — write is not a function
stream/test-stream2-writable.js — write is not a function
stream/test-stream-readable-emittedReadable.js — on is not a function
The leak into zlib/crypto/fs/http suggests the missing methods are on a shared
stream base that some factory paths return without the EventEmitter/Writable
method surface wired up.
Repro
const { Readable } = require('stream');
const r = new Readable({ read() {} });
r.on('data', () => {}); // Perry: "on is not a function" on the affected path
Suggested scope
Ensure every stream object Perry returns (Readable/Writable/Duplex/Transform and
the wrappers zlib/crypto/fs/http hand out) carries the full EventEmitter
(on/once/emit/…) and Writable (write/end/pipe) method set. Likely a
prototype/dispatch wiring gap on one construction path rather than a missing
implementation.
Filed from the parity-gap radar. Cluster: 65 "on/write/pipe is not a function"
failures, concentrated in node:stream.
Summary
Classic (Node) stream objects do not expose their EventEmitter / Writable methods
on some construction paths: calling
.on(),.write(), or.pipe()throws"TypeError: is not a function". A parity sweep shows 65 failures
with this signature, overwhelmingly in
node:stream.Evidence (from
scripts/parity_gap_report.py, 2026-05-31)65 failures. Categories: stream (49), zlib (5), async_hooks (3), string_decoder
(2), fs (2), events (2), http (1), crypto (1) — i.e. anything that hands back a
stream object.
Representative cases:
stream/test-stream-pipe-cleanup.js—on is not a functionstream/test-stream-pipe-event.js—on is not a functionstream/test-stream-pipeline.js—pipe is not a functionstream/test-stream-duplex.js—write is not a functionstream/test-stream2-writable.js—write is not a functionstream/test-stream-readable-emittedReadable.js—on is not a functionThe leak into zlib/crypto/fs/http suggests the missing methods are on a shared
stream base that some factory paths return without the EventEmitter/Writable
method surface wired up.
Repro
Suggested scope
Ensure every stream object Perry returns (Readable/Writable/Duplex/Transform and
the wrappers zlib/crypto/fs/http hand out) carries the full EventEmitter
(
on/once/emit/…) and Writable (write/end/pipe) method set. Likely aprototype/dispatch wiring gap on one construction path rather than a missing
implementation.
Filed from the parity-gap radar. Cluster: 65 "on/write/pipe is not a function"
failures, concentrated in node:stream.