forge
Explore
Log in

Don't you dare go Hollow

ec-av1: bind the 10-bit film gate's pin names as literals so the fixture census can prove them

Browse files at this commit

9714b2b0a4e928c2e97da8e4aad1b3772e2d8c90Ahmet Kaan GümüşParent: 1d5fb9c
lane-film10fix's decode-order gate built its pin name from a loop variable, so
`crate_pin(pin)` handed the helper a runtime string: the fixture-library census cannot
resolve it and invariant 4 reported the gate as UNPROVEN ('name built at runtime -- this
census cannot resolve it'), which turns the suite preflight RED on a tree whose tests all
pass. Same class as the earlier flags-built-by-format! blind spots: the gate is correct,
the CENSUS cannot see it.

Fix: the pin paths are bound once from literals into an array and the loop iterates that,
so the argument to crate_pin is a literal at the call site. `the_two_10bit_film_pins_match_aomdec_on_every_decode_order_frame`
still passes (1 passed), and invariant 4 no longer names it.
crates/ec-av1/src/stream.rsmodified+22 -6
@@ -46931,12 +46931,28 @@ exit 0
46931 if !aomdec_available(NAME) {46931 if !aomdec_available(NAME) {
46932 return;46932 return;
46933 }46933 }
46934- for (pin, frames, shown) in [46934+ // The pin paths are BOUND HERE, from literals, rather than built from
46935- ("reelc_sb128_inter_witness.obu", 16usize, 15usize),46935+ // the loop variable: `crate_pin`'s argument has to be a literal the
46936- ("gm_small_side_witness.obu", 34, 33),46936+ // fixture-library census can resolve, or invariant 4 reports this gate
46937- ] {46937+ // as UNPROVEN ("name built at runtime -- this census cannot resolve
46938- let stream = std::fs::read(crate_pin(pin))46938+ // it") and a preflight that checks code shape goes RED.
46939- .unwrap_or_else(|e| panic!("{NAME}: reading {pin}: {e}"));46939+ let pins: [(&str, std::path::PathBuf, usize, usize); 2] = [
46940+ (
46941+ "reelc_sb128_inter_witness.obu",
46942+ crate_pin("reelc_sb128_inter_witness.obu"),
46943+ 16usize,
46944+ 15usize,
46945+ ),
46946+ (
46947+ "gm_small_side_witness.obu",
46948+ crate_pin("gm_small_side_witness.obu"),
46949+ 34usize,
46950+ 33usize,
46951+ ),
46952+ ];
46953+ for (pin, path, frames, shown) in pins {
46954+ let stream =
46955+ std::fs::read(&path).unwrap_or_else(|e| panic!("{NAME}: reading {pin}: {e}"));
46940 let (decoded, hidden) = decode_all_frames_vs_oracle(&stream, NAME);46956 let (decoded, hidden) = decode_all_frames_vs_oracle(&stream, NAME);
46941 assert_eq!(46957 assert_eq!(
46942 (decoded, hidden),46958 (decoded, hidden),