wai: keep loaded parameter sets between decodes, keyed by the SHA-256 of their bytes (O23) #268

Merged
dcharlot merged 20 commits from wai/o23-loaded-set-cache into main 2026-10-15 20:41:28 -04:00

2026-10-15

Transaction Science
wai: the store stays out of the sources the byte-equality crate includes
All checks were successful
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 1m50s
wai formal verification (integer core) / kani (stage) (pull_request) Successful in 3m13s
wai formal verification (integer core) / kani (isqrt512) (pull_request) Successful in 49m3s
wai formal verification (integer core) / kani (stage-long) (pull_request) Successful in 21m19s
WAI HTTP delivery / HTTP corpus · falsify mutations 1/3 (pull_request) Successful in 46m48s
WAI HTTP delivery / HTTP corpus · falsify mutations 0/3 (pull_request) Successful in 47m39s
WAI HTTP delivery / HTTP corpus · falsify mutations 2/3 (pull_request) Successful in 46m52s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 1m28s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m20s
wai-pack / wai-pack · linux (pull_request) Successful in 1m19s
wai-ops integer operators / linux-x86_64 (pull_request) Successful in 52s
wai formal verification (integer core) / kani (integer-core) (pull_request) Successful in 6m8s
wai-ops integer operators / wasm32 under Node (pull_request) Successful in 22s
wai-ops integer operators / wasm32-wasip2 (wasmtime) (pull_request) Successful in 42s
wai-ops integer operators / independent checker (Python) (pull_request) Successful in 17s
WAI HTTP delivery / HTTP corpus · falsify patches 0/3 (pull_request) Successful in 6m1s
WAI HTTP delivery / HTTP corpus · every patch and mutation in exactly one shard (pull_request) Successful in 4s
WAI HTTP delivery / HTTP corpus · falsify patches 1/3 (pull_request) Successful in 6m51s
WAI HTTP delivery / HTTP corpus · falsify patches 2/3 (pull_request) Successful in 6m18s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m7s
WAI HTTP delivery / cache rules · controls and labelled caches (pull_request) Successful in 1m11s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Successful in 3m6s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 1m20s
WAI HTTP delivery / HTTP corpus · verified both ways, and the differential (pull_request) Successful in 2m49s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 23s
wai-ops integer operators / linux-aarch64 (pull_request) Successful in 1m8s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m17s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 3m17s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 4m6s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 5m35s
byte-exact-conformance #[path]-includes int_synth.rs and int_hyper_synth.rs, and
has no int_set_cache, codecs or pin module, so gate.sh's byte-exact step failed to
compile. int_synth::decode_from_spec is now three steps (check_payload,
load_spec, decode_loaded) and loads its set every time, as before the store;
int_payload's wai.neural.int_synth decode takes the middle step from the store.
wai-web's decodeIntSynth decodes through decode_int, as the other payload entry
points do (a refusal's message now starts with its code). The Resident impl for
int_hyper_synth::ops::Nets moves into int_set_cache.rs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 11:51:01 -04:00
Transaction Science
2026-10-15 11:37:46 -04:00
Transaction Science
wai: the loaded set's key reuses the listing digest resolve formed for check 5
An unpinned resolve (and a pinned one with a key log) already hashes every member
the decode reads and their listing, for check 5. IntParams keeps that listing's
SHA-256 with the member names it was formed over, and the key of the loaded set
uses it only for a capability that reads exactly those members; any other key
hashes the bytes (IntParams::read_digest). The bytes are borrowed for as long as
the parameters live. Measured before this change: the key's SHA-256 of the
pretrained set (24 MB, software SHA-256) was about 58 ms of a ~110 ms decode with
its set held.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 11:29:27 -04:00
Transaction Science
wai: the store's constants stay out of the C header; tests take their store-off outputs first
LoadedSets::DEFAULT_BUDGET and INDEX_BYTES_PER_ENTRY are associated consts, and
int_ops::PROFILE is crate-only, so cbindgen exports none of them (the first build
wrote two #defines and an opaque Profile into include/wai.h; that change is not
kept). A budget of 0 empties the store, so the tests decode with the store off
before they fill it. A whm1/1 set with a huge multiplier still loads (its check
ranges shrink to fit) and is refused at run time; the refused conditional-codec
set is now one whose layer-0 bias leaves no admissible input range, refused as it
is lowered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 11:11:18 -04:00
Transaction Science
wai: keep loaded parameter sets between decodes, keyed by the SHA-256 of their bytes (WIP)
A decode through the integer operator set lowers its set and loads each graph,
the bounds pass included, on every call. int_set_cache::LoadedSets keeps a set
once it has loaded, keyed by (capability, lowering, profile, SHA-256 of the
listing of the members read), within a byte budget (256 MiB, LRU, 0 = off).
int_payload::decode_int / declared_cost and int_synth::decode_from_spec take
the load step from it; every other check runs as before. A refused set is
never kept. wai_ops::Graph::heap_bytes counts an entry's graphs.

Committed before the first build; results follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 11:07:27 -04:00
Transaction Science
Merge origin/main (at ca79392a, with #264, #265 and #263) into wai/d2c-m4
Some checks failed
WAI HTTP delivery / HTTP corpus · every patch and mutation in exactly one shard (pull_request) Has been cancelled
WAI HTTP delivery / HTTP corpus · verified both ways, and the differential (pull_request) Has been cancelled
WAI HTTP delivery / cache rules · controls and labelled caches (pull_request) Has been cancelled
wai formal verification (integer core) / every harness in one shard (pull_request) Has been cancelled
wai formal verification (integer core) / kani (arith) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (isqrt512) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (plan) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (sound) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (stage) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (rans64-t2) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (stage-long) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (integer-core) (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Has been cancelled
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Has been cancelled
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Has been cancelled
CHANGELOG: both sides kept (the conditional codec's section, then
wai-quantum 0.5.1's, then the audio and splat sections).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:26:13 -04:00
Transaction Science
int_hyper gate 7: the decode checks its image against its plan (CondPlan.gs is read where the direct decode no longer is)
Gate 7 green (logs wai-build/logs/d2c-m4/g7): --lib with
--test int_kernels_vectors, int_video_keyframe, int_hyper_ops and
int_hyper_synth EXIT=0 (343 lib tests); the SOTA step on the regenerated
vectors EXIT=0, no skip banner (the decode-frame example, the clip and the
synthesis-only and hyper-decoder-only goldens now through the lowering);
the example and wai_decode_bench build, and the bench's int_hyper case
runs with every policy's output identical; cargo check --lib with
neural_int alone and video_int alone EXIT=0, no warning; byte-exact
EXIT=0 (102 passed; only its two pre-existing CondPlan warnings, which a
third, CondPlan.gs, joined until this commit read it); no tracked file
changed by the builds.

Falsified (what carries the guard now): the test-only direct decode's
run_checked runs the networks unchecked (run_net). The production decode
stays green: --lib int_payload (22 passed), tests/int_payload.rs (every
fixture's code), int_kernels_vectors, int_video_keyframe,
int_hyper_synth's tiny vector, the corpus verify, byte-exact's int_hyper
goldens, all EXIT=0; while int_hyper_ops EXIT=101, the per-rule parity
fixtures: "hyper-latents past h_s's range: through the lowering, then
directly" (field_range, stream_noncanonical). Restored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:25:45 -04:00
Transaction Science
int_hyper gate 7 (WIP: committed before running): the unchecked decode goes
D2c M4, gate 7 (delete).

- int_hyper_synth::decode_conditional, the unchecked conditional decode, is
  deleted; its callers decode through decode_conditional_checked (the
  lowering, with its check ranges): the int_hyper_decode_frame example (step
  3 of tools/wai_sota_vectors.sh), wai_decode_bench's tiny-vector case,
  int_payload's JSON-equivalence unit tests, tests/int_hyper_synth.rs,
  int_kernels_vectors.rs, int_video_keyframe.rs, int_video_sota_keyframe.rs,
  and byte-exact's neural_keyframe_golden (the trap: it gains the check
  ranges, outputs equal; gate 2's duplicate test through ops::decode goes).
- The pretrained synthesis-only and hyper-decoder-only goldens
  (tests/int_hyper_synth.rs) are also held through the lowering.
- The conditional codec's direct guard (legacy's run_checked) is test-only
  since gate 6. run_net_checked, check_layer and igdn_check stay: their one
  production caller left is int_mlicpp (M5); run_net and decode stay for the
  world renderer (M6), and int_hyper_synth's kernel_equivalence with them,
  since their conv dispatch is still run_net's. Docs say so.
- Doc references (int_video, int_video_golden, two tools) and CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:02:44 -04:00
Transaction Science
int_hyper gate 6 (WIP: committed before running): the switch
D2c M4, gate 6.

- int_hyper_synth::decode_conditional_checked decodes through the integer
  operator set (ops::decode); the direct decode (legacy, with its
  run_net_checked wrapper) is cfg(any(test, feature = "legacy_int")).
- int_payload: the WIH1 decode, the WIV1 keyframe and the declared cost run
  one pre-stream check (cond_checked) in integer-payloads §7's order: the
  plan, the keyframe's size against the clip's, then h_s and g_s lowered and
  loaded; the decode then runs from the loaded networks
  (ops::decode_loaded), holding the set as its networks and tables.
- tests/int_payload_cost.rs: the conditional codec's set allowance is its
  tables and networks parsed, lowered and loaded; with them loaded
  beforehand, the decode must hold no more than the declared working bytes.
- tests/int_hyper_ops.rs: the scan (every committed set of both capabilities
  meets the new load rules; every committed WIH1 payload, found by its magic
  in the conformance corpora, decodes through the lowering exactly as
  directly).
- Text: integer-payloads §4 (h_s and g_s through whm1/1; the sigma/mu split
  a driver step after the shape check; the RGB8 step ends g_s's graph), §7
  (the set rule; the order: shapes, then h_s and g_s lowered and loaded; for
  a WIV1 keyframe, its size before its networks' lowering; Exactness);
  integer-operators' status note and §15.3 item 3; SPEC §8; CHANGELOG.

Green (logs wai-build/logs/d2c-m4/g6 and d2c-m4-g6, land/d2c-m4-g6):
gate.sh d2c-m4-g6 GREEN (build, lib-tests, carriage, corpus loop 21/21,
fast-kernels, byte-exact, wai-web wasm32 check, neural gates); the release
fast-kernels step EXIT=0; int_hyper_ops EXIT=0 (8 passed, the scan
included); int_payload_cost debug and release EXIT=0; cargo check --lib with
neural_int alone and video_int alone EXIT=0, no warning; the SOTA step on the
regenerated vectors EXIT=0, no skip banner; wai-ops debug and release
EXIT=0; wai-verify vectors verify EXIT=0 (every file verifies); the Python
checker EXIT=0; wai-web native EXIT=0; wasm32 release + wasm-bindgen 0.2.127
EXIT=0, and under Node: verify_int_payload_wasm (tiny WIH1 dce7282d…,
video_nk 4a81f0c9…), verify_int_synth_wasm, verify_int_hyper_wasm on the
pretrained set (eb1acd2159f8a966, the native hash) and verify_staged_wasm
all EXIT=0. No tracked file changed by the builds.

Memory: with its networks loaded beforehand, the tiny decode holds 16,470
bytes against 16,480 declared; the whole decode held 28,038, within the
declared working bytes and the set's allowance.

Falsified, row "rq floor -> half_up in whm1/1", the switch live: Red:
byte-exact EXIT=101 with the file-based wih1_payload_is_byte_identical and
wiv1_keyframe_1_payload_is_byte_identical FAILED (green under the same
fault at gate 2) beside the through-the-lowering ones; --lib int_payload
EXIT=101 (wih1_json_equivalence, wiv1_json_equivalence, decode_int_without_
neural …); tests/int_payload.rs EXIT=101; the corpus verify EXIT=1 ("FAIL
tiny … stream_noncanonical", "FAIL video_nk …"). The unchecked
neural_keyframe goldens stay green until gate 7 moves them. Restored.

Falsified, the memory claim: the decode keeps a copy of its hyper-latent.
Red: int_payload_cost EXIT=101, "int_hyper, set loaded: held 16534,
declared 16480". Restored: 16,470.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:02:24 -04:00
Transaction Science
int_hyper gate 5 (WIP: committed before running): the fast kernels behind the interpreter, the IGDN kernel lent
D2c M4, gate 5 (fast-kernel parity), and M3's open item: the host lends the
interpreter its fast inverse-GDN kernel.

- int_ops::Host: an igdn operator runs on int_kernels::igdn (its narrow,
  64-bit and 128-bit paths), declined back to the interpreter where, on the
  values present, a term or the norm could pass i128 or the root or output
  i64 (§13.2's P_l read on the actual values; no certified graph forms one),
  or gf or frac exceeds 127.
- int_kernels: a test-only count of fast IGDN runs (testkit::fast_igdn_runs).
- int_ops::equivalence: the_conditional_codec_runs_its_networks_on_the_fast_kernels
  (tiny: 4 convolutions and 1 inverse GDN on the fast kernels under every
  fast policy, 0 under the reference, the interpreter's bytes);
  inverse_gdns_equal_the_interpreter (int_transform's IGDN equivalence held to
  the interpreter: random gf, frac, gamma and beta of either sign, inputs on
  each of the kernel's three paths); whm1_convolutions_equal_the_interpreter
  (int_hyper_synth's kernel_equivalence held to the interpreter: WHM1's rq,
  strides to 16, i32/i64/mixed operands). The splat and audio tests now count
  their inverse GDNs on the fast kernel too.
- tests/int_hyper_ops.rs: every_kernel_policy_decodes_through_the_lowering_alike
  (reference and fast(1|2|5|0) on WIH1, its JSON form, the JSON models, and
  sets with a hyper-latent channel about h_s's input range).

Green (logs wai-build/logs/d2c-m4/g5): --lib int_ops debug and release
EXIT=0 (9 passed); int_hyper_ops debug and release EXIT=0 (7 passed);
byte-exact cargo test --release EXIT=0 (103 passed, the two pre-existing
CondPlan warnings only).

Gate 4's timed runs, on gate 4's tree (logs g4-timed*): 300 s per profile,
seed 20261015, no disagreement, EXIT=0 both: debug 79,998 cases (12,560
alike; breaks bias 6,563 / unmeetable 47 / unused 3,969 / no tag 2,645),
release 3,349,906 cases (529,718 alike; breaks 273,794 / 2,210 / 163,351 /
109,491).

Falsified, M1's row for this gate (every channel requantised with channel
0's parameters, int_ops::conv): Red: --lib int_ops EXIT=101 (all three
convolution equivalences, the new whm1 one included, and the three decoder
tests); int_hyper_ops EXIT=101 (5 tests: the policy test, and, since the
production policy is fast, the goldens, fixtures and range edges).
Restored.

Falsified, the IGDN arm (the fast IGDN given gf - 1): Red: --lib int_ops
EXIT=101: inverse_gdns_equal_the_interpreter ("c=5 gf=24 frac=12" differs
under fast(1)) and the conditional codec's, splat's and audio's decoder
tests, while the three convolution equivalences stay ok; int_hyper_ops'
every_kernel_policy_decodes_through_the_lowering_alike EXIT=101. Restored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 09:14:35 -04:00
Transaction Science
int_hyper gate 4: the nightly differential names the conditional codec
D2c M4, gate 4 (differential), its record. tests/int_ops_differential.rs's
int_hyper half needs no further feature (neural_int, through legacy_int), so
the nightly's features stand; its header names the decoder.

Green (logs wai-build/logs/d2c-m4/g4): the whole differential file, debug
and release, EXIT=0 (8 passed). int_hyper, 3000 cases from the default
seed: 462 decoded alike; refused by both FieldRange 730, GeometryMismatch
328, ModelMismatch 853, StreamExhausted 82, StreamNoncanonical 76; planned
breaks: bias 225, unmeetable check range 2, unused shift/gf 141, no tag
0/1/2 layer 101. int_hyper_planned_breaks_are_new_refusals ok: each break
on a set the direct decode decodes (no tag layer in h_s; an unused h_s
shift; an unused g_s gf) or refuses with another code (a g_s bias at
i64::MAX: field_range after both streams; an h_s bias at i64::MIN with a
hyper-latent stream that runs out: stream_exhausted; an unmeetable g_s
range: field_range), all model_mismatch through the lowering.

Falsified (no Part 3.5 row; a fault only random sets reach: every committed
conditional-codec convolution has stride 1): int_ops::whm1_net lowers a
convolution's stride as 1. int_hyper_ops (gates 1-3) stays green, EXIT=0,
6 passed; the differential EXIT=101, "new Err(GeometryMismatch), direct
Some(Ok(..))", seed 40882766991264310. Restored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 09:03:06 -04:00
Transaction Science
int_hyper gate 3: the registry export
registry/capabilities.json regenerated (wai registry export) with the ops
members of wai.neural.int_hyper and wai.video.int_hyper: whm1/1, rans64
t4097/lenient/canonical, bucket ceil.

Gate 3 green (on this commit's tree; logs wai-build/logs/d2c-m4/g3, g3v):
int_hyper_ops debug and release EXIT=0 (6 passed: the 33 committed
fixtures, the 27 one-change fixtures, the six layers' range edges); the
CI lib-test step EXIT=0 (830 passed, the registry's ops test included);
registry export --check EXIT=0; check-wai-section-refs.py EXIT=0; no file
changed by the builds but this one.

Falsified, Part 3.5 row "refusal parity: X_l + 1 used as the check bound"
(check_x in wai-ops' lowering): Red: int_hyper_ops EXIT=101, the edge test
"tiny_h_s.bin layer 0: 3222701620144926 runs directly: layer 0:
accumulation could leave i64" (the graph accepts what the direct decode
refuses), and at X_0 + 1 h_s no longer loads under acc64, so every decode
through the lowering is refused (model_mismatch) where the direct decode
decodes. Restored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 08:53:01 -04:00
Transaction Science
int_hyper gate 4 (WIP: committed before running): the differential's conditional-codec half
D2c M4, gate 4. tests/int_ops_differential.rs gains int_hyper:
int_hyper_planned_break (either network refused at load by its lowering for
a rule the direct decode does not make; the shared load_break), a generator
of random WHM1 h_s/g_s pairs, entropy tables and WIH1 payloads whose latent
symbols are coded against the tables the direct decode's sigma buckets them
to, int_hyper_random_sets_and_payloads_decode_alike, and
int_hyper_planned_breaks_are_new_refusals.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 08:49:43 -04:00
Transaction Science
int_hyper gate 3 (WIP: committed before running): refusal parity, ops members, SPEC citations
D2c M4, gate 3 (refusal parity). The registry export follows.

- tests/int_hyper_ops.rs:
  (a) every committed fixture of both capabilities (33) is refused by a sink
      with its code; for each decode fixture (15) its WIH1, or its WIV1's
      keyframe, decodes through the lowering and directly to the same image,
      or is refused by both with the same code, the fixture's for WIH1;
  (b) 27 fixtures, one per refusal the direct decode makes, in integer-
      payloads §7's order, each one change from the committed tiny set or
      payload (the set against the payload, the networks planned and the
      caps, the shapes, each stream, each network's ranges); both decodes
      refuse each with the code §8 gives it;
  (c) at the edge of every check range of the committed h_s and g_s (six
      layers; the leaky ReLU followed by a zero 1x1 transposed convolution,
      since a network without a tag 0, 1 or 2 layer does not lower): at
      +-X_l both run alike, at +-(X_l + 1) both refuse (field_range at input
      0; run_net_checked out of range at layer 0).
- codecs::capability_ops: wai.neural.int_hyper and wai.video.int_hyper =
  {acc64, full, whm1/1, rans64 t4097/lenient/canonical, bucket ceil}; the
  registry unit test lists five capabilities.
- SPEC §5's two rows cite integer-payloads §4 (§3 for the clip) and
  integer-operators §13.2; SPEC §7 names both; CHANGELOG section started.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 02:03:32 -04:00
Transaction Science
int_hyper gate 2: the conditional codec decodes through whm1/1 to its goldens
D2c M4, gate 2 (golden equality).

- int_hyper_synth: the stream decodes factored out of the checked decode
  (hyper_latent, latent; unchanged), the direct decode kept as
  legacy::decode_conditional_checked (decode_conditional_checked still calls
  it: the switch is gate 6), and ops::{plan, decode, decode_loaded}: the
  plan (cond_plan, integer-payloads §7's order), the two networks lowered and
  loaded, the hyper-latent stream, h_s's graph, the driver's split of its
  output into sigma (channels [0, m)) and mu ([m, 2m)) after the shape check
  (§13.5), the latent stream conditioned on sigma, g_s's graph ending in the
  RGB8 step, then HWC bytes.
- tests/int_hyper_ops.rs: every committed vector decodes through the
  lowering to the direct decode's image and every committed digest: tiny
  (WIH1, its JSON form, and the set's JSON models: SHA-256 sidecar dce7282d…,
  FNV-1a 7cbe882c42c6725d) and video_nk (WIV1 keyframe 1: the keyframe, then
  the P-frames, every frame's and the clip's SHA-256 4a81f0c9… and FNV-1a).
- byte-exact-conformance: wih1_through_its_lowering_is_golden (reference and
  fast kernels), wiv1_keyframe_1_through_its_lowering_is_golden, and
  the_neural_keyframe_clip_through_its_lowering_is_byte_identical (the JSON
  models neural_keyframe_golden reads, now with the check ranges; clip FNV-1a
  a5f53d477999d159).
- tests/int_hyper_synth.rs: the pretrained set's binary models also decode
  through the lowering to the export image (wai-sota-vectors.yml).

Green (build host, logs wai-build/logs/d2c-m4/g2, g2v): int_hyper_ops debug
and release EXIT=0 (3 passed); cargo check --lib --features neural_int
EXIT=0, no warning (ops::plan is pub(crate), as CondPlan is);
byte-exact cargo test --release EXIT=0 (100 passed; its two warnings are
the pre-existing CondPlan ones); the SOTA step on the regenerated vectors
EXIT=0, the pretrained binary models decoding through the lowering to the
export image eb1acd2159f8a966.

Falsified, Part 3.5 row "rq rounding floor -> half_up in whm1/1": Red:
int_hyper_ops EXIT=101 (the vector test: "tiny WIH1: StreamNoncanonical",
since h_s's sigma moves the buckets; gate 1's graph bytes); byte-exact
EXIT=101 with wih1_through_its_lowering_is_golden,
wiv1_keyframe_1_through_its_lowering_is_golden and
the_neural_keyframe_clip_through_its_lowering_is_byte_identical FAILED
while the file-based wih1_payload_is_byte_identical and
the_neural_keyframe_clip_is_byte_identical stay ok (pre-switch); splat's and
audio's goldens FAILED too (switched). Restored.

Row "igdn sums first, then shifts once": the tiny set survives it
(int_hyper_ops EXIT=0, every byte-exact int_hyper golden ok) while the
audio goldens FAIL, as Part 3.5 predicts for every set but audio; the
pretrained set does carry it: the SOTA test EXIT=101, "the decode through
the integer operator set must give the export image" d5763810e3fdef99 !=
eb1acd2159f8a966. Restored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 02:00:00 -04:00
Transaction Science
int_hyper gate 1: the conditional codec's lowering and certificates, as wai-rs loads them
D2c M4, gate 1 (extensions/integer-operators.md §13.2, §13.0, §13.5).

- int_hyper_synth::ops: lower (h_s by whm1/1, then g_s by whm1/1 with the
  RGB8 step, from the models this crate parses) and load (each loaded under
  acc64 in turn, as the decode will hold them: Nets).
- int_ops::whm1_net refuses a model whose weights are past i16 or whose
  inverse-GDN gamma is past i32 (model_mismatch): the widths WHM1 gives them
  and whm1/1 writes them at. A model parsed from WHM1 bytes never has one;
  a JSON model (the tools' form, which the browser's debug decode and the
  byte-exact keyframe golden read) could, and its graph would otherwise hold
  truncated values. Unit test int_ops::conversion at both ends of each width.
- tests/int_hyper_ops.rs (video_int, legacy_int; named in both fast-kernels
  steps): every committed set of wai.neural.int_hyper and wai.video.int_hyper
  (tiny under both, the synthetic hyper) lowers to its committed h_s.whg1 and
  g_s.whg1 from its bytes and from the parsed models; its set digest, the
  certificate's graph digests and input check ranges are those graphs'; each
  graph loads under acc64 and not acc32; the first acc32 failure is h_s input
  0, range, 53 bits for tiny (Appendix C) and 52 for hyper; the tiny set's
  JSON models lower to the same graphs as its binary ones. The pretrained
  set's committed certificate (f16fd09c) has Appendix C's verdict (41 bits).
- tests/int_hyper_synth.rs: the_pretrained_set_lowers_to_its_certificates_graphs
  (the regenerated set is f16fd09c, and ops::lower writes the graphs its
  certificate records); named in wai-sota-vectors.yml's required list, whose
  path filters gain src/int_ops.rs.

Green (build host, logs wai-build/logs/d2c-m4/g1): int_hyper_ops debug and
release EXIT=0 (2 passed); --lib int_ops:: EXIT=0 (4); the SOTA step
(WAI_REQUIRE_SOTA_VECTORS=1, vectors regenerated on the build host from the
pinned stack: set digest f16fd09c, as committed) EXIT=0, 7 passed, the new
test included; check-tests-in-ci.py EXIT=0.

Falsified: h_s lowered with the RGB8 step in ops::lower. Red: int_hyper_ops
EXIT=101 ("tiny: the lowering of the parsed models differs from the
committed h_s"); the SOTA test EXIT=101 (h_s's graph digest is not the
certificate's). Restored with git; green above is this commit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 01:48:14 -04:00