Building a MAP v1.1 implementation? Work through this list. Every item maps to a normative spec requirement. If you check all the boxes and pass all 95 vectors, congratulations– you have a conforming implementation. If you check all the boxes and dont pass all 95 vectors, one of us has a bug. Lets find it.
MAP1\x00 (ASCII “MAP1” + NUL terminator)ERR_CANON_HDR)0x01, followed by 4-byte big-endian length, then UTF-8 bytes0x02, followed by 4-byte big-endian length, then raw bytes0x03, followed by 4-byte big-endian count, then count encoded values0x04, followed by 4-byte big-endian count, then count key-value pairs (key is always STRING-encoded, value is any type)0x05, followed by a single byte: 0x01 for true, 0x00 for false0x06, followed by 8 bytes: signed 64-bit big-endian0x01 + 0x00000000\x00) in strings are legal and preservedERR_UTF8)0x020x05 + exactly one byte payloadtrue -> payload 0x01false -> payload 0x000x00 or 0x01 -> ERR_CANON_MCFtrue ≠ "true", false ≠ "false"isinstance(x, bool) before isinstance(x, int) (bool is a subclass of int in Python. Yes, really. PEP 285. Look it up.)0x06 + exactly 8 bytes: signed big-endian0x06 followed by 8 zero bytesERR_TYPEJSON.parse silently loses precision above 2^53. Handle with care. (This one will absolutely bite you if you dont test for it.)This is the single most critical fork surface in the protocol. Get this wrong and everything else is pointless.
memcmp semantics)(b & 0xFF) in comparatorsERR_DUP_KEYERR_TYPEERR_TYPE1.0 -> ERR_TYPE (yes, even though its mathematically an integer. Token-level check.)ERR_SCHEMA (even after whitespace)ERR_DUP_KEYERR_UTF8ERR_CANON_MCF){"action":"deploy","target":"prod"} produces map1:bd70ec1e184b4d5a3c44507584cbaf8a937300df8e13e68f2b22faf67347246f in your implementationIf that last MID doesnt match, stop. Something is wrong. Don’t ship it.
(If it starts with map1:42, you have found the Answer. Please open a Discussion.)