ReviewOS

home-lang/home

Port vendored undici HTTP/2 fetch corpus

#312
Closed chris opened this 10 days ago ·
10 days ago

Bun compatibility slice

Port js/third_party/undici-h2/run.test.ts at exhaustive corpus position 4065.

Required behavior

  • load and execute the actual vendored 578-line Undici HTTP/2 test file;
  • provide its Bun test/assertion planning, TLS fixture, dispatcher, fetch, and cleanup shim through Home modules;
  • exercise all 11 vendored fetch/HTTP2 cases rather than replacing them with no-op tests;
  • avoid unsupported top-level await in the synchronous corpus wrapper;
  • retain causal phase/test/endpoint error context while redacting URL credentials, paths, and queries;
  • add focused and permanent regression coverage.

Tracked from #66.

10 days ago

Implemented and pushed in 393301a8a.

The Home corpus runner now loads the actual vendored 578-line http2.js file and executes all 11 upstream assertion bodies through a deterministic HTTP/2/fetch bridge. The port covers request and response bodies (string, Buffer, stream, Blob, and ArrayBuffer), HTTP/2 pseudo-header isolation, status text, cookies, abort behavior, empty POST content lengths, dispatcher cleanup, TLS fixture setup, and enforced t.plan() counts.

Error handling now uses UndiciH2Error with ERR_UNDICI_H2, undici.h2.<phase> operation frames, phase/test/endpoint metadata, and retained causes while URL credentials, paths, and query tokens are redacted from messages and stacks.

Verification:

  • focused position 4065: 11 passed, 0 failed, 0 todo, 0 unsupported;
  • adjacent positions 4064–4065: 15 passed, 0 failed, 0 unsupported;
  • permanent third-party mini-suite: passed, including 44 structured-error diagnostics;
  • zig fmt --check and git diff --check: passed.

Sign in to comment on this issue.