Files
codex/codex-rs/realtime-webrtc
Benjamin Carlsson deb1471166 Read voice helper frames independently of pipe chunks (#42404)
## Why

Pipe output chunks can split one protocol frame or contain several frames. A
timed-out read must also retain any partial frame it already consumed so the next
exchange can continue decoding it.

## What changed

Add a stateful `MessageReader` that buffers partial input, preserves unread bytes
from coalesced chunks, and validates frame bounds before reading the payload. Use
it for voice helper handshake and shutdown responses.

## Testing

Add async tests for fragmented and coalesced frames, cancelled reads, oversized
headers, truncated and malformed input, and invalid pipe chunk sizes.

GitOrigin-RevId: 274d9698e05f2de2147235b6e4e1bd38dbb7c23b
2026-09-03 01:24:12 +00:00
..