From 0e6cd71dff76766ffe3690b2aaae7f1148efa1fc Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Mon, 27 Jul 2026 17:36:15 -0400 Subject: [PATCH] wai byte-exact conformance: fix stale #[path] includes (was red on every arch) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The byte-equality suite failed on all four arches — linux, linux-arm64, macOS/arm64, Windows — which ruled out a determinism bug from the start: a cross-platform divergence cannot fail the *reference* platform. It was a compile error, latent since the neural/semantic reconcile onto main and invisible because Actions had never run. Two stale `#[path]` facts: - `rans.rs` moved from `wai-rs/src/neural/` to `wai-rs/src/`, but the include still pointed at the old `neural/rans.rs` -> file-not-found. - once that resolved, `rans.rs`'s own integer-entropy round-trip test references `crate::int_entropy`, a sibling module the shim crate never included. Added it from wai-rs verbatim -- it is pure-integer and self-contained (its only `crate::` mentions are doc-links), so it fits the crate's single-source-of-truth rule exactly like the neural sources. No source logic changed; only the include wiring. Verified on the reference platform (arm64 macOS): `cargo test --release` -> 14/14 pass, including the three goldens (rANS vs upstream encoder, int_synth output hash, JPEG-AI mANS reference stream). Because the paths sit under `wai/byte-exact-conformance/**`, this PR re-runs both wai-conformance and wai-byte-equality across the full matrix. Co-Authored-By: Claude Opus 4.8 --- wai/byte-exact-conformance/src/lib.rs | 7 +++++++ wai/byte-exact-conformance/src/neural/mod.rs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/wai/byte-exact-conformance/src/lib.rs b/wai/byte-exact-conformance/src/lib.rs index e1dd0699f..9e2614ce2 100644 --- a/wai/byte-exact-conformance/src/lib.rs +++ b/wai/byte-exact-conformance/src/lib.rs @@ -10,5 +10,12 @@ pub mod neural; +// rans.rs's integer-entropy round-trip test references `crate::int_entropy` +// (the scale-bucketing that makes a conditional codec cross-hardware exact). +// Included from wai-rs verbatim, same single-source-of-truth rule as the +// neural sources — it is itself pure-integer and self-contained. +#[path = "../../wai-rs/src/int_entropy.rs"] +pub mod int_entropy; + mod golden; mod jpegai_golden; diff --git a/wai/byte-exact-conformance/src/neural/mod.rs b/wai/byte-exact-conformance/src/neural/mod.rs index 7ee0995a6..7007dbecd 100644 --- a/wai/byte-exact-conformance/src/neural/mod.rs +++ b/wai/byte-exact-conformance/src/neural/mod.rs @@ -31,7 +31,7 @@ pub mod image { } // The actual integer decode paths, included from wai-rs verbatim. -#[path = "../../../wai-rs/src/neural/rans.rs"] +#[path = "../../../wai-rs/src/rans.rs"] pub mod rans; #[path = "../../../wai-rs/src/int_synth.rs"] pub mod int_synth; -- 2.54.0 (Apple Git-157)