Send a frame across the pipe as a PNG, not as six mebibytes of base64 #16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "claude/png-over-the-pipe"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The review's C4. A frame crossed the pipe as 6.4 MiB of base64 RGBA inside the record's JSON, through a 64 KiB pipe buffer, and the gate encoded the PNG afterwards.
What changes. The collector encodes the PNG with the gate's settings and sends it as the next frame on the pipe after the record, which states how many bytes follow. The gate reads exactly those bytes, drops the connection on a mismatch rather than storing a record with someone else's pixels, decodes to RGBA, and redacts as before. A window of text is a few hundred kilobytes. The backlog budget is unchanged in bytes and now holds a hundred frames where it held five.
Proof. A synthetic full-size window of text crosses in well under a mebibyte; a frame record is followed by its pixels and then answered; what the collector encodes the gate decodes to the same pixels, and a wrong size, a truncated file or a non-PNG is refused, which fails against a decoder that skips the size check. Linux verifier green on the pinned toolchain; the Windows crates cross-check clean. Not run here: the macOS body, the Windows body, and the end-to-end suite.