open-standards/wai/byte-exact-conformance/Cargo.toml
Transaction Science a6c61f3ce0 D2c M1 gate 6: int_synth decodes through wai-ops; the direct decode is test-only
The switch. int_synth::decode_from_spec (and so decode, decode_bytes, the
int_payload dispatch, the neural sink and the browser crate) decodes through
the integer operator set: the payload checked, the set lowered by int_synth/1,
loaded under acc64 with its bounds certificate, run by the interpreter with the
fast kernels behind it. The direct decode (int_synth::legacy, its serde specs,
conv_transpose2d, reference_output_side and the scalar reference) is behind
cfg(any(test, feature = "legacy_int")). byte-exact-conformance declares
legacy_int; tests/int_synth_ops.rs, which compares the two, requires it.

Every committed output is unchanged: the fast-kernel steps' tests in both
profiles (int_kernels_vectors' corpus under every policy, int_payload,
int_synth_ops, the differential), the int-synth corpus loop, byte-exact's
goldens, and the browser crate's wasm32 decode of the corpus under Node.

The planned breaks take effect. tests/int_kernels_geometry.rs: a stride past
32 bits, an uncropped output past 2^26 (pad 2^12; pad 2^9 still decodes to the
bias) and the u32 and 2^62 fields of the size-overflow case are refused under
every policy and in every build, where the direct decode returned or panicked.

O12 (tests/int_synth_ops.rs): every committed int_synth set has layers, each
with out_ch, k and stride at least 1, fields below 2^32 and a shift of at most
63, and lowers and loads under acc64 (overflow_acc64, the falsification set,
alone fails); every committed payload has a reserved byte of 0, C >= 1, C*S*S
<= 2^26, its exact length, and decodes.

Text: integer-payloads §13 (a non-empty layers list, fields below 2^32,
out_ch, k and stride at least 1; the reference decoder decodes through the
lowering), integer-operators §13.1's load checks (at least one layer, the
32-bit fields, out_ch >= 1), §15.3 (no layers, out_ch 0, a field of 2^32 or
more), its status note, SPEC §8 *Planned breaks*, and the CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-13 09:52:36 -04:00

34 lines
1.4 KiB
TOML

# Cross-architecture byte-equality conformance for WAI's integer-exact paths.
#
# Deliberately a SEPARATE tiny crate: it #[path]-includes the pure-integer
# sources from wai-rs (rans.rs, int_synth.rs — single source of truth, no copy)
# so it compiles with NO system codec libraries and NO ONNX runtime. That is
# what lets the CI matrix run it on every OS/arch in about a minute, proving
# the `replicate` determinism contract on real silicon rather than asserting it.
[package]
name = "wai-byte-exact-conformance"
version = "0.1.0"
edition = "2024"
rust-version = "1.97"
license = "Apache-2.0"
publish = false
# The included wai-rs sources carry `cfg(kani)` items (set only by the model
# checker in wai-verify). Declared so this crate's builds do not warn on it.
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.10"
# The integer operator set the included decoders run their networks through
# (`wai-rs/src/int_ops.rs`, included at the crate root). no_std, no dependencies.
wai-ops = { path = "../wai-ops" }
[features]
# wai-rs's test-only switch for the integer decoders' direct decodes (`int_synth::legacy`),
# declared so the included source's `cfg` names a known feature. The goldens here decode
# as a sink does, through the integer operator set; the crate's own tests compile the
# direct decode's unit tests under `cfg(test)`.
legacy_int = []