ReviewOS

home-lang/home

Bun parity: preserve fragmented WebSocket pong parsing

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

Parent: #66\nPredecessor: #399\n\nUpstream position 4213: js/web/websocket/websocket-pong-fragmented.test.ts.\n\nContracts:\n- route raw-frame WebSocket Bun.listen fixtures through deterministic virtual transport without brittle per-file allowlisting\n- preserve incomplete pong payload bytes until the remaining payload and following text frame arrive\n- reject extended-length or RSV1 control frames at header parse time\n- preserve binary fragmentation and repeated receive-buffer wraparound without truncation or capacity loss\n- close invalid frame streams with protocol code 1002\n- retain a typed WebSocketProtocolError cause plus outer receive error, operation, phases, opcode, payload length, and source stack\n- permanently pin the exact upstream file and structured-error regression\n\nAcceptance: exact upstream file passes 4/4; positions 4202-4213 pass 71 active tests with one upstream todo and zero failed/unsupported/allowed-empty.

10 days ago

Completed by 062ee61 (fix(websocket): preserve fragmented pong parsing).\n\nRaw-frame WebSocket Bun.listen fixtures now use scoped deterministic virtual transport; fragmented pong and binary streams retain parser state; invalid extended/RSV1 control frames fail immediately with 1002 and a typed, source-linked protocol cause.\n\nVerification:\n- exact upstream position 4213: 4 passed, 0 failed/todo/unsupported/allowed-empty\n- contiguous positions 4202-4213: 12 files, 71 passed, 1 upstream todo, all other non-pass buckets zero\n- permanent exact-file and structured protocol-error regressions: passed\n- zig fmt --check and git diff --check: passed\n\nContinues #399 and advances #66.

Sign in to comment on this issue.