ReviewOS

home-lang/home

Port Bun ReadableStream stdin edge-case matrix

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

Port the exact upstream test/js/bun/spawn/spawn-stdin-readable-stream-edge-cases.test.ts corpus into Home without whole-file TODO rewriting.

Scope:

  • pull exceptions with partial data delivery
  • early child exit and writes after close
  • mixed string, Uint8Array, and ArrayBuffer chunks
  • slow consumers, high-frequency chunks, and repeated pulls
  • stream reuse prevention and byte streams
  • independent stdout/stderr piping
  • long single chunks, alternating types, and stdio option variants
  • durable exact-file regression

Acceptance:

  • corpus remains byte-identical to ~/Code/bun
  • all active tests pass with 0 fail and 0 unsupported
  • the explicit upstream cancellation TODO remains
  • core and integration ReadableStream stdin matrices remain green
  • full home_test gate passes
10 days ago

Completed in a828b8f.

Evidence:

  • Exact upstream spawn-stdin-readable-stream-edge-cases.test.ts remains byte-identical to ~/Code/bun.
  • Exact edge matrix: 12 pass, 0 fail, 0 unsupported, 1 explicit upstream cancellation TODO preserved.
  • Pull exceptions preserve every chunk enqueued before the throw, then terminate cleanly.
  • Early child exit bounds consumption to the first line and cancels the reader.
  • Mixed strings, Uint8Arrays, ArrayBuffers, byte streams, slow consumers, high-frequency chunks, repeated pulls, reuse rejection, split stdout/stderr, 256 KiB chunks, alternating types, and stdio variants are active.
  • Core matrix: 21 pass, 0 fail, 0 unsupported, 2 upstream TODOs.
  • Integration matrix: 5 pass, 0 fail, 0 unsupported, 0 TODO.
  • Full ./pantry/.bin/zig build test -Dfilter=home_test --summary failures: exit 0.
  • Whole-file TODO rewriting was removed and a durable exact-file 12+1 regression was added.

Sign in to comment on this issue.