ReviewOS

home-lang/home

Activate direct React ReadableStream and Bun.serve corpus

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

Umbrella: #66

Activate the byte-identical upstream js/bun/stream/direct-readable-stream.test.tsx corpus without rewriting or narrowing it.

Source:

  • 345 lines
  • Home/upstream SHA-256: 0f77e48fd4c0d880ce9f922ef492ebf28611b0db3158f6b9202a04c930db1496
  • Current exact Home baseline: 0 passed, 0 failed, 1 whole-file Home TODO, 0 unsupported

The current preparation path replaces the file with Bun direct ReadableStream and serve integration. Removing that suppression must preserve all registered branches for the available React renderers:

  • React context and ReactDOM server/browser stream creation
  • Response.text/arrayBuffer/blob
  • direct stream .text()
  • readableStreamToBlob/Array/ArrayBuffer/Bytes
  • async iteration over string and binary chunks
  • one-shot and four-request HTTP/1.1 server paths
  • shared-session HTTP/3 routing across all 19 Latin-1/UTF-16/JSX fixtures
  • response sink controller lifecycle/object-count checks for HTTP/1 and H3

Completion requires the untouched source at its full platform-registered count with zero Home TODOs, failures, or unsupported cases, durable regression coverage, adjacent HTTP/3 stream checks, and the complete home_test gate.

10 days ago

Completed in ca25d1e2fccc486d2ea2ab8aa6f64afa74827bc9 (feat: activate direct React stream corpus).

The upstream source remains untouched and byte-identical:

  • js/bun/stream/direct-readable-stream.test.tsx
  • 345 lines
  • Home/upstream SHA-256: 0f77e48fd4c0d880ce9f922ef492ebf28611b0db3158f6b9202a04c930db1496

Implemented in Home's reusable corpus runtime:

  • React namespace import lowering plus React.createContext
  • React 19 JSX/fragment runtime ABI support
  • distinct Bun string-chunk and browser byte-chunk renderToReadableStream paths
  • react-dom/server and react-dom/server.browser stream exports
  • asynchronous readableStreamToArrayBuffer normalization for string and binary chunks
  • standard ReadableStream[Symbol.asyncIterator] cancellation/lock behavior
  • byte-normalizing own iterators for Request/Response bodies, keeping Bun.file uploads correct
  • array-of-chunks Response body concatenation
  • durable exact-count regression coverage retaining the HTTP/1 four-request loops and shared-session HTTP/3 matrix

Validation:

  • exact corpus: 537 passed, 0 failed, 0 TODO, 0 unsupported
  • adjacent React/stream/HTTP3 corpora: 306 passed, 0 failed, 4 existing upstream TODO, 0 unsupported
    • Markdown React: 68/68
    • readable-stream spawn helpers: 28 passed + 4 existing TODO
    • async-iterable Response streaming: 86/86
    • Bun.serve HTTP/3: 45/45
    • HTTP/3 fetch client: 52/52
    • HTTP/3 adversarial: 27/27
  • Bun.file multipart regression check: 6/6
  • debug build: pass
  • complete home_test gate: 1,140 passed, 1 skipped, 0 failed (1,141 total), exit 0, real 1526.40s

The first full gate caught a Request-body iterator interaction (Bun.file leaked as a raw stream chunk); the body adapter was corrected to retain byte normalization, the failing 6-test corpus passed directly, and the complete gate then passed.

Closing as complete. Umbrella tracking continues in #66.

Sign in to comment on this issue.