mirror of
https://github.com/block/buzz.git
synced 2026-10-30 05:51:46 +00:00
The permission-request sentinel bounded string fields inconsistently: the harness truncated labels by Rust char scalars and left sessionId, turnId, nonce, and total content unbounded, while the desktop parser bounded sessionId/turnId/labels by JavaScript UTF-16 code units. An oversized adapter-supplied sessionId (or a 200-code-point multibyte label) produced a card the harness published but the parser rejected, rendering as raw JSON until timeout. Freeze one limit set in UTF-8 bytes on both sides: every string leaf at 200 bytes and total serialized content at 4096 bytes. Labels truncate on a char boundary; every other field fails closed (synchronous deny, zero card events). Couple the cross-language contract test to a single checked-in fixture the Rust builder asserts byte-equal and the desktop boundary test parses, so a producer-side wire change breaks the test. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>