ReviewOS

home-lang/home

Port fetch many-header cap and default preservation

#171
Closed chris opened this 11 days ago ·
11 days ago

Track the exact upstream test/js/bun/http/fetch-header-count-limit.test.ts corpus in Home.

Scope:

  • activate the byte-identical three-test corpus instead of a whole-file TODO
  • route fetch requests to in-memory raw node:net servers
  • cap transmitted user headers at Bun’s 250-header limit without crashing
  • derive Host/Accept/User-Agent override flags only from headers that were actually accepted, preserving defaults after overflow
  • preserve raw HTTP request/response framing and async server disposal
  • add durable exact-corpus regression coverage
  • pass the exact corpus test and full home_test gate

Parent: #66

11 days ago

Completed and pushed in cb632c80348c984203203176308b5829ba2326a2.

Validation:

  • exact upstream corpus SHA-256: 73f9a77ac2de848eaeea0b415fdb1750387d01a4db28f24f453f73f56a0f39f2 (byte-identical to ~/Code/bun/test/js/bun/http/fetch-header-count-limit.test.ts)
  • exact corpus run: 1 file, 3 passed, 0 failed, 0 unsupported, 0 TODO
  • full gate: ./pantry/.bin/zig build test -Dfilter=home_test --summary failures exited 0

Implemented a shared fetch path to in-memory raw node:net servers, transmission-time capping at 250 accepted user headers, default Host/Accept/User-Agent insertion based only on accepted overrides, raw request/response framing, and async net-server disposal. The Headers object itself remains uncapped, matching Bun’s transmission behavior.

Sign in to comment on this issue.