ReviewOS

home-lang/home

Bun parity: port fetch stream fast-path semantics

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

Focused checkpoint under #66, following #373.

Upstream corpus frontier: js/web/fetch/stream-fast-path.test.ts (position 4164).

Scope:

  • preserve the upstream test unchanged
  • implement the logical fetch/Response body stream fast path exercised by Bun
  • retain correct byte delivery, chunk ownership, backpressure/lifecycle behavior, and cleanup
  • surface actionable operation/phase/cause metadata with composed stacks on stream failures
  • add permanent regression coverage and validate the contiguous tail plus full build

Parent: #66 Predecessor: #373

10 days ago

Completed in 44862b1 (feat(fetch): port Blob stream fast paths) and pushed to main.

Validation:

  • upstream js/web/fetch/stream-fast-path.test.ts remains byte-for-byte unchanged
  • exact position 4164: 18 passed / 0 failed / 0 todo / 0 unsupported / 0 allowed-empty
  • all four Blob-backed conversions (arrayBuffer, bytes, text, blob) now return already-fulfilled tracked Promises without wasting a microtask
  • Blob stream MIME metadata survives readableStreamToBlob and ReadableStream.prototype.blob()
  • live/pull streams retain the asynchronous reader path and body-lock behavior
  • synchronously errored streams reject instead of being mistaken for replayable empty streams
  • failures expose ERR_READABLE_STREAM_CONVERSION, operation, phase, original cause, and composed stack
  • permanent native bootstrap regression passes
  • position 4165 utf8-bom.test.ts: 21 passed / 0 failed / 0 unsupported
  • full zig build --cache-dir /private/tmp/home-zig-abi-cache passes

The contiguous frontier is now position 4166, js/web/fetch/wasm-streaming.test.ts. Parent: #66. Predecessor: #373.

Sign in to comment on this issue.