ReviewOS

home-lang/home

Bun parity: port WebAssembly streaming fetch integration

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

Focused checkpoint under #66, following #374.

Upstream corpus frontier: js/web/fetch/wasm-streaming.test.ts (position 4166).

Scope:

  • preserve the upstream test unchanged
  • implement WebAssembly.compileStreaming and instantiateStreaming integration with fetch/Response bodies
  • enforce MIME, rejection, module/instance, and streaming byte semantics logically
  • retain actionable operation/phase/url/cause metadata with composed stacks
  • add permanent regression coverage and validate the contiguous tail plus full build

Parent: #66 Predecessor: #374

11 days ago

Completed in 950346e (feat(fetch): port WebAssembly streaming) and pushed to main.

Validation:

  • upstream js/web/fetch/wasm-streaming.test.ts remains byte-for-byte unchanged
  • exact position 4166: 20 passed / 0 failed / 0 todo / 0 unsupported / 0 allowed-empty
  • WebAssembly.compileStreaming and instantiateStreaming now accept Response/PromiseLike sources, fixed bodies, Bun.file bodies, strings, and pull-driven streams
  • native modules/instances and imports work, including pending source promises
  • MIME, status, used-body, non-Response, invalid-Wasm, non-byte chunks, detached views/buffers, and missing imports are enforced
  • rejected source/stream errors retain identity while receiving operation/phase/url context
  • validation errors expose ERR_WEBASSEMBLY_STREAMING, cause, and composed stack
  • .wasm Bun.file MIME inference now returns application/wasm
  • node:assert/strict now exposes the complete strict assertion surface and import lowering
  • async .resolves failures retain rejection causes via ERR_BUN_TEST_ASYNC_EXPECTATION diagnostics
  • permanent WebAssembly and diagnostics regressions pass
  • position 4167 passes 1/1
  • full zig build --cache-dir /private/tmp/home-zig-abi-cache passes

The contiguous frontier is now position 4168, js/web/html/FormData-multipart-serialization.test.ts. Parent: #66. Predecessor: #374.

Sign in to comment on this issue.