# step: opus deep redundancy · wai-rs and dred_verify.py # order: 220 # features: dred_exact # release-features: dred_exact # paths: wai/extensions/opus-dred.md # # wai.audio.opus.dred.int (extensions/opus-dred.md): first the draft's weights file and # test vectors, which the corpus names by SHA-256 and does not hold, fetched from the # draft's locations and checked against its digests (live-conformance/dred/fetch.sh). # Then the reference module's unit tests (the range decoder against its encoder, the # extension draft's worked examples, payloads round-trip, weights quantized from their # bits, the activation tables, the driver on a synthetic set), tests/dred_exact.rs (the # corpus regenerates byte for byte from its seeds and the weights and no other file is # there, every payload and case reaches its outcome, §8 lists exactly the module's codes, # §4 states its digests), and in release tests/dred_exact_measure.rs (every record of the # draft's test vectors decoded through the profile and through the floating-point # network: the profile passes the draft's feature test, and §6's table is what it # measures). Then the corpus's second implementation, dred_verify.py, written from the # extension's text and sharing no code with wai-rs, which recomputes every outcome, # digest and row in its own integer arithmetic and requires every mutated copy of the # corpus to fail; standard library only, run isolated (-I). # # The paths this step brings to the workflow's trigger, and why: # wai/extensions/opus-dred.md: tests/dred_exact.rs requires this extension's §8 to list the codes # the reference reports and its §4 to state the reference's digests, tests/dred_exact_measure.rs # its §6 table, dred_verify.py reads §4 and §8, and the registry's tests read SPEC §5 against # it. set -euo pipefail d="${RUNNER_TEMP:-/tmp}/dred" bash live-conformance/dred/fetch.sh "$d" vectors w="$d/dred_unquantized_weights.bin" (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib dred_exact::) (cd wai-rs && WAI_DRED_WEIGHTS="$w" cargo test --release --no-default-features --features "$WAI_RELEASE_FEATURES" --test dred_exact) (cd wai-rs && WAI_DRED_WEIGHTS="$w" WAI_DRED_VECTORS="$d" cargo test --release --no-default-features --features "$WAI_RELEASE_FEATURES" --test dred_exact_measure) python3 -I live-conformance/dred_verify.py live-conformance/dred "$w"