Skip to content

Run adapter conformance over real Node sockets - #24

Merged
smiggleworth merged 4 commits into
mainfrom
issue/23-adapter-conformance
Aug 15, 2026
Merged

Run adapter conformance over real Node sockets#24
smiggleworth merged 4 commits into
mainfrom
issue/23-adapter-conformance

Conversation

@smiggleworth

@smiggleworth smiggleworth commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adopt @askrjs/server/testing and run its shared conformance suite through real loopback sockets
  • prove client abort reaches ReadableStream.cancel() through the actual response writer
  • prove an incomplete chunked request receives Node's timeout termination
  • initialize native timeout/checking machinery during http.Server construction for both listen() and serve()
  • retain the caller-authored timeout properties, including prior mixed-value compatibility

Linked issue

Closes #23

Dependency

TDD

  • Red 1f92e83: the shared testing entry point was unavailable to the reference adapter.
  • Transport red 3a3e6a5: after adopting the released runner, real response cancellation passed but an incomplete chunked body exceeded the 2-second conformance deadline despite 100 ms timeout properties.
  • Green 03eaf42: request/header timeouts and a bounded checking interval are initialized at server construction; the real test passes in about 120 ms.

Guardrails

  • infinite response + real HTTP client abort
  • incomplete chunked body + real raw TCP client
  • bounded shared diagnostics and cleanup signals
  • both listen() and serve() construct servers with enforceable options
  • existing direct writer, timeout property/validation, response, WebSocket, serve, and package tests remain in the same suite

Acceptance audit

  • Every acceptance criterion in Adopt real-socket adapter cancellation and timeout conformance guard #23 is checked with evidence.
  • Both focused red states were recorded and the shared real-socket guard is green.
  • Full unit, type, build, package-artifact, audit, and exact-head hosted CI gates pass.
  • Exact squash merge, tag, publish workflow, and clean registry consumer are verified.

Verification

  • npm run check
  • npm audit --omit=dev

@smiggleworth
smiggleworth marked this pull request as ready for review August 15, 2026 20:42
Copilot AI lite review requested due to automatic review settings August 15, 2026 20:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@smiggleworth
smiggleworth merged commit b74939d into main Aug 15, 2026
3 checks passed
@smiggleworth
smiggleworth deleted the issue/23-adapter-conformance branch August 15, 2026 20:42
@smiggleworth

Copy link
Copy Markdown
Contributor Author

Post-merge release audit: squash commit and main are b74939ddeebd937170cf4f6a6665442c268bc69c; annotated v0.0.12 peels to that exact commit. Publish run https://github.com/askrjs/askr-node/actions/runs/31907419752 succeeded across Ubuntu, macOS, and Windows. The npm registry serves @askrjs/node@0.0.12 with integrity sha512-UkVUo8D5KLes7L2cn5OKtxu9bMbQtBXVo+15wKRkzhjKcyvXqis9GTypm/GaOVX2L/CL62VvQVQzgB09iys7tg==. A clean install imported the public listen API and npm audit --omit=dev reported 0 vulnerabilities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adopt real-socket adapter cancellation and timeout conformance guard

2 participants