ReviewOS

home-lang/home

Port http2-wrapper automatic HTTP/1.1 fallback

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

Scope

Port Bun corpus position 4001, js/third_party/http2-wrapper/http2-wrapper.test.ts.

Acceptance criteria

  • http2-wrapper resolves through Home's corpus module adapter.
  • auto() returns an awaitable ClientRequest-compatible object.
  • POST request bodies and response event streams work against Bun.serve over HTTP and TLS.
  • Negotiation/request failures retain the original cause plus protocol/host/port operation context and readable stacks.
  • The focused file, adjacent third-party shard, and permanent diagnostics pass.
10 days ago

Completed in 884f3e029 (feat(third-party): port http2-wrapper fallback) and pushed to main.

Implemented the http2-wrapper module adapter on top of Home's existing HTTP/HTTPS ClientRequest transport. auto() is awaitable, preserves request event semantics, sends POST bodies, streams response events, and selects plain HTTP or TLS from the requested protocol.

Synchronous negotiation failures and emitted request errors are now wrapped with the original cause plus protocol, host, port, an explicit http2-wrapper.auto operation frame, and a stable cause name/message. The always-run third-party diagnostic permanently verifies invalid-protocol metadata and stack readability alongside the Hono diagnostics.

Verification:

  • http2-wrapper.test.ts: 1 passed, 0 failed, 0 unsupported (both HTTP and TLS requests execute inside the test)
  • positions 4000–4001: 2 passed, 0 failed
  • permanent Hono and http2-wrapper cause/operation-stack assertions: passing
  • permanent corpus accounting, gRPC errors, SQL adapters, and third-party diagnostics: all passing
  • zig fmt --check and git diff --check: clean

Cumulative executable ledger through position 4001: 343 files, 2,926 passed, 218 todo, 0 failed, 0 unsupported, 171 explicitly allowed-empty.

10 days ago

Closed by 884f3e0; HTTP/TLS fallback and permanent negotiation diagnostics are green.

Sign in to comment on this issue.