mirror of
https://github.com/zap-proto/zip.git
synced 2026-10-19 15:38:57 +00:00
The wire is stated in three places that have to agree: the option set, the constant's value, and the comment explaining it. The existing cases fail the moment the options move — and would pass happily while the name went on claiming semantics the encoder no longer has, which is the one an operator reads in a startup line. So the name is now asserted against the bytes: it may say "sorted keys" exactly when a map comes out sorted, and "v1 semantics" exactly when a zero under omitempty is left out. It fails in both directions — options moved, or name moved — and says which disagreed. Co-authored-by: Hanzo Dev <[email protected]>