open-standards/wai/pin-conformance/selection.json
Transaction Science 22928147f3 wai: the parameter-set pin, component identity, pin-aware selection
SPEC §3.1 defines the pin a manifest carries (conditioning.prior, and a
WAI2 rendition's prior): id, sha256, determinism, and the optional form,
tier and supersedes. The digest covers the whole parameter set. A set of
several files is pinned through its listing, the new registered prior
form wai.prior.set. A sink verifies the pin before it decodes, reports a
refusal with one of an ordered set of snake_case reasons, and decodes
only from the set it verified. Tier is a closed vocabulary; supersedes is
informative.

A pin that does not resolve makes its capability unsupported for that
envelope: SPEC §4 dispatch continues at the fallback, §7.1 selection at
the next rendition, and an inert envelope's error names the reasons. A
rendition entry may carry id, sha256 and, on a companion,
companion_of_id. SPEC §7 gains a Digests subsection, and §8 says how a
MINOR revision adds an optional member.

In wai-rs: the manifest types are #[non_exhaustive] with builders; a new
pin module verifies pins in memory and on disk; Wai::dispatch_verified,
WaiMulti::pick and primary check pins and component digests; every
neural decoder reads through ParamSource; a codec-free `ffi` feature
carries the C envelope surface with wai_envelope_select and
wai_neural_decode_ex. wai-web wraps wai::container. New vectors: the
int_mlicpp set-form twin and the pin-conformance corpus with an
independent Python verifier, plus sha256.json sidecars for the vectors
of capabilities that decode against a parameter set.

Squashed from wai/stream-a-parameter-set-identity onto link 12. Conflicts
are resolved to keep both sides; the integration commits that follow
make the two streams agree.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 05:51:50 -04:00

531 lines
11 KiB
JSON

{
"about": "SPEC.md \u00a77.1: the rendition a sink picks, the reason it reports for each entry it skips, and the companions it applies with the pick (companions_of_index). held lists the one-file parameter sets the sink holds; advertised is \"all\" or a list of capabilities. roles is the first check_component_roles finding (\"ok\" when the envelope conforms).",
"cases": [
{
"name": "holds_predecessor",
"manifest": {
"wai": "1.1",
"media": "image",
"intent": "replicate",
"renditions": [
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "c4232f2e2d5f76cce4ac782b254a91410a2ab89b22792f8356585549938a0e92",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence",
"supersedes": {
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a"
}
}
},
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence"
}
},
{
"capability": "wai.image.avif",
"kind": "avif"
}
],
"target": null
},
"payloads": [
"B-CODED",
"A-CODED",
"AVIF"
],
"advertised": "all",
"held": [
"sets/tiny/model.wmb"
],
"expect": {
"picked": 1,
"skipped": [
[
0,
"digest_superseded"
]
]
}
},
{
"name": "holds_successor",
"manifest": {
"wai": "1.1",
"media": "image",
"intent": "replicate",
"renditions": [
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "c4232f2e2d5f76cce4ac782b254a91410a2ab89b22792f8356585549938a0e92",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence",
"supersedes": {
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a"
}
}
},
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence"
}
},
{
"capability": "wai.image.avif",
"kind": "avif"
}
],
"target": null
},
"payloads": [
"B-CODED",
"A-CODED",
"AVIF"
],
"advertised": "all",
"held": [
"sets/tiny-tampered/model.wmb"
],
"expect": {
"picked": 0,
"skipped": []
}
},
{
"name": "holds_neither",
"manifest": {
"wai": "1.1",
"media": "image",
"intent": "replicate",
"renditions": [
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "c4232f2e2d5f76cce4ac782b254a91410a2ab89b22792f8356585549938a0e92",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence",
"supersedes": {
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a"
}
}
},
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence"
}
},
{
"capability": "wai.image.avif",
"kind": "avif"
}
],
"target": null
},
"payloads": [
"B-CODED",
"A-CODED",
"AVIF"
],
"advertised": "all",
"held": [],
"expect": {
"picked": 2,
"skipped": [
[
0,
"prior_not_held"
],
[
1,
"prior_not_held"
]
]
}
},
{
"name": "inert",
"manifest": {
"wai": "1.1",
"media": "image",
"intent": "replicate",
"renditions": [
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "c4232f2e2d5f76cce4ac782b254a91410a2ab89b22792f8356585549938a0e92",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence",
"supersedes": {
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a"
}
}
},
{
"capability": "wai.neural.int_mlicpp",
"kind": "int_mlicpp",
"prior": {
"id": "conformance",
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a",
"determinism": "int-rans/p16+int/i64",
"tier": "decode-equivalence"
}
},
{
"capability": "wai.image.avif",
"kind": "avif"
}
],
"target": null
},
"payloads": [
"B-CODED",
"A-CODED",
"AVIF"
],
"advertised": [
"wai.neural.int_mlicpp"
],
"held": [],
"expect": {
"inert": [
[
0,
"prior_not_held"
],
[
1,
"prior_not_held"
],
[
2,
"missing_capability"
]
]
}
},
{
"name": "component_digest_ok",
"manifest": {
"wai": "1.1",
"media": "image",
"intent": "replicate",
"renditions": [
{
"capability": "wai.image.png",
"kind": "png",
"sha256": "e793c41f42c3766932d69864deeea3b3949a26e1e427bdf261a77755021e58cb"
},
{
"capability": "wai.image.png",
"kind": "png",
"sha256": "700983acb1832a2b0830405407bcaefaf0909c8631c1603cc5a72ecc4257e4d2"
},
{
"capability": "wai.meta.hdr10plus",
"kind": "descriptor",
"role": "companion",
"companion_of": "wai.image.png",
"sha256": "2d1edf729cc53756834657ce399b1568debd59b0ceddce5da39b86750d59fbd0"
}
],
"target": null
},
"payloads": [
"PNG-A",
"PNG-B",
"META"
],
"advertised": "all",
"held": [],
"expect": {
"picked": 0,
"skipped": [],
"companions": [
2
]
}
},
{
"name": "component_digest_mismatch",
"manifest": {
"wai": "1.1",
"media": "image",
"intent": "replicate",
"renditions": [
{
"capability": "wai.image.png",
"kind": "png",
"sha256": "e793c41f42c3766932d69864deeea3b3949a26e1e427bdf261a77755021e58cb"
},
{
"capability": "wai.image.png",
"kind": "png",
"sha256": "700983acb1832a2b0830405407bcaefaf0909c8631c1603cc5a72ecc4257e4d2"
},
{
"capability": "wai.meta.hdr10plus",
"kind": "descriptor",
"role": "companion",
"companion_of": "wai.image.png",
"sha256": "2d1edf729cc53756834657ce399b1568debd59b0ceddce5da39b86750d59fbd0"
}
],
"target": null
},
"payloads": [
"PNG-a",
"PNG-B",
"META"
],
"advertised": "all",
"held": [],
"expect": {
"picked": 1,
"skipped": [
[
0,
"component_digest_mismatch"
]
],
"companions": [
2
]
}
},
{
"name": "companion_digest_mismatch_not_applied",
"manifest": {
"wai": "1.1",
"media": "image",
"intent": "replicate",
"renditions": [
{
"capability": "wai.image.png",
"kind": "png",
"sha256": "e793c41f42c3766932d69864deeea3b3949a26e1e427bdf261a77755021e58cb"
},
{
"capability": "wai.image.png",
"kind": "png",
"sha256": "700983acb1832a2b0830405407bcaefaf0909c8631c1603cc5a72ecc4257e4d2"
},
{
"capability": "wai.meta.hdr10plus",
"kind": "descriptor",
"role": "companion",
"companion_of": "wai.image.png",
"sha256": "2d1edf729cc53756834657ce399b1568debd59b0ceddce5da39b86750d59fbd0"
}
],
"target": null
},
"payloads": [
"PNG-A",
"PNG-B",
"METa"
],
"advertised": "all",
"held": [],
"expect": {
"picked": 0,
"skipped": [],
"companions": []
}
},
{
"name": "companion_of_id_binds_one_rendition",
"manifest": {
"wai": "1.1",
"media": "video",
"intent": "replicate",
"renditions": [
{
"capability": "wai.video.hevc",
"kind": "hevc",
"id": "a"
},
{
"capability": "wai.video.hevc",
"kind": "hevc",
"id": "b"
},
{
"capability": "wai.video.lcevc",
"kind": "descriptor",
"role": "companion",
"companion_of": "wai.video.hevc",
"companion_of_id": "b"
}
],
"target": null
},
"payloads": [
"HEVC-A",
"HEVC-B",
"ENH"
],
"advertised": [
"wai.video.hevc"
],
"held": [],
"expect": {
"picked": 0,
"skipped": [],
"companions": [],
"roles": "ok"
}
},
{
"name": "companion_of_id_applies_to_the_picked_rendition",
"manifest": {
"wai": "1.1",
"media": "video",
"intent": "replicate",
"renditions": [
{
"capability": "wai.video.hevc",
"kind": "hevc",
"id": "a",
"sha256": "4e452595c3c6ccc249140f0ffe2b163b6c57203f0c7cfdcf0e4316e47fb55df7"
},
{
"capability": "wai.video.hevc",
"kind": "hevc",
"id": "b"
},
{
"capability": "wai.video.lcevc",
"kind": "descriptor",
"role": "companion",
"companion_of": "wai.video.hevc",
"companion_of_id": "b"
}
],
"target": null
},
"payloads": [
"HEVC-a",
"HEVC-B",
"ENH"
],
"advertised": "all",
"held": [],
"expect": {
"picked": 1,
"skipped": [
[
0,
"component_digest_mismatch"
]
],
"companions": [
2
],
"roles": "ok"
}
},
{
"name": "enhancement_base_ambiguous_without_id",
"manifest": {
"wai": "1.1",
"media": "video",
"intent": "replicate",
"renditions": [
{
"capability": "wai.video.hevc",
"kind": "hevc",
"id": "a"
},
{
"capability": "wai.video.hevc",
"kind": "hevc",
"id": "b"
},
{
"capability": "wai.video.lcevc",
"kind": "descriptor",
"role": "companion",
"companion_of": "wai.video.hevc"
}
],
"target": null
},
"payloads": [
"HEVC-A",
"HEVC-B",
"ENH"
],
"advertised": "all",
"held": [],
"expect": {
"picked": 0,
"skipped": [],
"companions": [
2
],
"roles": "EnhancementBaseNotUnique"
}
},
{
"name": "companion_only_never_presented",
"manifest": {
"wai": "1.1",
"media": "video",
"intent": "replicate",
"renditions": [
{
"capability": "wai.video.lcevc",
"kind": "lcevc"
},
{
"capability": "wai.video.hevc",
"kind": "hevc"
}
],
"target": null
},
"payloads": [
"ENH",
"HEVC"
],
"advertised": "all",
"held": [],
"expect": {
"picked": 1,
"skipped": [
[
0,
"not_selectable"
]
],
"roles": "CompanionOnlyAsRendition"
}
}
]
}