wai: the parameter-set pin, component identity, pin-aware selection #132

Merged
dcharlot merged 13 commits from wai/land-13-parameter-set-identity into main 2026-10-01 14:50:19 -04:00

2026-10-01

Transaction Science
wai/neural: the strict-gate test holds a record, which the old gate refused
Some checks failed
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 12s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 23s
standards workspaces build + test / aac-rs (pull_request) Successful in 1m0s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 45s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 48s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 43s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 1m21s
wai formal verification (integer core) / kani (pull_request) Successful in 3m53s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 1m0s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Successful in 1m8s
standards workspaces build + test / map-rs (pull_request) Successful in 5m8s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 38s
standards workspaces build + test / mesh-rs (pull_request) Successful in 3m43s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 3m46s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 1m30s
standards workspaces build + test / openpay (pull_request) Successful in 23m17s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 2m19s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 9m48s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 2m12s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 5m3s
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Has been cancelled
standards workspaces build + test / arl-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Has been cancelled
The test added in e0d16bc1 held only a candidate, wai.tensor.nnc. That
candidate's replicate class does not refuse `replicate`, so the old gate
gave the same reason, and the test passed with the dispatchable filter
removed. It now holds a record, wai.video.manifest, too. A record has no
replicate class, so the old gate refused the envelope as naming an
unknown capability. With the filter it gets step 6's missing model, as
from an empty registry and from the non-strict path. Locally, with the
filter removed, the test fails on the record, and with it, it passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 08:55:54 -04:00
Transaction Science
wai/tests: serialize sha256.json sidecar writes and document their regeneration
Several tests of one binary write entries of the same sidecar (three of
them write tests/vectors/int_video/sha256.json), each by reading the file,
inserting its entry and writing it back. Under parallel test threads two
writes could interleave and drop an entry. Each write now holds a
process-wide lock. The support module documents the command that
regenerates the sidecars under tests/vectors/ and neural-conformance/.
Regenerated with that command locally, every sidecar came out byte for
byte as committed, and the same tests then passed in check mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 08:53:26 -04:00
Transaction Science
wai: correct public text the parameter-set link left stale or overstated
- CHANGELOG, registry subsection: is_dispatchable is named as the
  predicate of every dispatch and selection function, with
  Wai::dispatch_verified (formerly dispatch_capability), instead of a
  function this release removes. The pin subsection records the strict
  gate's dispatchable filter and the refusal of a pinned ONNX model whose
  tensors live in another file.
- SPEC §3.1: a file a model names for part of its own data is a file the
  decode needs; one the decode cannot take from the verified set is
  refused with set_incomplete.
- SPEC §7.1: staged layers, byte-range and referenced renditions and
  per-rendition tracks are stated as a rule for a later mechanism, not as
  mechanisms that exist.
- SPEC §8: the parse failure of a mistyped defined member is stated as its
  own bullet, the one exception to the 1.x freeze, and says that the
  envelope's wai value does not signal it. §3.1 and the CHANGELOG point
  to it.
- wai-web dispatch_capability and the ffi_neural comment in lib.rs say
  what the code now does: only dispatchable capabilities are taken, and
  the neural C ABI builds with neural and ffi, without a codec library.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 08:53:26 -04:00
Transaction Science
wai/neural: the strict gate reads only dispatchable capabilities; a pinned model keeps no tensor outside the verified bytes
decode_envelope_strict chose the capabilities its early replicate refusal
reads by what the sink's registry holds alone. A candidate, companion-only
capability, record or derivation held at the sink could then decide that
refusal, though dispatch never takes one. The gate now reads only
capabilities codecs::is_dispatchable accepts and the sink advertises, so a
held candidate gives the reason an empty registry gives
(strict_gate_ignores_a_held_capability_it_cannot_dispatch).

A pinned decode builds its ONNX session from the verified bytes, but an
ONNX tensor can name another file for its data. Run locally against the
linked ONNX Runtime, a model loaded from memory read such a file from the
process's working directory, outside every pin. neural::onnx_external now
reads the model's protobuf for a tensor stored as external data (graph
initializers, attribute tensors and subgraphs, training graphs, local
functions) and the pinned decode refuses such a model with set_incomplete,
naming the file, before the runtime sees it. Bytes that do not parse are
refused too.

wai-neural-gates.yml adds the new tests to its exact lists and counts.
determinism-tiers.md scopes its forge-run statement to the job as it was
before the pin-aware tests were added; those have no recorded forge run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 08:53:25 -04:00
Transaction Science
Merge wai/land-12-registry-and-text into wai/land-13-parameter-set-identity
Brings link 12's three follow-up commits onto link 13: the restated
ranking phrases in the research notes, extensions and source comments,
with five more phrases in the comparative-prose check; the WAI name list
given only to the push-to-main run; and the codec glossary's
schema_version.

