Files
api/zap
zeekayandHanzo Dev dc7d3dbe61 zap: one message type for validators.State, and a guard on the flag bits
Message types must stay under 0x40 because MsgErrorFlag IS 0x40: a type with bit
6 set arrives indistinguishable from an error response, so every reply to it
decodes as a remote error whose text is the raw response bytes. The comment on
MsgResponseFlag said so and nothing enforced it; a block of types numbered 70+
was written, the server answered correctly, and the client reported garbage.

validators.State has eight methods and no eight-wide run remains below the limit,
so a type per method could not be spelled correctly even once. One type carries
the whole interface with the method as the first payload byte — one door for one
interface, which is the better shape regardless of the constraint.

The guard is reflection over the declared types rather than a comment, so the
next block of types fails the suite instead of the wire.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-20 18:24:33 -07:00
..