{
  "license": "Apache-2.0",
  "copyright": "Copyright 2026 ParetoAlpha, Inc.",
  "licenseUrl": "https://paretoalphasystems.com/developers/LICENSE",
  "about": "Conformance vectors for the ParetoAlpha seal format (/standard). Each entry is an input, the canonical string it must produce, and that string's SHA-256. An implementation in any language conforms if it reproduces every one. Normative implementation: src/lib/proofHash.ts, which computed every published hash. Regenerate with scripts/conformance-check.ts --write; a change here changes what a published seal means, so it is never regenerated to make a test pass.",
  "format": "canonical form: object keys sorted at every depth, no whitespace, undefined and missing become null, non-finite numbers become null, numbers written to 12 significant digits below 1e10 and 15 at or above it, in ECMAScript Number::toString layout, UTF-8 with non-ASCII left as is",
  "count": 24,
  "vectors": [
    {
      "name": "empty object",
      "why": "the shortest possible canonical form",
      "input": {},
      "canonical": "{}",
      "sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a"
    },
    {
      "name": "empty array",
      "why": "an array is not an object; no key sorting applies",
      "input": [],
      "canonical": "[]",
      "sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945"
    },
    {
      "name": "null",
      "why": "null survives as null",
      "input": null,
      "canonical": "null",
      "sha256": "74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b"
    },
    {
      "name": "scalar string",
      "why": "a bare scalar is valid input, not only an object",
      "input": "x",
      "canonical": "\"x\"",
      "sha256": "ba2df4903a2c14e86dc3bcca58911b44ac1d2514b7227bf6eb08cfb978f55a1b"
    },
    {
      "name": "keys sorted, not insertion order",
      "why": "the single rule most implementations get right and most tests never check",
      "input": {
        "b": 1,
        "a": 2,
        "c": 3
      },
      "canonical": "{\"a\":2,\"b\":1,\"c\":3}",
      "sha256": "e145110e712e3ed0a6b233551b27a90aa39b4c93ed67e111ba2002d16e5ed1fa"
    },
    {
      "name": "keys sorted at every depth",
      "why": "sorting must recurse through arrays as well as objects",
      "input": {
        "b": {
          "d": 1,
          "c": 2
        },
        "a": [
          {
            "f": 1,
            "e": 2
          }
        ]
      },
      "canonical": "{\"a\":[{\"e\":2,\"f\":1}],\"b\":{\"c\":2,\"d\":1}}",
      "sha256": "a6dadc7bb302c417c1bfdedbffc1662c1bcffdeac2ff8f1b381a1663564546ed"
    },
    {
      "name": "key order inside arrays is positional",
      "why": "array order is data and is never sorted",
      "input": [
        {
          "b": 1,
          "a": 2
        },
        {
          "a": 2,
          "b": 1
        }
      ],
      "canonical": "[{\"a\":2,\"b\":1},{\"a\":2,\"b\":1}]",
      "sha256": "e7ba22556178909f739950758cdc5c8cb411574bdf1fc0c266e9070e04d011f8"
    },
    {
      "name": "explicit null is kept",
      "why": "indistinguishable from undefined after normalisation, by design",
      "input": {
        "a": null
      },
      "canonical": "{\"a\":null}",
      "sha256": "d091f9c83c091f79652fe8786375b3fe4ce0861a56f5bfbafedbe431877ff0e8"
    },
    {
      "name": "booleans are not numbers",
      "why": "in Python, bool is a subclass of int: a numeric branch tried first would print 1 and 0",
      "input": {
        "t": true,
        "f": false
      },
      "canonical": "{\"f\":false,\"t\":true}",
      "sha256": "c22848c47426fcf4d27e55573c22f1d23546315c251e8e4bc384820ba5fae568"
    },
    {
      "name": "nested empties",
      "why": "containers survive with no members",
      "input": {
        "a": {},
        "b": [],
        "c": [
          []
        ],
        "d": [
          {}
        ]
      },
      "canonical": "{\"a\":{},\"b\":[],\"c\":[[]],\"d\":[{}]}",
      "sha256": "74f3ca412c2e46799f8cde2b488be4ecd09d713c92bcc73396a1ee0086aac2a5"
    },
    {
      "name": "non-finite becomes null",
      "why": "JSON has no NaN or Infinity; the rule is null, not a throw",
      "input": {
        "a": null,
        "b": null,
        "c": null
      },
      "canonical": "{\"a\":null,\"b\":null,\"c\":null}",
      "sha256": "158793201d4592cf88a9964c9e4debcc20681972dacab019e32461e563467a9e"
    },
    {
      "name": "negative zero is zero",
      "why": "-0 and 0 must hash the same or a sign flip changes a seal",
      "input": {
        "a": 0
      },
      "canonical": "{\"a\":0}",
      "sha256": "45b619e97b5d9b029af4522e9ffb02fa99ff2bf226c82ee22a7cc10269a557e8"
    },
    {
      "name": "integers are plain",
      "why": "no decimal point, no exponent",
      "input": {
        "a": 0,
        "b": 1,
        "c": -1,
        "d": 1000000
      },
      "canonical": "{\"a\":0,\"b\":1,\"c\":-1,\"d\":1000000}",
      "sha256": "cef28d8e5490fa530cad45d9e97f89df1639f431a4463b05be5b1243771445e0"
    },
    {
      "name": "twelve significant digits below the boundary",
      "why": "0.1+0.2 is 0.30000000000000004 in a double; twelve digits is what makes float noise invisible",
      "input": {
        "a": 1.000000000005,
        "b": 0.30000000000000004
      },
      "canonical": "{\"a\":1.00000000001,\"b\":0.3}",
      "sha256": "5718e65b56877f0676812c6b911586c0e1aa5ce22e40ce39479784caedae07ea"
    },
    {
      "name": "the boundary is at 1e10 exactly",
      "why": "documented in a comment in proofHash.ts and, until now, nowhere else: twelve digits under 1e10, fifteen at and above it",
      "input": {
        "below": 9999999999.995,
        "at": 10000000000,
        "above": 10000000000.005
      },
      "canonical": "{\"above\":10000000000.005,\"at\":10000000000,\"below\":10000000000}",
      "sha256": "68302c1f6558fe720e90d94659cb3458a8f40d811c2ae54bc05f236bd99bc8bc"
    },
    {
      "name": "fifteen digits resolve cents above the boundary",
      "why": "the 2026-09-20 defect: at twelve digits these two hashed the same, so two books a cent apart were one book",
      "input": {
        "a": 10000000000.01,
        "b": 10000000000.02
      },
      "canonical": "{\"a\":10000000000.01,\"b\":10000000000.02}",
      "sha256": "e24aa45461c5b090ae2c5039c1260a53212d8625aa6a0101ce35e807c727c9d3"
    },
    {
      "name": "large integer",
      "why": "still exact in a double",
      "input": {
        "a": 999999999999999
      },
      "canonical": "{\"a\":999999999999999}",
      "sha256": "49814406e8525db86b6298123b4500e50c5305e54d2b5e0155da22f0a497ee52"
    },
    {
      "name": "exponent form for very small and very large",
      "why": "ECMAScript switches to exponential at 1e21 and below 1e-6; a hand-written formatter usually gets one of the two bounds wrong",
      "input": {
        "tiny": 1e-7,
        "huge": 1e+21
      },
      "canonical": "{\"huge\":1e+21,\"tiny\":1e-7}",
      "sha256": "639a8d704db1736b243473e58b31293d7f59049811083d132effdbb405376e27"
    },
    {
      "name": "unicode string is not escaped",
      "why": "non-ASCII is left as is, so the bytes are UTF-8 and not \\u sequences",
      "input": {
        "a": "café"
      },
      "canonical": "{\"a\":\"café\"}",
      "sha256": "e3c598cda7afb08d1ddede0a770feb8db4312dece093d15449a1856192c34a2f"
    },
    {
      "name": "control characters are escaped",
      "why": "JSON requires \\n and \\t",
      "input": {
        "a": "a\nb\tc"
      },
      "canonical": "{\"a\":\"a\\nb\\tc\"}",
      "sha256": "acb237b1be6b97b955f36f6a832a26eb82ba7467abbdfccfdc35170c12fb3427"
    },
    {
      "name": "quote and backslash",
      "why": "the two characters a naive string writer breaks on",
      "input": {
        "a": "he said \"x\" \\ y"
      },
      "canonical": "{\"a\":\"he said \\\"x\\\" \\\\ y\"}",
      "sha256": "c42393e8febe0119b9b059d3cffc22f0424904efa11e420a544d0835a758a2ea"
    },
    {
      "name": "non-ASCII keys in the BMP",
      "why": "verify.py's own comment conceded it only held for ASCII keys; inside the BMP, code-unit and code-point order agree, so this one always passed",
      "input": {
        "é": 1,
        "z": 2,
        "a": 3
      },
      "canonical": "{\"a\":3,\"z\":2,\"é\":1}",
      "sha256": "fa7ddcf43923b2711f2f592f210e5ab9e4a54a3b2df09830d93f402391a33e4e"
    },
    {
      "name": "ASTRAL keys, where the two orders disagree",
      "why": "THE DEFECT THIS SET FOUND, 2026-10-05: an astral character is a surrogate pair in UTF-16 and its lead surrogate (0xD800-0xDBFF) sorts BELOW a BMP character at U+E000 or above, so JavaScript puts the emoji first and Python's code-point sort put it last. Opposite canonical strings, different hashes, and /standard promises a stranger can check a seal without us",
      "input": {
        "": 1,
        "😀": 2,
        "a": 3
      },
      "canonical": "{\"a\":3,\"😀\":2,\"\":1}",
      "sha256": "66f34abc18d006bb2809cafab76ec68db4a8753c8135b19913d0d406413d9ec5"
    },
    {
      "name": "a proof body's shape",
      "why": "the real thing: a seal body is an object of scalars and small objects",
      "input": {
        "version": 2,
        "build": {
          "digest": "abc123"
        },
        "figures": {
          "distributable": 1315118,
          "undistributed": 0
        },
        "periodEnd": "2021-02-28"
      },
      "canonical": "{\"build\":{\"digest\":\"abc123\"},\"figures\":{\"distributable\":1315118,\"undistributed\":0},\"periodEnd\":\"2021-02-28\",\"version\":2}",
      "sha256": "9b3ee487acae55048acdaeba65e951a4f8f9313f90c81fb06316515c81c07a80"
    }
  ]
}
