open-standards/wai/project-conformance/vectors.json
Transaction Science 0fe1976f50 wai lock, wai check and wai build: an integer tone, a fix for every stale lock, and a lock from wai create
The watch room's sample sound is made in integer arithmetic: each half cycle
by the rational form of Bhaskara I, at most 10 of 6000 from the sine, every
harmonic under -59 dB, peak, pitches and rate as before. Its bytes, and the
digest of the template a lock pins, are the same on every host by
construction. The corpus pins its digest, the second reader makes it by the
same rule, and a test refuses a floating-point value in its path, reading
the source as written whatever line ends a checkout gave it.

Every finding about a lock that is stale, was edited by hand or is not there
carries its fix, run wai lock, with the directory and the --root and
--packer the check was given: in the text under the finding, and as the
finding's fix and the error's hint in the envelope. A lock another wai wrote
says which version wrote it. A later version's lock says upgrade wai.

wai create writes the lock of the project it makes, so a new project passes
wai check and wai build as it is. A project that states nothing for wai to
build gets a dist/ with its build record alone.

wai/catalogue/ops.json is never converted on a checkout either: a lock pins
its digest. project.sh builds wai-pack in a target directory of its own when
CARGO_TARGET_DIR is shared. The tests run on Windows from a checkout with
core.autocrlf=true: they take their Python from $PYTHON, pass plain paths
rather than verbatim ones, and give git check-attr its paths on standard
input; the second reader takes a verbatim path as well.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 17:28:40 -05:00

194 lines
14 KiB
JSON

