ReviewOS

home-lang/home

Port ReadableStream byte, BYOB, and tee semantics

#203
Closed chris opened this 9 days ago ·
9 days ago

Parent tracker: #66 Related ordered-corpus tracker: #201 Related skip/TODO accounting: #202

Baseline after e663087:

  • js/node/test/parallel/test-whatwg-readablebytestream.js failed strict state/error assertions.
  • js/node/test/parallel/test-whatwg-readablestreambyob.js passed when isolated; the earlier unsupported count was an aggregate attribution error.
  • js/node/test/parallel/test-whatwg-readablestream.mjs needed exact .mjs import lowering and a registered async regression because its Node mustCall callbacks are not bun:test registrations.

Completed in 6514279:

  • strict getReader option validation with ERR_INVALID_ARG_TYPE and ERR_INVALID_ARG_VALUE
  • logical default/BYOB reader lock and release behavior
  • branded BYOB readers and requests with receiver/state validation
  • pending byte reads, pull/error/close state, typed-view copying, partial queues, cancellation, and auto-allocation
  • live asynchronous tee behavior without capture/live-queue aliasing or chunk duplication
  • exact Node .mjs import lowering
  • permanent registered async byte-stream tee regression

Acceptance evidence:

  • registered async tee probe: 1 pass, 0 fail
  • untouched WHATWG ReadableStream .mjs file: pass
  • ordered positions 3630-3632: 3 files, 0 failed, 0 unsupported, 0 TODO
  • ordered positions 3622-3645: 24 files, 0 failed, 0 unsupported, 0 TODO
  • zig build: pass
  • zig fmt --check and git diff --check: pass

All changes are Home-owned; the copied Bun test file remains byte-for-byte untouched.

9 days ago

Completed and pushed in 6514279. The focused three-file Streams slice and full 24-file URL/Streams boundary now pass with zero failures, unsupported cases, or TODOs. The registered async tee regression also verifies both branches drain exactly one foo chunk.

Sign in to comment on this issue.