ReviewOS

home-lang/home

Bun parity: drive HTTP/3 streaming uploads to completion

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

Corpus location

  • Position: 4135
  • File: js/web/fetch/fetch-http3-adversarial.test.ts
  • First observed failure: pending async test promise in POST /echo via pull ReadableStream requires event-loop support

Required parity

  • Drive pull-based ReadableStream request bodies to completion over HTTP/3 instead of leaving their fetch promise pending.
  • Preserve byte-exact request/response bodies for 64 KiB, 512 KiB, 1 MiB, and 4 MiB payloads.
  • Support type: "direct" streams with flush()/end() completion.
  • Model slow-consumer flow control, eight concurrent uploads, early server body abandonment, server reset, and upload aborts without hangs.
  • Keep HTTP/3-only routing honest: no silent HTTP/1.1 fallback.
  • Surface stream scheduling and transport failures through structured errors with operation, protocol, phase, cause, and composed stack context.

Completion gate

  • Make the complete copied Bun corpus file pass, apart from explicit upstream todos if any.
  • Update the existing focused HTTP/3 adversarial regression matrix.
  • Keep copied-corpus accounting and the project build green.

Parent tracker: #66 Predecessor: #355

10 days ago

Completed and pushed in a326191 (fix(fetch): complete HTTP/3 streaming flows).

What landed:

  • synchronous pull sources begin immediately instead of spending an avoidable microtask turn per chunk
  • async pull settlement now services readers queued during the settle window, fixing the bidirectional stream deadlock
  • redirects preserve HTTP/3/TLS options and apply 301/302/303 method/body semantics
  • HTTP/3 negotiation, URL, TLS-option, certificate, and forbidden-response-header failures now carry HTTP3TransportError, stable codes, fetch.http3.transport, protocol/phase/endpoint context, cause, and a composed stack
  • permanent focused guards cover the scheduler, redirect propagation, and structured error path

Verification:

  • fetch-http3-adversarial.test.ts: 27 passed, 0 failed/unsupported
  • fetch-http3-client.test.ts: 52 passed, 0 failed/unsupported
  • focused HTTP/3 matrix: 79/79
  • zig build --cache-dir /private/tmp/home-zig-abi-cache: pass

Corpus frontier through position 4136: 477 files, 6,839 passed, 280 todo, 172 allowed-empty, 0 failed, 0 unsupported.

Sign in to comment on this issue.