Skip to content

feat(http): expand the static Node HTTP surface - #410

Merged
ctate merged 5 commits into
mainfrom
ctate/more-static-http-4
Sep 25, 2026
Merged

ctate merged 5 commits into
mainfrom
ctate/more-static-http-4

Conversation

@ctate

@ctate ctate commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Extend static node:http module values, Agent bookkeeping, client controls and lifecycle, IncomingMessage state, ServerResponse events, and server timeout and connection shutdown methods.
  • Add 19 Node differential corpus programs across the C and LLVM backends, and refresh the test-backed compatibility inventory. The static HTTP matrix has 131 partial rows out of 174 public API rows; 52 rows newly move from not implemented to partial. No dynamic HTTP statuses change.
  • Make request and response timeout listeners prevent Node-style server auto-destroy, with regression cases for both message types.
  • Fix a flaky Zig toolchain assertion and refresh the full TypeScript order baseline.

Validation

  • pnpm -r build
  • pnpm node-compat:check
  • NEXT_DIST_DIR=.next-check pnpm check in docs/
  • Focused C and LLVM differential corpus for HTTP fixtures 2973–2990, including timeout regressions
  • pnpm test:ts7 (full 1,489-entry order and preflight sweep)
  • pnpm test:sandbox --shards 4 (plain and sanitized lanes passed)

Remaining scope

The compatibility claims remain partial. The native client still uses one connection per request, so Agent keep-alive pooling, globalAgent behavior, the standalone OutgoingMessage base class, and several protocol events and limits remain outside this PR. The client socket closes when its response completes, unlike Node's pooled default socket.

- Preserve precise string array types for whole incoming header and trailer collections.
- Cover duplicate headers, trailers, and raw header reads against Node in both backends.
- Refresh test-backed static HTTP compatibility claims.
- Preserve both HTTP snapshot and Math receiver corpus order baselines.
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Sep 25, 2026 4:34am UTC

- Add HTTP module values, request and response lifecycle state, and socket controls.
- Implement server timeout and connection shutdown behavior in the native runtime.
- Cover C and LLVM behavior with Node differential fixtures, refresh compatibility evidence, and recover interrupted Sandbox streams.
@ctate ctate changed the title feat(http): materialize static distinct header snapshots feat(http): expand the static Node HTTP surface Sep 25, 2026
Comment thread packages/runtime/src/scr_net.c Outdated
Comment thread packages/runtime/src/scr_net.c Outdated
if (scr_exc_pending()) return;
}
scr_net_fire0_this(&s->timeout_ls, s, SCR_DYNH_NET_SOCKET);
if (scr_exc_pending()) return;

@vercel vercel Bot Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A server request/response on('timeout', cb) listener registers on the socket-level list rather than the message-level timeout_ls, so it is not counted by the connection's unhandled-timeout detection and the connection is still auto-destroyed (ECONNRESET) — diverging from Node, where any message 'timeout' listener suppresses the destroy.

Fix on Vercel

Comment thread packages/compiler/test/ts7/baselines/order-parity.json
- Keep server sockets open when request or response timeout listeners handle the event.

- Add differential regressions and refresh the TypeScript 7 order baseline.
- Integrate the latest compiler and Test262 changes from main.

- Reconcile Sandbox status recovery and regenerate the TypeScript order baseline.
@ctate
ctate merged commit 0b8b5d5 into main Sep 25, 2026
35 of 37 checks passed

This branch was successfully deployed

1 active deployment
Preview — dcdaa579 Deployed Sep 25, 2026 by vercel[bot]
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.

1 participant