wai: add wai.neural.int_mlicpp, the MLIC++ entropy topology integer end to end #111

Merged
dcharlot merged 6 commits from wai/land-09-int-mlicpp into main 2026-09-30 19:52:34 -04:00

2026-09-30

Transaction Science
Merge wai/land-08-energy-classes into wai/land-09-int-mlicpp
Some checks failed
standards workspaces build + test / proof-rs (pull_request) Successful in 1m11s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 30s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m8s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 2m31s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m34s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 31s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 1m11s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 26s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 2m21s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 22s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 42s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 38s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m55s
wai formal verification (integer core) / kani (pull_request) Successful in 3m56s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 55s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m6s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 4m38s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 23s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m15s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m32s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 4m3s
standards workspaces build + test / sense-rs (pull_request) Successful in 5m23s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 3m47s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 28s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 2m56s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 27s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 1m12s
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
2026-09-30 07:39:13 -04:00
Transaction Science
wai: square the deviations in the energy statistics without powi
Some checks failed
standards workspaces build + test / proof-rs (pull_request) Successful in 1m15s
standards workspaces build + test / openpay (pull_request) Successful in 1m33s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 30s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 3m45s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m10s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 2m12s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 31s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m32s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 22s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 1m1s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m42s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 2m5s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 22s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 42s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 40s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 5m2s
wai formal verification (integer core) / kani (pull_request) Successful in 3m48s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 56s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m9s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 26s
standards workspaces build + test / sense-rs (pull_request) Successful in 7m53s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 4m27s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 41s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m36s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 4m51s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 1m1s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 11m19s
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
The linux-arm64 leg of wai-conformance failed from this link on: the JPEG AI
decoder's symbol guard (tests/jpegai_decode_symbols.rs) found __powidf2, the
compiler builtin behind f64::powi, defined in its executable. Nothing calls
it there: in the executable built in the runner's own image, no instruction
branches to it, no relocation refers to it and no address is formed for it.
It is the case the test's documentation describes for floor on x86_64 Linux:
GNU ld keeps a compiler-builtin definition that a removed section referred
to. The references were the two sample-variance loops this link added,
energy_class::bracket_relative_uncertainty and energy_burst::sample_sd,
which squared with powi(2).

They now multiply the deviation by itself. For an exponent of 2, __powidf2
returns exactly d * d, so every figure is unchanged. In the runner's image
(catthehacker/ubuntu:act-22.04, arm64, rustc 1.98.0) the guard fails before
this change and passes after it, with no __powidf2 in the executable. On macOS
arm64: the guard, and wai-energy-receipts' three suites with --locked, pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 07:39:05 -04:00
Transaction Science
wai-web: refresh Cargo.lock for wai-quantum 0.3.21
Some checks failed
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 45s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m48s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m20s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m11s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m9s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m34s
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Successful in 23s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 2m16s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 23s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 41s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 39s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m47s
wai formal verification (integer core) / kani (pull_request) Successful in 3m44s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m0s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 53s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m6s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 1m53s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 23s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m8s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m30s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m52s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 1m50s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 21s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 2m21s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 22s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 58s
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
main's wai-web/Cargo.lock still records the path dependency wai-quantum at
0.3.18; its Cargo.toml has said 0.3.21 since f0591f1b, so any --locked build
of wai-web refuses to start. The refresh changes only that version line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 01:40:16 -04:00
Transaction Science
wai: add wai.neural.int_mlicpp, the MLIC++ entropy topology integer end to end
The float wai.neural.mlicpp decodes correctly only while its encoder evaluates
the entropy network bit-identically to the decoder. Its validation run, with the
encoder at the runtime's default thread count and the decoder single-threaded,
put one scale on the other side of a table edge at symbol 416 of 12,288 and
decoded garbage from there. Matching the execution settings fixes that run, but
it stays a convention between two implementations. int_mlicpp makes the
agreement a property of the arithmetic: the hyper-decoder, the entropy network
re-run before each of the 2*K channel-slice x checkerboard passes, and the
synthesis are all integer networks, so every decoder derives the encoder's scale
bucket for every element, on any platform and at any thread count.

