wai: ingest the browser capability-negotiation mapping (WebCodecs) #54

Closed
dcharlot wants to merge 2 commits from wai-webcodecs-negotiation into main

2026-09-21

Transaction Science
wai: reconcile the WebCodecs mapping with capability constraints
Some checks failed
standards workspaces build + test / map-rs (pull_request) Successful in 35s
standards workspaces build + test / mesh-rs (pull_request) Successful in 30s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 1m29s
standards workspaces build + test / openpay (pull_request) Successful in 1m37s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 18s
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 58s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 56s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 17s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m48s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m19s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m11s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m7s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m33s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 14s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 34s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 17s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 42s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m5s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m0s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m15s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m20s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m14s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m16s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 14s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 47s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 14s
wai cross-architecture byte-equality / windows-x86_64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · windows (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · windows (pull_request) Has been cancelled
This mapping was written on 2026-08-03 and sat unmerged while
`extensions/capability-constraints.md` landed, which makes dispatch a
precondition check: a sink satisfies a capability when it advertises `cap` AND
the object's declared parameters satisfy a registered constraint set. Rebased
onto current main, the two extensions read as overlapping claims about §4 with
nothing saying how they relate.

They are not in tension, and the newer one makes this one sharper.
`isConfigSupported()` is not a codec-string test — it takes a whole
`VideoDecoderConfig`, codec string plus `codedWidth`, `codedHeight` and the rest
— so it is a constraint evaluator already, and a browser satisfies the
constraint extension's three requirements structurally rather than through extra
machinery: the query is pre-flight, so evaluation happens before dispatch rather
than during it; it answers for a configuration, so the answer is per object and
not per sink; and `supported: false` is a negative answer returned before any
payload is committed to, which is the required treatment of an object that
satisfies no set. The call also returns the normalised config the platform would
accept, which is the accepted parameter set, so a sink SHOULD use it rather than
re-derive one.

The limit is stated rather than glossed. WebCodecs' parameter vocabulary is the
conventional-media one — codec, resolution, frame rate, bit depth, profile —
which is the same shape as the ratified registers `capability-constraints.md` §3
draws on, and it has the same gap: no WebCodecs configuration describes the
neural, quantum, world or haptic families. Those have no native tier to
constrain at all, resolve through the WASM tier, and stay unconstrained until
WAI authors their register entries. That is the state §3 already describes, not
a shortfall introduced here.

Framing renumbered §5 → §6. Docs only; `check-no-vanity-metrics.sh` passes.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-21 13:49:10 -04:00
Transaction Science
wai: ingest the browser capability-negotiation mapping (WebCodecs)
SOTA ingest: WAI's §4 dispatch — declare a capability, decode it if advertised,
else fall back — is the exact shape of the browser's own media-capability
primitive, WebCodecs isConfigSupported(), whose established fallback when a config
isn't supported is a WebAssembly decoder. That is WAI's two-tier design already.

New extensions/webcodecs-negotiation.md formalizes it: a browser sink answers §4's
"advertises cap" with isConfigSupported() for the native tier (mapping the floor +
menu codecs to VideoDecoder/AudioDecoder/ImageDecoder), and WAI's pure-integer wasm
decoders as the always-satisfiable fallback — the tier the neural/computed
capabilities (wai.image.jpegai, wai.neural.int_*, …) live in, decoding byte-exact
in-browser (decode-equivalence), and where the classical floor stays always
reachable. It documents what the live /jpegai and /int_hyper sinks already do.
Referenced from SPEC §4; changelog entry. Informative, self-referential — WAI adds a
named capability and a guaranteed wasm floor to the browser's own pattern.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-09-21 13:48:56 -04:00