%unimsg 0 profile/v0 -- The v0 conformance profile, expressed in unimsg rather than in prose. -- -- Restrictions used to live as English in docs/12, which meant the only way -- to enforce one was to hardcode a check. As a document a profile is -- content-addressed, versionable, composable, and checkable by generic code. profile @unimsg/v0 { doc "Conformance profile for unimsg v0." -- D10/F6: native float equality diverges from byte equality. -0.0 and 0.0 -- are byte-distinct but compare equal; NaN and NaN are byte-identical but -- compare unequal. Banning float keys removes the divergence class rather -- than asking every implementer to handle it. -- -- Bytes joined float on the same argument, having been allowed here for -- longer than anything implemented it. A byte-string key is unhashable in -- some hosts and indistinguishable from a text key in others, which is the -- same divergence wearing different clothes. Nothing in the repository ever -- wrote one; six implementations refused them in six different ways, and -- the profile said they were fine. keys { allow [ :text, :int ] reject [ :float, :bytes ] reason "F6 — native float equality diverges from byte equality, and a bytes key diverges from a text key the same way" } -- Encoding-level rules. These cannot be checked from a decoded value; the -- validator needs the bytes. encoding { determinism :required duplicate-keys :reject } limits { doc "WHAT max-depth COUNTS, settled 2026-09-02: containers of the value model. The document body is depth 0 and each map or sequence entered adds one, so a table row's cells are two below the table's parent — the sequence, then the row's map. Tags, annotations, qualifiers, decimals, references and extensions add nothing, because they are how a scalar is written and not what an author nests. This is the count `umsg profile` applies. A decoder's stack-safety cap is a different number, measured on the encoding, where a decimal is a tag around a two-element array; it must sit comfortably above this one, and the implementer's guide says how far." max-depth 500 } }