- wai-rs/src/int_mlicpp.rs: the decoder (a WIM1 payload; a one-file WMB1 model
  bundle, so a prior's SHA-256 pins every network and table), built from
  int_hyper_synth's networks, int_entropy's bucketing and the rANS decoder.
- Totality. Before the decode allocates anything, each network's shapes are
  derived from its layer geometry (the new int_hyper_synth::net_shape, which
  shares its geometry with the checked run), and a header whose shapes the
  model does not produce, or on which any network would form a buffer over
  Header::MAX_TENSOR (2^26) elements, is refused. Latents go through
  int_entropy::dequantize (sym * 2^frac + base, None where i64 cannot hold it;
  Kani harness), and every network through int_hyper_synth::run_net_checked
  (run_net layer by layer, only while no value can leave its type). So a decode
  returns an image or an error for any payload, the same one with and without
  overflow checks.
- IntModel::from_bytes, the compact network form every integer neural decoder
  loads, is total on damaged bytes: it no longer reserves for the layer count it
  reads before checking the bytes hold that many (about 480 GB for 2^32 - 1),
  and forms layer sizes and read offsets in checked arithmetic (they overflowed
  a 32-bit usize).
- run_net and decode share a per-layer function and to_rgb8; every committed
  vector still reproduces its hash.
- Registry: NeuralIntegerExact, Lossy, royalty-free (the decoder is this crate's;
  the patent status of the techniques was not examined). A new registry test
  records the basis of every NeuralIntegerExact capability.
- The neural dispatch decodes it and re-checks a pinned prior against the exact
  bytes it decodes with.
- tools/wai_int_mlicpp_export.py writes the committed vector
  tests/vectors/int_mlicpp/. Its weights are synthetic and seeded (no trained
  model is available), so the vector shows decode-equivalence and nothing about
  compression quality.
- Tests: tests/int_mlicpp.rs (the pinned image, bucket and symbol hashes under
  every kernel policy and thread count; one unit in each of four chosen
  parameters, one per value path, changes the image; damaged payloads never
  panic), tests/int_mlicpp_preflight.rs (a counting global allocator: refusing
  a header the model cannot fit, or parsing a damaged network, allocates a few
  KB at most; the decoder without the pre-flight fails it, and aborts on a
  3.4 PB allocation for a synthesis wider than the cap), a byte-exact-conformance
  golden, a neural dispatch test and unit tests. CI runs them on the conformance
  matrix in both profiles, on the byte-equality matrix, and in neural-gates.
- Evidence: all of the above pass, and the pinned hashes reproduce, on macOS
  arm64 and on wasm32-wasip2 under wasmtime 49.0.1, in dev and release. x86_64
  was not measured here (no x86_64 translation layer is installed); the Linux
  legs come from the byte-exact matrix, and the Windows runner is offline.
- SPEC 5 and 7, the README, determinism-tiers 3, 5 and 6, and the CHANGELOG
  record it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-30 01:39:56 -04:00

2026-09-29

Transaction Science
Merge wai/land-07-int-decode-kernels into wai/land-08-energy-classes
Some checks failed
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 50s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m47s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m17s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m13s
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 25s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 2m8s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 26s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 45s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 46s
wai formal verification (integer core) / kani (pull_request) Successful in 3m47s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 53s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m6s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 23s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m27s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m30s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 2m24s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m45s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m27s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m19s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 2m21s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 25s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 2m31s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 19s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 1m9s
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
Brings in, through the refreshed previous link, main's OER differential fuzzer (54e89b56) and its audit of the OER extension against both verifiers (860ead8c, documentation only), so this link is checked against current main.

The OER extension now carries both main's audit and this link's statement that an OER/2 receipt carries an evidential grade and no acquisition class; the two edits touch different sections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 10:21:34 -04:00
Transaction Science
wai: on-chip counters and calibrated instruments are separate energy classes, and every joule-carrying receipt can say which
Some checks failed
WAI energy receipts / energy receipts · linux (pull_request) Successful in 39s
wai formal verification (integer core) / kani (pull_request) Successful in 4m59s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 52s
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Failing after 1m7s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 6m49s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 24s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 2m28s
standards workspaces build + test / aac-rs (pull_request) Successful in 3m25s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 3m46s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 1m22s
standards workspaces build + test / map-rs (pull_request) Successful in 2m16s
standards workspaces build + test / mesh-rs (pull_request) Successful in 2m3s
standards workspaces build + test / openpay (pull_request) Successful in 18m29s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Successful in 1m58s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Failing after 7s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Failing after 7s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Failing after 8s
standards workspaces build + test / arl-rs (pull_request) Successful in 3m49s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 3m19s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 3m45s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 3m17s
standards workspaces build + test / sense-rs (pull_request) Successful in 4m0s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 3m42s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Successful in 27s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 2m43s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 28s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 1m14s
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
The single `HwShunt` acquisition class covered both an on-chip vendor
counter (RAPL, NVML, SMC, IOReport) and an external calibrated shunt. They
are different evidence: a calibrated instrument's uncertainty is traceable to
a calibration, while a counter is a vendor's reading whose error the vendor
states (RAPL readings are deliberately noised when SGX or TDX is enabled,
per security advisory INTEL-SA-00389).

- extensions/energy-measurement.md §2 splits hardware evidence into
  `OnChipCounter` and `CalibratedInstrument`, each with a required declared
  uncertainty (relative error and integration window). IOReport is an
  on-chip counter, like RAPL and NVML. `HwShunt` stays readable as the legacy
  class, ranked below both, and is not sealed into a new WAI receipt.
- Every receipt family that carries joules — video, world, film, reel,
  haptic, score, splat4d, audio scene, ternary, provenance and the wai-quantum
  receipts — can carry its class. The label is additive: every committed
  signed vector still verifies, and the signed bytes of unlabelled and
  legacy-labelled receipts are pinned by tests. A sealed figure declares its
  1 µJ resolution, and the floor is stated as the rule verified (0.5/√3 µJ).
- The acquisition rules are scoped to the receipt profiles WAI defines, and
  the text says what enforces each one.
- Meters open their window from rest, report an all-zero power reader as
  unusable rather than clean, and state the running-window count model as
  conservative.
- oer-receipts.md maps OER's evidential grade onto the refined classes. The
  rule that a producer must not grade `measured` a figure whose class is
  `Estimator` is kept as settled on main.
- wai-quantum verifies a receipt in either form on every in-tree verify
  path, including wai-quantum-serve's POST /verify.
- CI: wai-energy-receipts.yml runs the energy-class, label and legacy-pin
  tests for wai-rs, wai-quantum and wai-quantum-serve, which no workflow
  enabled before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 01:27:37 -04:00