pmacs/pmacs-protocol/src
Levi Neuwirth 9b364adc26 fix(panel): review round 1 — buffer_id, the transport ratchet, shared bounds
P1 — `PanelPointer` was missing the approved `buffer_id`. Q#BP16 gives it
and `panel_epoch` different jobs and neither subsumes the other:
`buffer_id` catches an A->B buffer replacement, `panel_epoch` catches
close/hide/reopen of the SAME persistent buffer, which a buffer id alone
cannot see. Added in the framing's field order, with a pin asserting each
field independently reaches the wire.

P1 — added parent criterion 39's transport-safety ratchet. It builds the
maximum legal panel payload, asserts the fixture actually spends the whole
aggregate glyph budget (otherwise the ratchet measures something smaller
than the worst case), asserts one byte more is rejected, and pins the
encoded `InstanceMessage::PanelFrame` below `MAX_FRAME_BYTES`. Shaped
`1 x MAX_PANEL_VISIBLE_CELLS` deliberately: no per-axis cap makes that a
legal panel geometry a terminal cannot express, so it is the worst case
the terminal's own ratchet never measured. Bitten by tripling the glyph
budget — 30,342,696 bytes against the 16 MiB cap.

P2 — the shared bounds were duplicated literals. `MAX_TERMINAL_GRAPHEME_BYTES`
now aliases `MAX_WIRE_GRID_GRAPHEME_BYTES`, so the terminal screen's
truncation (`src/terminal/screen.rs:697`, `:777`) and the validator cannot
drift. Two more had the same defect and are aliased too:
`MAX_TERMINAL_VISIBLE_CELLS` and `MAX_TERMINAL_FRAME_GLYPH_BYTES`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RuhVYUPHXMHG8r2z4tsDPR
2026-07-26 17:31:04 -04:00
..
cell.rs protocol v6: per-severity diagnostic underline colors (SGR 58) 2026-06-10 19:16:42 -04:00
crdt.rs session 1 commit 3/4: CrdtOp moved to pmacs-protocol 2026-05-20 09:32:09 -04:00
ids.rs session 1 commit 1/4: workspace + identity types moved to pmacs-protocol 2026-05-20 09:11:33 -04:00
lib.rs feat(panel): bottom-panel Stage 2B — the v21 protocol layer 2026-07-26 16:52:54 -04:00
message.rs fix(panel): review round 1 — buffer_id, the transport ratchet, shared bounds 2026-07-26 17:31:04 -04:00
panel.rs fix(panel): review round 1 — buffer_id, the transport ratchet, shared bounds 2026-07-26 17:31:04 -04:00
terminal.rs fix(panel): review round 1 — buffer_id, the transport ratchet, shared bounds 2026-07-26 17:31:04 -04:00
transport.rs session M-1 — Pointer wire + daemon byte-space mouse semantics 2026-06-10 13:10:17 -04:00
wire_grid.rs fix(panel): review round 1 — buffer_id, the transport ratchet, shared bounds 2026-07-26 17:31:04 -04:00