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]>
481 lines
12 KiB
JSON
481 lines
12 KiB
JSON
{
|
|
"about": "SPEC.md \u00a73.1: the reason a conforming verifier reports for each pin, capability and set of held artifacts. Paths are relative to this directory; a listing's files are read below its root. readable defaults to [\"wai.prior.set\"].",
|
|
"cases": [
|
|
{
|
|
"name": "one_file_legacy",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
},
|
|
{
|
|
"name": "uppercase_digest",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7EF44F3B1FC4A2DF6C3E3B68460F595CAE3D31CB7F9018699E29E738340272A4",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "pin_malformed"
|
|
},
|
|
{
|
|
"name": "digest_63_digits",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "pin_malformed"
|
|
},
|
|
{
|
|
"name": "malformed_before_unreadable_form",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7EF44F3B1FC4A2DF6C3E3B68460F595CAE3D31CB7F9018699E29E738340272A4",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.nnc"
|
|
},
|
|
"held": [],
|
|
"expect": "pin_malformed"
|
|
},
|
|
{
|
|
"name": "form_unregistered",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.nope"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "form_not_registered"
|
|
},
|
|
{
|
|
"name": "form_is_a_payload_codec",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.image.png"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "form_not_registered"
|
|
},
|
|
{
|
|
"name": "form_unreadable_nnc",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.nnc"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "form_unreadable"
|
|
},
|
|
{
|
|
"name": "form_required_several_files",
|
|
"capability": "wai.neural.bmshj2018",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "form_required"
|
|
},
|
|
{
|
|
"name": "form_required_directory_capability",
|
|
"capability": "wai.image.jpegai",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "form_required"
|
|
},
|
|
{
|
|
"name": "unregistered_capability_pin_is_verified",
|
|
"capability": "wai.neural.future",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "form_required"
|
|
},
|
|
{
|
|
"name": "tampered_file_not_held",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "29bc4a3984b2ca82ab4656e459e7c34b5af9f507309bcf88ed7b00561692ff0a",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "sets/tiny-tampered/model.wmb"
|
|
}
|
|
],
|
|
"expect": "prior_not_held"
|
|
},
|
|
{
|
|
"name": "id_matches_digest_differs",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "402709318223af457631c917c5a1081cb8e380e1dde47c6aebd8f264e077f090",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "prior_not_held"
|
|
},
|
|
{
|
|
"name": "digest_superseded",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "402709318223af457631c917c5a1081cb8e380e1dde47c6aebd8f264e077f090",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"supersedes": {
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4"
|
|
}
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "digest_superseded"
|
|
},
|
|
{
|
|
"name": "supersedes_malformed_is_ignored",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"supersedes": {
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4"
|
|
}
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
},
|
|
{
|
|
"name": "supersedes_bad_form_never_superseded",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "402709318223af457631c917c5a1081cb8e380e1dde47c6aebd8f264e077f090",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"supersedes": {
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"form": "wai.image.png"
|
|
}
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "prior_not_held"
|
|
},
|
|
{
|
|
"name": "successor_never_satisfies_predecessor",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "sets/tiny/model.wmb"
|
|
}
|
|
],
|
|
"expect": "prior_not_held"
|
|
},
|
|
{
|
|
"name": "set_ok",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "85a05b0dac15566c5a657ddeee253eaa9f54ce852ae04924f5b04151901d9d1b",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set",
|
|
"tier": "decode-equivalence"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "../wai-rs/tests/vectors/int_mlicpp/model.sha256",
|
|
"root": "../wai-rs/tests/vectors/int_mlicpp"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
},
|
|
{
|
|
"name": "set_ok_several_files",
|
|
"capability": "wai.neural.elic",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "88d72629c0c1d5adef7587afa6926405eefd0b7aaabf608483d8551d2536790f",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "listings/demo.sha256",
|
|
"root": "sets/demo"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
},
|
|
{
|
|
"name": "set_pin_is_not_a_file_pin",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "85a05b0dac15566c5a657ddeee253eaa9f54ce852ae04924f5b04151901d9d1b",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "prior_not_held"
|
|
},
|
|
{
|
|
"name": "file_pin_is_not_a_set_pin",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "../wai-rs/tests/vectors/int_mlicpp/model.sha256",
|
|
"root": "../wai-rs/tests/vectors/int_mlicpp"
|
|
}
|
|
],
|
|
"expect": "prior_not_held"
|
|
},
|
|
{
|
|
"name": "set_malformed_crlf",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7703c3e01c81277fa56da7220805d3e96ea5858f1f87b1f372136c3ce112351c",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "listings/bad/crlf.sha256",
|
|
"root": "sets/tiny"
|
|
}
|
|
],
|
|
"expect": "set_malformed"
|
|
},
|
|
{
|
|
"name": "part_mismatch",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "ac5a74765058dac5b44f90185af19852e70ce2922fcac2ace28590b633a9c376",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "listings/tiny.sha256",
|
|
"root": "sets/tiny-tampered"
|
|
}
|
|
],
|
|
"expect": "part_mismatch"
|
|
},
|
|
{
|
|
"name": "part_missing",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "ac5a74765058dac5b44f90185af19852e70ce2922fcac2ace28590b633a9c376",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "listings/tiny.sha256",
|
|
"root": "sets/demo"
|
|
}
|
|
],
|
|
"expect": "part_mismatch"
|
|
},
|
|
{
|
|
"name": "two_roots_one_intact",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "ac5a74765058dac5b44f90185af19852e70ce2922fcac2ace28590b633a9c376",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "listings/tiny.sha256",
|
|
"root": "sets/tiny-tampered"
|
|
},
|
|
{
|
|
"listing": "listings/tiny.sha256",
|
|
"root": "sets/tiny"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
},
|
|
{
|
|
"name": "flipped_listing_not_held",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "ac5a74765058dac5b44f90185af19852e70ce2922fcac2ace28590b633a9c376",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set"
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "listings/bad/uppercase_hex.sha256",
|
|
"root": "sets/tiny"
|
|
}
|
|
],
|
|
"expect": "prior_not_held"
|
|
},
|
|
{
|
|
"name": "set_superseded",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "402709318223af457631c917c5a1081cb8e380e1dde47c6aebd8f264e077f090",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": "wai.prior.set",
|
|
"supersedes": {
|
|
"sha256": "ac5a74765058dac5b44f90185af19852e70ce2922fcac2ace28590b633a9c376",
|
|
"form": "wai.prior.set"
|
|
}
|
|
},
|
|
"held": [
|
|
{
|
|
"listing": "listings/tiny.sha256",
|
|
"root": "sets/tiny"
|
|
}
|
|
],
|
|
"expect": "digest_superseded"
|
|
},
|
|
{
|
|
"name": "int_synth_one_file",
|
|
"capability": "wai.neural.int_synth",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "1c4705d17c01f865b20d785191c7f63b5c18dcc8fce77e15852cf8240b7368be",
|
|
"determinism": "int-rans/p16+int/i64"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../neural-conformance/vectors/gradient/int_synth.json"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
},
|
|
{
|
|
"name": "null_member_equals_absent",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"form": null,
|
|
"tier": null,
|
|
"supersedes": null
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
},
|
|
{
|
|
"name": "tier_unregistered_still_verifies",
|
|
"capability": "wai.neural.int_mlicpp",
|
|
"pin": {
|
|
"id": "conformance",
|
|
"sha256": "7ef44f3b1fc4a2df6c3e3b68460f595cae3d31cb7f9018699e29e738340272a4",
|
|
"determinism": "int-rans/p16+int/i64",
|
|
"tier": "decode_equivalence"
|
|
},
|
|
"held": [
|
|
{
|
|
"file": "../wai-rs/tests/vectors/int_mlicpp/model.wmb"
|
|
}
|
|
],
|
|
"expect": "ok"
|
|
}
|
|
]
|
|
}
|