Files
oh-my-pi/packages/coding-agent/test
roboomp c577ffebdc fix(collab): cap replicated host frames so oversized entries do not loop the relay
CollabHost shipped the first entry of every snapshot-chunk batch unconditionally, and broadcast live entry/event frames verbatim, so a single multi-megabyte tool result (read/bash/search) overflowed the relay's per-frame maxPayloadLength. The relay closed the host's WebSocket with 1006 ("Received too big message"), CollabSocket treated 1006 as non-fatal and reconnected, the next guest hello triggered the same oversized send, and the host status line cycled "Collab relay connection lost, reconnecting…" indefinitely.

Add shrinkForReplication: any host->guest payload whose JSON exceeds MAX_REPLICATED_PAYLOAD_BYTES (1 MB) is deep-cloned with long strings head-truncated and an "[…N chars elided for collab session]" marker; otherwise the original reference passes through. Apply it to snapshot chunk entries, live entry broadcasts, and live event broadcasts (including large tool_execution_end results). Regression test stands up a Bun.serve relay with 8 MB maxPayloadLength and a snapshot containing a 5 MB entry; asserts the host stays connected, the snapshot train finalizes, and the guest sees the entry with the elision marker.

Fixes #3739
2026-06-28 17:10:41 +00:00
..
2026-06-26 18:43:32 +02:00
2026-05-30 18:08:51 +02:00
2026-06-26 12:24:42 +02:00
2026-05-30 18:08:51 +02:00
2026-06-24 13:44:47 +00:00