Summary
Adopt the shared @askrjs/server/testing adapter conformance runner against the real @askrjs/node listener, so response cancellation and incomplete-request timeouts remain executable cross-package guarantees.
Dependency and implementation contract
Depends on askrjs/askr-server#20 and its released @askrjs/server/testing entry point.
Use real loopback sockets, not a mocked ServerResponse:
- cancellation exercise: serve the runner's infinite response, read at least one chunk over TCP, destroy the client, and wait for the runner to observe
ReadableStream.cancel();
- timeout exercise: listen with explicit finite
requestTimeout/headersTimeout, send an incomplete chunked request over a raw socket, and resolve only when Node closes the connection;
- every exercise owns deterministic cleanup and alternate ephemeral ports; no default-port assumptions;
- retain the existing direct unit coverage for
writeNodeResponse() and timeout option validation.
The red transport run proved a real timeout gap: assigning server.requestTimeout and server.headersTimeout only after createServer() leaves Node's incomplete-connection checker at its 30-second construction default, so authored 100 ms values did not terminate the stalled body within two seconds. Initialize request/header/keep-alive timeouts and connectionsCheckingInterval during construction in both listen() and serve(). Choose a positive check interval no slower than the smallest configured request/header timeout, capped at one second, then restore the exact authored public property values so existing mixed timeout configurations remain compatible.
Acceptance criteria
Definition of done
Severity
Medium — response cancellation was correct, but the real-transport guard proved authored timeout values were not enforced promptly because the checker was initialized too late.
Summary
Adopt the shared
@askrjs/server/testingadapter conformance runner against the real@askrjs/nodelistener, so response cancellation and incomplete-request timeouts remain executable cross-package guarantees.Dependency and implementation contract
Depends on askrjs/askr-server#20 and its released
@askrjs/server/testingentry point.Use real loopback sockets, not a mocked
ServerResponse:ReadableStream.cancel();requestTimeout/headersTimeout, send an incomplete chunked request over a raw socket, and resolve only when Node closes the connection;writeNodeResponse()and timeout option validation.The red transport run proved a real timeout gap: assigning
server.requestTimeoutandserver.headersTimeoutonly aftercreateServer()leaves Node's incomplete-connection checker at its 30-second construction default, so authored 100 ms values did not terminate the stalled body within two seconds. Initialize request/header/keep-alive timeouts andconnectionsCheckingIntervalduring construction in bothlisten()andserve(). Choose a positive check interval no slower than the smallest configured request/header timeout, capped at one second, then restore the exact authored public property values so existing mixed timeout configurations remain compatible.Acceptance criteria
smiggleworth.@askrjs/server/testing.listen()andserve()initialize Node timeout/checking machinery during server construction while retaining the exact authored timeout property values.Definition of done
0.0.12is release-ready at the exact head.Severity
Medium — response cancellation was correct, but the real-transport guard proved authored timeout values were not enforced promptly because the checker was initialized too late.