{
"format": "wai.lock.vectors/1",
"about": "wai.lock's bytes: each accepted case is written back byte for byte and has the SHA-256 stated, and each refused case is refused with the code stated. Each outcome is set from wai/schema/README.md, never copied from a reader.",
"tone": {
"about": "A watch room's sample sound, which `wai create` makes for the watch-together template and a template's digest covers: 8000 samples a second for twenty seconds, 16-bit mono, 220 Hz rising 20 Hz a second for twelve seconds then again, each sample by the integer rule of project_verify.py's tone_sample.",
"sha256": "5aebe8686c46e1a7c4e823bc1f1cc44cf02b64ca720a9b056ec2ca9d2c654b8f"
},
"cases": [
{
"name": "minimal",
"about": "What every lock holds: its schema and version, the toolchain and the registry.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"sha256": "59c2ca910d249ab15f8a3be615fb6c6adf771a2f2571fd11acf4f880ead10327"
},
{
"name": "every-member",
"about": "Every member of version 1, each as `wai lock` writes it.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"conformance\":{\"packager/policy\":{\"digest\":\"sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"verifier/claim\":{\"digest\":\"sha256:fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"}},\"policy\":{\"blake3\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\"schema\":\"wai.pack.policy/1\"},\"priors\":{\"int_hyper/q4\":{\"form\":\"wai.prior.set\",\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"tokenizer\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"}},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"template\":{\"name\":\"video-room\",\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"sha256": "09b5a6166c2f8fb41841ee0a8498e5ef9ac50f014f32cf90c38d9a2022d7cd76"
},
{
"name": "template-not-held",
"about": "A template the writing wai did not hold: its name, and no digest.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"template\":{\"name\":\"from-another-release\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"sha256": "6855eb1b8818bf4ead3fb2ac1a4256208e31a4444958b42078793350f67bc6e4"
},
{
"name": "member-order-by-utf-16",
"about": "Two names whose order by UTF-16 code units (RFC 8785) is not their order by code points.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"priors\":{\"😀\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"}},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"sha256": "811af73d5f5f2af3bf236a535e6ef5b36f01c83aec1135236462d05c6704b4b1"
},
{
"name": "escapes",
"about": "A name holding what RFC 8785 escapes, and what it does not.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"priors\":{\"a\\\"b\\\\c\\nd\\u0001e/é\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"}},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"sha256": "41f84c6160b37f9947c278f59358268091dee8865d63fc2cb268a8ed85dd4e6a"
},
{
"name": "trailing-line-feed",
"about": "A line feed after the object: what an editor adds.",
"about_bytes": true,
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}\n",
"refused": "lock-not-canonical"
},
{
"name": "trailing-crlf",
"about": "A carriage return and a line feed after the object.",
"about_bytes": true,
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}\r\n",
"refused": "lock-not-canonical"
},
{
"name": "pretty-printed",
"about": "The same members, indented.",
"about_bytes": true,
"bytes": "{\n \"$schema\": \"https://wai.transaction.science/schema/wai.lock/1\",\n \"wai\": 1,\n \"toolchain\": {\n \"version\": \"0.5.0\",\n \"catalogue\": {\n \"sha256\": \"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"\n }\n },\n \"registry\": {\n \"sha256\": \"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"\n }\n}",
"refused": "lock-not-canonical"
},
{
"name": "members-out-of-order",
"about": "The same members in another order.",
"about_bytes": true,
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"wai\":1,\"toolchain\":{\"version\":\"0.5.0\",\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"}},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"}}",
"refused": "lock-not-canonical"
},
{
"name": "space-after-colon",
"about": "One space after a colon.",
"about_bytes": true,
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\": 1}",
"refused": "lock-not-canonical"
},
{
"name": "unicode-escape",
"about": "A letter written as an escape, the same value.",
"about_bytes": true,
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"w\\u0061i\":1}",
"refused": "lock-not-canonical"
},
{
"name": "version-with-a-fraction",
"about": "The version written 1.0: one number, and not the canonical form.",
"about_bytes": true,
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1.0}",
"refused": "lock-not-canonical"
},
{
"name": "repeated-member",
"about": "A member named twice: two readers would read it two ways.",
"about_bytes": true,
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1,\"wai\":1}",
"refused": "lock-repeated-member"
},
{
"name": "not-json",
"about": "Text that is not JSON.",
"about_bytes": true,
"bytes": "wai.lock",
"refused": "lock-not-json"
},
{
"name": "not-an-object",
"about": "A JSON value that is not an object.",
"about_bytes": true,
"bytes": "[]",
"refused": "lock-not-json"
},
{
"name": "later-version",
"about": "A later version, by its `wai`, with a member version 1 does not know: refused as that version.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"decoders\":{},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":2}",
"refused": "lock-version"
},
{
"name": "later-version-by-schema",
"about": "A later version, by its `$schema`.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/2\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-version"
},
{
"name": "unknown-member",
"about": "A member this version does not read: `decoders`, which nothing resolves yet.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"decoders\":{\"a\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"}},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-unknown-member"
},
{
"name": "unknown-member-nested",
"about": "A member of a member that this version does not read.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\",\"version\":\"1\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-unknown-member"
},
{
"name": "null-member",
"about": "A member with nothing to pin is absent, never null.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"template\":null,\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "empty-priors",
"about": "A member with nothing to pin is absent, never empty.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"priors\":{},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "short-digest",
"about": "A digest that is not 64 hexadecimal digits.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"abc\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "uppercase-digest",
"about": "A digest in capitals.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "corpus-digest-without-prefix",
"about": "A corpus digest without its `sha256:`.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"conformance\":{\"verifier/claim\":{\"digest\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"}},\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "no-toolchain",
"about": "No toolchain.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "no-registry",
"about": "No registry.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "no-schema",
"about": "No `$schema`.",
"bytes": "{\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
},
{
"name": "no-version",
"about": "No `wai`.",
"bytes": "{\"$schema\":\"https://wai.transaction.science/schema/wai.lock/1\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"}}",
"refused": "lock-member-invalid"
},
{
"name": "another-schema",
"about": "Another schema.",
"bytes": "{\"$schema\":\"https://example.org/wai.lock\",\"registry\":{\"sha256\":\"fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210\"},\"toolchain\":{\"catalogue\":{\"sha256\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"},\"version\":\"0.5.0\"},\"wai\":1}",
"refused": "lock-member-invalid"
}
]
}