Skip to content

Contract Node exports and harden transport cleanup for 0.5 - #52

Merged
smiggleworth merged 1 commit into
developfrom
release/050-node-contract
Oct 10, 2026
Merged

smiggleworth merged 1 commit into
developfrom
release/050-node-contract

Conversation

@smiggleworth

Copy link
Copy Markdown
Contributor

Node can retain transport resources after startup/write failure, and pending MCP stream errors can terminate the process after shutdown. This fixes ten reproduced ownership/ordering defects, including stalled cancellation, rejected response headers, late responses, pending authentication and partial setup. Application cancellation is best-effort; native startup errors retain their identity.

For the 0.5.0 API review, replace wildcard root exports with 10 deliberate contracts (13 including MCP), down from 16. Remove normalizeClientAddress, ConnectNext and NodeWebSocketOptions, with a complete inventory and compiled replacements in docs/0.5.0-api.md. Migrate router imports and the obsolete README example before Server's API contraction.

Validation on Node 24.21.0:

  • Clean npm ci, format, lint, strict source/test/benchmark types, 106 tests, V8 source floors, build, publint and package file checks.
  • Normal tarball install: all 13 names, three removed imports and 14 private paths; strict TypeScript 6.0.2 and 7.0.2; real HTTP/MCP and two isolated-process crash regressions.
  • Source coverage: 90.46% statements, 84.09% branches, 83.11% functions, 93.77% lines. Shared write ownership has 100% coverage; remaining gaps and limits are recorded in docs/0.5.0-hardening.md.
  • All 11 paired HTTP benchmark cases have finite positive means/rates/sample counts with identical fixtures/toolchain. Real HTTP changes range -1.7% to +1.6%; diagnostic only, with no optimization/capacity claim or raised budget.
  • Full npm audit: zero advisories after compatible development-tool updates. Runtime dependency records/ranges are unchanged; Node/undici type definitions align to Node 24.

Self-review inspected source, assertion bodies, failure recovery, stream/listener ownership and the installed declaration surface. This is not an independent-agent review. Versions remain 0.4.x preparation versions. No tags or packages are published; the full coordinated candidate requires the maintainer's review and explicit approval.

Closes #51. Refs #50; API issue remains open for the final cross-package graph and website migration.

@smiggleworth
smiggleworth merged commit 5f1aaab into develop Oct 10, 2026
6 checks passed
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.

hardening: test Node request, socket, and shutdown failure paths

1 participant