Summary
Node exposes http.Agent, http.ClientRequest, http.IncomingMessage, and http.ServerResponse as constructable classes. Under Perry, new-ing them throws TypeError: <X> is not a constructor. (new https.Agent() with no args works today via the curated fixture, but new http.Agent({options}), new ClientRequest(...), new IncomingMessage(...), and new ServerResponse(...) do not.)
Repro shapes
const http = require('http');
new http.Agent({ keepAlive: true }); // test-http-agent-keepalive.js
new http.ClientRequest({ createConnection: () => {} }); // test-http-client-defaults.js
new http.IncomingMessage(socket); // test-http-incoming-matchKnownFields.js
new http.ServerResponse({ /* req */ }); // test-http-server-response-standalone.js
These constructors are part of Node's public surface (used directly by tests and by some userland libs that subclass them). They need real construct semantics (the instance must carry the expected fields/methods), not just a callable export.
Failing tests (13)
test-http-agent-abort-controller.js
test-http-agent-error-on-idle.js
test-http-agent-keepalive-delay.js
test-http-agent-keepalive.js
test-http-agent-timeout-option.js
test-http-client-defaults.js
test-http-client-set-timeout-after-end.js
test-http-client-timeout-option-with-agent.js
test-http-incoming-matchKnownFields.js
test-http-incoming-message-connection-setter.js
test-http-incoming-message-destroy.js
test-http-outgoing-message-write-callback.js
test-http-server-response-standalone.js
Acceptance
new http.Agent(opts), new http.ClientRequest(opts), new http.IncomingMessage(socket), new http.ServerResponse(req) construct working instances. The 13 tests reach their assertions.
Part of #2132. Measured via scripts/node_core_subset.py --api http https vs pinned Node v22 corpus.
Summary
Node exposes
http.Agent,http.ClientRequest,http.IncomingMessage, andhttp.ServerResponseas constructable classes. Under Perry,new-ing them throwsTypeError: <X> is not a constructor. (new https.Agent()with no args works today via the curated fixture, butnew http.Agent({options}),new ClientRequest(...),new IncomingMessage(...), andnew ServerResponse(...)do not.)Repro shapes
These constructors are part of Node's public surface (used directly by tests and by some userland libs that subclass them). They need real construct semantics (the instance must carry the expected fields/methods), not just a callable export.
Failing tests (13)
Acceptance
new http.Agent(opts),new http.ClientRequest(opts),new http.IncomingMessage(socket),new http.ServerResponse(req)construct working instances. The 13 tests reach their assertions.Part of #2132. Measured via
scripts/node_core_subset.py --api http httpsvs pinned Node v22 corpus.