One conflict, wai/vocab/README.md: link 13's rows (the prior term in the
JSON-LD context, the parameter-set pin in the shapes) are kept, and link
12's sentence on what a violation for an unregistered string means is
added before the pin sentence. REGISTRY.md's row for the v2 files now
also names the parameter-set pins the shapes check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 08:41:44 -04:00
Transaction Science
wai: give each CLI registry test its own payload directory
Three tests in tests/cli_registry.rs wrote their payload into one shared
directory, which scratch_dir empties before returning. Run in parallel,
one test removed the directory while another wrote into it, and the write
failed with EINVAL. Each test now names its own payload directory; the
carriage and CLI step passed three runs in a row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:09:30 -04:00
Transaction Science
wai/CHANGELOG: the parameter-set pin entry records the assembly
Stream A's subsection, under link 12's, now records what assembling the
two changes did: one dispatch predicate (codecs::is_dispatchable) on every
selection path, wai.prior.set in the registry table and its exports, the
pin terms and shapes in the generated vocab v2 as well as in v1, and the
C packers' candidate refusal tested under the codec-free `ffi` feature.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:04:37 -04:00
Transaction Science
wai: declare link 13's feature-gated tests and say where the C ABI runs
Cargo.toml declares the feature-gated integration tests that CI names
with --test, with their features, beside link 12's: generate (generate),
ffi_envelope (ffi), ffi_neural_pin (neural, ffi), neural_native_decode
(neural) and jpegai_e2e_full (neural_int). Naming one without its
features now stops cargo with an error instead of running an empty
binary that reports ok.

The C ABI envelope step's comment says it also checks the candidate
refusal of selection and of the packers, and determinism-tiers §6 no
longer says the C packers build only with the codecs feature: they build
under `ffi`, and tests/ffi_envelope.rs runs in that step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:03:42 -04:00
Transaction Science
wai: vocab v2 carries the parameter-set pin, generated from the registry
`wai registry export` now writes the pin terms into v2 as v1 states them:
the ParameterSetPin class, wai:prior and the members pinId, pinSha256,
pinDeterminism, pinForm, pinTier and pinSupersedes in v2.ttl; a scoped
`prior` term in v2.jsonld whose members are the manifest's own names; and
ParameterSetPinShape and SupersedesShape in v2.shapes.ttl, with the tier
list taken from codecs::TIER_TOKENS. v1 keeps its additive pin terms.

vocab_pin_terms_match_prior_members reads v1 and v2 and holds each
scoped term to the pin's serialized members and each shape's tier list
to the registered tokens. check_shapes.py gains pin cases (a full and a
minimal pin, an unregistered tier, an uppercase digest, a missing
determinism, a supersedes with no digest, and a WAI2 component's pin);
against the v2 files before this change, the five non-conforming cases
conform. The vocab README says what each version carries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:02:31 -04:00
Transaction Science
wai: register wai.prior.set in the registry table and regenerate
wai.prior.set (SPEC §5, Prior artifacts) gets its row in the registry
table: a registered payload, media class binary, registered 2026-09-30,
with the edition left to the registration. It is listed in
GLOSSARY_NO_ENTRY as a WAI-native class. `wai registry export` regenerates
registry/capabilities.json, the table in REGISTRY.md and vocab
v2.{ttl,shapes.ttl}; `wai registry export --check` is clean, and the
registry tests that hold every registered string to one row pass again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 05:59:38 -04:00
Transaction Science
wai: candidate tests on the pin-aware selection API and the C ABI
The link-12 candidate tests are ported to link 13's API:
a_candidate_is_never_dispatched_picked_or_emitted builds its envelopes
with Manifest::new and ModelRequirement::new(..).with_fallback(..),
dispatches through dispatch_verified, and picks with
pick(.., no_parameter_sets()) and primary(..), now also checking the
not_selectable reason a candidate entry gets. the_emit_path_refuses_a_candidate
builds the WAI2 envelope through WaiMulti::from_parts, as the C packer
now does. `wai wrap` sets its fallback through the builder.

New candidate cases: in the pin-aware dispatch and selection tests, a
candidate carrying a pin is never dispatched or picked and its pin is
never verified; in tests/ffi_envelope.rs (feature `ffi`, which the C ABI
envelope step runs), wai_envelope_select never picks a candidate and the
WAI2 table marks it not selectable, and envelope_pack_refuses_a_candidate,
which needed the codecs feature before, checks that wai_envelope_pack and
wai_envelope_pack_multi refuse one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 05:58:02 -04:00
Transaction Science
wai: one dispatch predicate, codecs::is_dispatchable, on every path
codecs::dispatchable (not companion-only) is removed. Wai::dispatch_verified
takes a capability or fallback only when is_dispatchable accepts it, and
RenditionMeta::is_selectable already goes through it, so WaiMulti::pick,
primary, the neural sink's decode_multi, the C wai_envelope_select, the
wai-web core module and the CLI's inspect all refuse a candidate, a
record and a derivation as well as a companion-only capability. A string
this revision does not register stays dispatchable when the sink
advertises it, and a pin on it is verified as several files, so it fails
closed.

SPEC §7.1 step 2 takes an entry whose capability is dispatchable (§4),
step 5's not_selectable says the same, and §3.1 notes that an
unregistered string is dispatchable. §5's candidate paragraph names the
pin-aware functions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 05:53:46 -04:00
Transaction Science
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