Files
Jinwoo-HandOrca 1f768d3dbe fix(remote): resync remote terminal on dropped output frames
The multiplex output path silently drops Output frames when the
websocket buffer exceeds MAX_BINARY_BUFFERED_AMOUNT (encryptedBinaryReply
returns false). The client never noticed the gap, so a congested link
(fast PTY over slow/SSH transport) permanently corrupted the remote
terminal with missing/garbled output and no error.

Output frame seq is a byte high-water, so a drop is self-describing on
the wire. The client now tracks the expected next offset and, on a gap,
discards the corrupt tail and pulls a fresh authoritative snapshot
(self-healing, no user-facing error). Server-side, seq-less Output
chunks now carry the sentinel 0 instead of the control-frame cursor so
they don't poison the client's gap detector, and sendFrame propagates
the send/drop result end-to-end.

Adds an end-to-end repro test driving the real client multiplexer
through a fake backpressured transport.

Co-authored-by: Orca <help@stably.ai>
2026-07-10 04:24:29 -04:00
..