ReviewOS

home-lang/home

Bun parity: handle fragmented WebSocket upgrades and frames

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

Parent: #66 Predecessor: #391

Corpus position 4205/4708: js/web/websocket/websocket-client-short-read.test.ts.

Home must handle an incomplete extended payload length, split 101 responses with a large pipelined frame, oversized unterminated headers, and client termination while buffered handshake bytes await delivery.

Acceptance criteria:

  • unchanged upstream file passes 4/4
  • no failed, todo, unsupported, or allowed-empty classification
  • the 16 KiB cap applies only to bytes that are still provably handshake headers
  • binary frames honor nodebuffer, arraybuffer, and blob
  • global and ws clients preserve close code/reason/cleanliness and expose abrupt terminate() semantics
  • header failures retain structured handshake metadata and cause context
  • permanent regression covers the entire upstream file

Implementation: 529787b.

10 days ago

Completed and pushed in 529787b (fix(websocket): buffer fragmented upgrade reads).

The unchanged upstream file is 4/4 green with zero fallback classifications. Home now buffers incomplete extended lengths and split upgrades, excludes pipelined frame bytes from the 16 KiB header cap, rejects oversized unterminated headers with structured diagnostics, preserves binaryType across global and ws clients, and reports clean versus abrupt close metadata correctly. The exact 4202-4205 interaction range is 10/10 green, and the permanent regression passes.

Sign in to comment on this issue.