From 9714b2b0a4e928c2e97da8e4aad1b3772e2d8c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 30 Sep 2026 05:24:02 +0300 Subject: [PATCH] ec-av1: bind the 10-bit film gate's pin names as literals so the fixture census can prove them 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.rs | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 6898be2f..95ba545e 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -46931,12 +46931,28 @@ exit 0 if !aomdec_available(NAME) { return; } - for (pin, frames, shown) in [ - ("reelc_sb128_inter_witness.obu", 16usize, 15usize), - ("gm_small_side_witness.obu", 34, 33), - ] { - let stream = std::fs::read(crate_pin(pin)) - .unwrap_or_else(|e| panic!("{NAME}: reading {pin}: {e}")); + // The pin paths are BOUND HERE, from literals, rather than built from + // the loop variable: `crate_pin`'s argument has to be a literal the + // fixture-library census can resolve, or invariant 4 reports this gate + // as UNPROVEN ("name built at runtime -- this census cannot resolve + // it") and a preflight that checks code shape goes RED. + let pins: [(&str, std::path::PathBuf, usize, usize); 2] = [ + ( + "reelc_sb128_inter_witness.obu", + crate_pin("reelc_sb128_inter_witness.obu"), + 16usize, + 15usize, + ), + ( + "gm_small_side_witness.obu", + crate_pin("gm_small_side_witness.obu"), + 34usize, + 33usize, + ), + ]; + for (pin, path, frames, shown) in pins { + let stream = + std::fs::read(&path).unwrap_or_else(|e| panic!("{NAME}: reading {pin}: {e}")); let (decoded, hidden) = decode_all_frames_vs_oracle(&stream, NAME); assert_eq!( (decoded, hidden),