forge
Explore
Log in

Don't you dare go Hollow

Merge lane-av1pinslive @ 2e5509e9 — un-ignore five stale-ignore pins, commit four remaining untracked pin fixtures

Browse files at this commit

cc8c6ee3be473e1722b4de593ce4c3df0bbe729fAhmet Kaan GümüşParent: 913d9771b5bc7e
crates/ec-av1/fixtures/golden4-pin.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/golden6-mismatch.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/golden7-forwarding-mismatch.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/lr-sgr-r7.obuadded+0 -0

Binary file changed

crates/ec-av1/src/stream.rsmodified+181 -65
@@ -9126,6 +9126,22 @@ pub(crate) mod tests {
91269126 /// the machine's scratchpad is reaped -- three gates sat at `rc=0` having
91279127 /// tested nothing for exactly that reason (lane-av1pins). Falls back to
91289128 /// `pin_dir()` so a locally re-captured stream still overrides.
9129+ /// Read a pin that a gate cannot proceed without. A missing pin is a
9130+ /// HARD failure naming the path and the generator, never a raw io panic
9131+ /// and never a silent skip: `EC_AV1_GATE_DUMP_PIN` points the gate at a
9132+ /// freshly captured stream, and a runner without the committed copy must
9133+ /// say so instead of reporting green having tested nothing.
9134+ fn require_pin(path: &std::path::Path, name: &str) -> Vec<u8> {
9135+ std::fs::read(path).unwrap_or_else(|e| {
9136+ panic!(
9137+ "no pinned bytes at {} ({e}) -- set EC_AV1_GATE_DUMP_PIN to a freshly \
9138+ captured stream, or restore the committed copy at \
9139+ crates/ec-av1/fixtures/{name}",
9140+ path.display()
9141+ )
9142+ })
9143+ }
9144+
91299145 fn crate_pin(name: &str) -> std::path::PathBuf {
91309146 let in_crate = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
91319147 .join("fixtures")
@@ -23675,11 +23691,14 @@ pub(crate) mod tests {
2367523691 /// `EC_AV1_GATE_DUMP=$SP/golden3-pin.obu` off
2367623692 /// [`a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact`]
2367723693 /// (seed 47, frame 1 U). Deterministic and static -- no aomenc/ffmpeg
23678- /// re-encode involved, only re-decodes fixed bytes on disk. Still
23679- /// `#[ignore]`d: it is a BISECT aid, not a suite gate. What changed under
23680- /// lane-av1pins is WHERE the bytes live -- they are now committed at
23681- /// `crates/ec-av1/fixtures/golden3-pin.obu` instead of a scratchpad that
23682- /// tmpfs reaps, so the gate does real work on any runner.
23694+ /// re-encode involved, only re-decodes fixed bytes on disk. What changed
23695+ /// under lane-av1pinslive is that the gate is LIVE: the bytes are committed
23696+ /// at `crates/ec-av1/fixtures/golden3-pin.obu` instead of a scratchpad that
23697+ /// tmpfs reaps, so it runs in the ordinary suite on any runner that has
23698+ /// ffmpeg (guarded by `have_ffmpeg()`, so `EC_AV1_REQUIRE_FFMPEG=1` turns
23699+ /// its absence into a hard failure rather than a silent skip). It costs
23700+ /// ~0.15 s, touches no process-global, and reads no counter -- none of the
23701+ /// conditions that make this crate ignore its other manual gates.
2368323702 ///
2368423703 /// The original capture (2026-08-28, `bec27414`) is NOT reproducible: it
2368523704 /// predates `5ae053d3` "route all 20 gradients gate fixtures through
@@ -23693,7 +23712,6 @@ pub(crate) mod tests {
2369323712 /// `a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact`
2369423713 /// prints for that seed -- which is what proves the recipe is that gate's.
2369523714 #[test]
23696- #[ignore = "bisect aid, not a suite gate; run it with --ignored"]
2369723715 fn pinned_golden3_stream_decodes_pixel_exact() {
2369823716 let path = std::env::var("EC_AV1_GATE_DUMP_PIN")
2369923717 .map(std::path::PathBuf::from)
@@ -23737,22 +23755,22 @@ pub(crate) mod tests {
2373723755 /// `EC_AV1_GATE_DUMP=$SP/golden4-pin.obu` off
2373823756 /// [`a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact`]
2373923757 /// (seed 43, frame 3 luma) the round the GOLDEN mask lifted. Deterministic
23740- /// and static -- `#[ignore]`d, run manually.
23758+ /// and static.
23759+ ///
23760+ /// LIVE since lane-av1pinslive r3: the bytes are committed at
23761+ /// `crates/ec-av1/fixtures/golden4-pin.obu` (137 bytes; sha256
23762+ /// `1754023e44e46edaebc2c05065bf1c65db1a41354577cbf71c0e8ebe737ae14a`,
23763+ /// recovered byte-for-byte from the runner library), so the old
23764+ /// "reads a pinned fixture path outside the repo" reason is false. Costs
23765+ /// ~0.10 s, touches no process-global, reads `non_last_ref_hits` for
23766+ /// diagnostic output only (never asserted), and calls no aomenc.
2374123767 #[test]
23742- #[ignore = "reads a pinned fixture path outside the repo; run manually"]
2374323768 fn pinned_golden4_stream_decodes_pixel_exact() {
2374423769 use crate::decode::non_last_ref_hits;
2374523770 let path = std::env::var("EC_AV1_GATE_DUMP_PIN")
2374623771 .map(std::path::PathBuf::from)
23747- .unwrap_or_else(|_| pin_dir().join("golden4-pin.obu"));
23748- let Ok(stream) = std::fs::read(&path) else {
23749- eprintln!(
23750- "SKIP pinned_golden4_stream_decodes_pixel_exact: no pinned bytes at {} \
23751- -- re-capture with EC_AV1_GATE_DUMP off the cdf-forwarding gate",
23752- path.display()
23753- );
23754- return;
23755- };
23772+ .unwrap_or_else(|_| crate_pin("golden4-pin.obu"));
23773+ let stream = require_pin(&path, "golden4-pin.obu");
2375623774 if !have_ffmpeg() {
2375723775 eprintln!("SKIP pinned_golden4_stream_decodes_pixel_exact: no ffmpeg");
2375823776 return;
@@ -23775,15 +23793,22 @@ pub(crate) mod tests {
2377523793 /// by the forwarding gate once film grain is out of the way (1/20 real
2377623794 /// aomenc streams, frame 3 luma, apply_grain=false, `non_last_ref_hits`
2377723795 /// delta=2). `GOLDEN_FRAME` refuses by name until this decodes exact.
23796+ ///
23797+ /// LIVE since lane-av1pinslive r3. The old shape was the worst of the
23798+ /// class: a `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/...")`
23799+ /// literal, which points at the GITIGNORED root and can therefore never be
23800+ /// satisfied by a committed pin, combined with a bare `.expect()`. The
23801+ /// bytes are now committed at
23802+ /// `crates/ec-av1/fixtures/golden7-forwarding-mismatch.obu` (152 bytes;
23803+ /// sha256 `81b3bf657a85e95085287b30d97dee93ba5aea0ed1db1e1f4fcd19a06afc17be`,
23804+ /// recovered byte-for-byte from the runner library).
2377823805 #[test]
23779- #[ignore = "reads a pinned fixture path outside the repo; run manually"]
2378023806 fn pinned_golden7_stream_decodes_pixel_exact() {
2378123807 use crate::decode::non_last_ref_hits;
23782- let path = concat!(
23783- env!("CARGO_MANIFEST_DIR"),
23784- "/../../fixtures/golden7-forwarding-mismatch.obu"
23785- );
23786- let stream = std::fs::read(path).expect("reading pinned stream");
23808+ let path = std::env::var("EC_AV1_GATE_DUMP_PIN")
23809+ .map(std::path::PathBuf::from)
23810+ .unwrap_or_else(|_| crate_pin("golden7-forwarding-mismatch.obu"));
23811+ let stream = require_pin(&path, "golden7-forwarding-mismatch.obu");
2378723812 if !have_ffmpeg() {
2378823813 eprintln!("SKIP pinned_golden7_stream_decodes_pixel_exact: no ffmpeg");
2378923814 return;
@@ -30277,35 +30302,103 @@ pub(crate) mod tests {
3027730302 /// `EC_LR_CALL_DUMP=1` set (see `restoration.rs`'s `apply_sgrproj_stripe`)
3027830303 /// to get the real window on stderr, call-uniquely keyed to `xqd ==
3027930304 /// [-16,-32]` rather than any coordinate.
30305+ /// lane-av1pinslive r4: this gate asserted NOTHING. It `eprintln!`d per-frame
30306+ /// mismatch flags and returned, so it could not go red on a decode regression
30307+ /// -- which is why r3 left it `#[ignore]`d on that fact rather than un-ignoring
30308+ /// it. It now carries the same three things its three siblings have: a pinned
30309+ /// FRAME COUNT, a length assert before the zip, and per-plane per-frame pixel
30310+ /// asserts. The diagnostic print is kept, and now runs BEFORE the asserts so a
30311+ /// failure still names the shape of the divergence.
30312+ ///
30313+ /// The frame count is the substantive fix. The old body passed `pics.len()` as
30314+ /// ffmpeg's EXPECTED count:
30315+ /// let reference = ffmpeg_decode_sequence(&stream, 192, 128, pics.len());
30316+ /// so a decoder that emitted ZERO frames asked ffmpeg for zero frames, the zip
30317+ /// compared no pairs, and the gate passed having proved nothing -- the exact
30318+ /// vacuous-pass shape the `cmpaudit` lane swept elsewhere in this crate. The
30319+ /// count now comes from the FIXTURE (`FRAMES`), so losing the frame reds on the
30320+ /// count instead of comparing nothing.
30321+ ///
30322+ /// On "does it compare only frame 0": the loop always visited every frame; this
30323+ /// pin simply holds one (`frame 0` was the only line the pre-r4 run printed).
30324+ /// The loop is unchanged in that respect and still visits every frame it gets.
30325+ ///
30326+ /// The `EC_LR_CALL_DUMP=1` window is unchanged and still needs that env -- but
30327+ /// it is a debugging session layered on a real gate now, not the gate itself.
3028030328 #[test]
30281- #[ignore = "reads a pinned fixture under the gitignored fixtures dir; run manually with EC_LR_CALL_DUMP=1"]
3028230329 fn pinned_lr_sgr_stream_call_unique_dump() {
30283- let path = concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/lr-sgr-r7.obu");
30284- let stream = std::fs::read(path).expect("reading pinned lr-sgr-r7.obu");
30330+ const NAME: &str = "pinned_lr_sgr_stream_call_unique_dump";
30331+ const W: usize = 192;
30332+ const H: usize = 128;
30333+ /// Measured: the pre-r4 run printed `frame 0` and no other frame line.
30334+ const FRAMES: usize = 1;
30335+ let path = std::env::var("EC_AV1_GATE_DUMP_PIN")
30336+ .map(std::path::PathBuf::from)
30337+ .unwrap_or_else(|_| crate_pin("lr-sgr-r7.obu"));
30338+ let stream = require_pin(&path, "lr-sgr-r7.obu");
3028530339 let pics = decode_stream(&stream).expect("pinned lr-sgr-r7.obu must decode");
30286- if have_ffmpeg() {
30287- let reference = ffmpeg_decode_sequence(&stream, 192, 128, pics.len());
30288- for (i, (got, want)) in pics.iter().zip(&reference).enumerate() {
30289- let y_mismatch = got.y != want.y;
30290- let u_mismatch = got.u != want.u;
30291- let v_mismatch = got.v != want.v;
30292- eprintln!(
30293- "frame {i}: y_mismatch={y_mismatch} u_mismatch={u_mismatch} v_mismatch={v_mismatch}"
30294- );
30295- if y_mismatch {
30296- let n = got.y.iter().zip(&want.y).filter(|(a, b)| a != b).count();
30297- eprintln!(" {n} luma bytes differ / {}", got.y.len());
30298- }
30299- if v_mismatch {
30300- let w = 96usize; // chroma plane width (192/2)
30301- for (idx, (a, b)) in got.v.iter().zip(&want.v).enumerate() {
30302- if a != b {
30303- eprintln!(" V[{},{}] got={a} want={b}", idx / w, idx % w);
30304- }
30340+ assert_eq!(
30341+ pics.len(),
30342+ FRAMES,
30343+ "{NAME}: decoded {} frame(s), the pinned stream holds {FRAMES} -- a short \
30344+ decode would otherwise ask ffmpeg for the same short count and compare \
30345+ nothing",
30346+ pics.len()
30347+ );
30348+ for f in &pics {
30349+ assert_eq!((f.width, f.height), (W, H), "{NAME}: dimensions");
30350+ }
30351+ if !have_ffmpeg() {
30352+ eprintln!(
30353+ "SKIP {NAME}: no ffmpeg -- the pixel compare IS this gate's claim, so it \
30354+ proves nothing here; set EC_AV1_REQUIRE_FFMPEG=1 to make that a hard \
30355+ failure instead"
30356+ );
30357+ return;
30358+ }
30359+ let reference = ffmpeg_decode_sequence(&stream, W, H, FRAMES);
30360+ assert_eq!(
30361+ reference.len(),
30362+ FRAMES,
30363+ "{NAME}: ffmpeg returned {} frame(s), expected {FRAMES}",
30364+ reference.len()
30365+ );
30366+ for (i, (got, want)) in pics.iter().zip(&reference).enumerate() {
30367+ let y_mismatch = got.y != want.y;
30368+ let u_mismatch = got.u != want.u;
30369+ let v_mismatch = got.v != want.v;
30370+ eprintln!(
30371+ "frame {i}: y_mismatch={y_mismatch} u_mismatch={u_mismatch} v_mismatch={v_mismatch}"
30372+ );
30373+ if y_mismatch {
30374+ let n = got.y.iter().zip(&want.y).filter(|(a, b)| a != b).count();
30375+ eprintln!(" {n} luma bytes differ / {}", got.y.len());
30376+ }
30377+ if v_mismatch {
30378+ let w = 96usize; // chroma plane width (192/2)
30379+ for (idx, (a, b)) in got.v.iter().zip(&want.v).enumerate() {
30380+ if a != b {
30381+ eprintln!(" V[{},{}] got={a} want={b}", idx / w, idx % w);
3030530382 }
3030630383 }
3030730384 }
30385+ assert_eq!(
30386+ got.y, want.y,
30387+ "{NAME} frame {i} luma vs ffmpeg (pinned lr-sgr)"
30388+ );
30389+ assert_eq!(
30390+ got.u, want.u,
30391+ "{NAME} frame {i} U vs ffmpeg (pinned lr-sgr)"
30392+ );
30393+ assert_eq!(
30394+ got.v, want.v,
30395+ "{NAME} frame {i} V vs ffmpeg (pinned lr-sgr)"
30396+ );
3030830397 }
30398+ eprintln!(
30399+ "{NAME}: {FRAMES} frame(s) byte-exact vs ffmpeg from {}",
30400+ path.display()
30401+ );
3030930402 }
3031030403
3031130404 /// lane-realworld r2: `read_cdef` (spec 5.11.56) ported -- per-superblock
@@ -33213,11 +33306,19 @@ pub(crate) mod tests {
3321333306 eprintln!("SKIP a_real_aomenc_stream_with_film_grain_decodes_pixel_exact: no ffmpeg");
3321433307 return;
3321533308 }
33216- let data = std::fs::read(concat!(
33217- env!("CARGO_MANIFEST_DIR"),
33218- "/../../fixtures/golden6-mismatch.obu"
33219- ))
33220- .unwrap();
33309+ // lane-av1pinslive r3: this gate was LIVE while reading a GITIGNORED
33310+ // pin through a `concat!` literal and `.unwrap()` -- a clean checkout
33311+ // with no runner library PANICKED here rather than skipping. The bytes
33312+ // are now committed at `crates/ec-av1/fixtures/golden6-mismatch.obu`
33313+ // (452 bytes; sha256
33314+ // `c56909b98542192b03f3a945e153475aa57a58a1586bf166513297296cb225b3`,
33315+ // recovered byte-for-byte from the runner library).
33316+ let data = require_pin(
33317+ &std::env::var("EC_AV1_GATE_DUMP_PIN")
33318+ .map(std::path::PathBuf::from)
33319+ .unwrap_or_else(|_| crate_pin("golden6-mismatch.obu")),
33320+ "golden6-mismatch.obu",
33321+ );
3322133322 // Truncate right after the first `Frame` OBU (the key frame): every
3322233323 // byte up to there is sequence header + frame-0, which is a complete,
3322333324 // independently decodable single-frame stream.
@@ -39492,7 +39593,8 @@ pub(crate) mod tests {
3949239593 /// decodes_pixel_exact` -- fast red/green loop for the bisect, and lets
3949339594 /// `EC_AV1_TRACE=1` be set for one run without re-driving the encoder.
3949439595 ///
39495- /// lane-av1pins: the bytes are now committed at
39596+ /// LIVE since lane-av1pinslive (it was `#[ignore]`d from lane-sbpart r4
39597+ /// only because the bytes lived in a scratchpad). Bytes committed at
3949639598 /// `crates/ec-av1/fixtures/sbpart-pin.obu` (238 bytes; sha256
3949739599 /// `62238fc077f45d89745d4d254b9c0465464003529da3b42d0a65631fbb7e16e9`),
3949839600 /// re-encoded 2026-09-29 from the source gate's own recipe
@@ -39503,7 +39605,6 @@ pub(crate) mod tests {
3950339605 /// 192x128 cell, so this pin is a 192x128 re-run of its recipe, not a
3950439606 /// replay of the original mismatch bytes.
3950539607 #[test]
39506- #[ignore = "bisect aid, not a suite gate; run it with --ignored"]
3950739608 fn pinned_sbpart_stream_decodes_pixel_exact() {
3950839609 let path = std::env::var("EC_AV1_GATE_DUMP_PIN")
3950939610 .map(std::path::PathBuf::from)
@@ -46137,7 +46238,9 @@ pub(crate) mod tests {
4613746238 let mut parser = Av1Parser::new();
4613846239 let mut pos = 0usize;
4613946240 while pos < stream.len() {
46140- let obu = parser.parse_obu(&stream[pos..]).expect("parsing our own OBUs");
46241+ let obu = parser
46242+ .parse_obu(&stream[pos..])
46243+ .expect("parsing our own OBUs");
4614146244 pos += obu.total_size;
4614246245 }
4614346246 parser
@@ -46506,9 +46609,8 @@ pub(crate) mod tests {
4650646609 h + v
4650746610 };
4650846611 crate::decode::reset_rect4_inter_own_chroma444_hits();
46509- let frames = decode_stream(&stream).unwrap_or_else(|e| {
46510- panic!("{NAME}: {fixture} no longer decodes cleanly: {e}")
46511- });
46612+ let frames = decode_stream(&stream)
46613+ .unwrap_or_else(|e| panic!("{NAME}: {fixture} no longer decodes cleanly: {e}"));
4651246614 let own_chroma = crate::decode::rect4_inter_own_chroma444_hits();
4651346615 let strips = {
4651446616 let (h, v, _, _) = crate::decode::inter16_rect4_counters();
@@ -46920,8 +47022,9 @@ pub(crate) mod tests {
4692047022 let _guard = lock_gate_counters();
4692147023 let before_sr = crate::superres::superres_hits();
4692247024 let before_scaled = crate::mc::predict_scaled_hits();
46923- let frames = decode_stream(&stream)
46924- .unwrap_or_else(|e| panic!("{name}: the pinned 4:4:4 superres stream was refused: {e}"));
47025+ let frames = decode_stream(&stream).unwrap_or_else(|e| {
47026+ panic!("{name}: the pinned 4:4:4 superres stream was refused: {e}")
47027+ });
4692547028 let scaled_up = crate::superres::superres_hits() - before_sr;
4692647029 let scaled_mc = crate::mc::predict_scaled_hits() - before_scaled;
4692747030 assert!(
@@ -47087,9 +47190,21 @@ pub(crate) mod tests {
4708747190 }
4708847191 let y4m = Command::new("ffmpeg")
4708947192 .args([
47090- "-v", "error", "-f", "lavfi", "-i", "testsrc2=size=256x128:rate=25",
47091- "-frames:v", "4", "-pix_fmt", "yuv444p", "-strict", "-1", "-f",
47092- "yuv4mpegpipe", "-",
47193+ "-v",
47194+ "error",
47195+ "-f",
47196+ "lavfi",
47197+ "-i",
47198+ "testsrc2=size=256x128:rate=25",
47199+ "-frames:v",
47200+ "4",
47201+ "-pix_fmt",
47202+ "yuv444p",
47203+ "-strict",
47204+ "-1",
47205+ "-f",
47206+ "yuv4mpegpipe",
47207+ "-",
4709347208 ])
4709447209 .stdin(Stdio::null())
4709547210 .stdout(Stdio::piped())
@@ -47101,10 +47216,11 @@ pub(crate) mod tests {
4710147216 "{NAME}: ffmpeg refused to generate the y4m source: {}",
4710247217 String::from_utf8_lossy(&y4m.stderr)
4710347218 );
47104- let pinned =
47105- std::fs::read(std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
47106- .join("fixtures/444_lossy_superres_mode2_256x128.obu"))
47107- .expect("pinned fixture disappeared between the two reads");
47219+ let pinned = std::fs::read(
47220+ std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR"))
47221+ .join("fixtures/444_lossy_superres_mode2_256x128.obu"),
47222+ )
47223+ .expect("pinned fixture disappeared between the two reads");
4710847224 for extra in [
4710947225 vec![],
4711047226 vec!["--superres-denominator=9"],
lanes/av1pins.report.mdmodified+357 -0
@@ -202,3 +202,360 @@ probes/benchmarks excluded from the earlier release triage.
202202
203203 Procedure saved as managed skills `stale-ignore-reason-vs-stale-comment` and
204204 `fixture-absent-silent-skip-class`.
205+
206+---
207+
208+# r2 — the two pins were still `#[ignore]`d, so a plain run executed nothing
209+
210+Branch `lane-av1pinslive` off current main `a5867794`. Commit `2e9086c0`. Tests
211+only, no decoder change, no push.
212+
213+A clean-checkout verification (13 branches, 39 gates) reported that the two gates
214+lane-av1pins recovered are `#[ignore]`d: they pass under `--ignored` and their pins
215+are committed, but **in a plain suite run they do not execute**. That is correct
216+and it is the same hole in a different costume. r1's before/after table was
217+measured with `--ignored` and did not say so, which made it read as a fix when it
218+was only a fix *under a flag*.
219+
220+## 1. The facts
221+
222+| gate | `#[ignore]` on main `a5867794`? | reason string |
223+|---|---|---|
224+| `pinned_golden3_stream_decodes_pixel_exact` | **yes** | `bisect aid, not a suite gate; run it with --ignored` |
225+| `pinned_sbpart_stream_decodes_pixel_exact` | **yes** | `bisect aid, not a suite gate; run it with --ignored` |
226+| `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` | **no — already live** | — |
227+
228+**The reason string is stale, and it went stale twice.** It was introduced at
229+`c9fede5d` (2026-08-28, lane-av1golden3) as
230+`reads a pinned fixture path outside the repo; run manually`, with the doc comment
231+giving the real cause: *"the file only exists on this machine's scratchpad"*. True
232+then. It stopped being true at `78c805bd` (lane-av1pins), which committed both pins
233+under `crates/ec-av1/fixtures/` — a path that travels in the runner tarball, so the
234+bytes are on every runner.
235+
236+**The second staleness is mine.** lane-av1pins replaced the reason with *"bisect aid,
237+not a suite gate"* — a judgement, not a fact, and wrong on this tree: with the bytes
238+committed these are ordinary decode-exactness gates that cost 0.10–0.15 s, not
239+bisect aids. A clean-checkout run cannot see a committed pin, so the lane that
240+*fixed* the pin hole left the ignore hole standing in the same commit.
241+
242+## 2. No condition that makes this crate ignore a gate applies
243+
244+Measured on `a5867794`, both gate bodies:
245+
246+* **no process-global** — neither calls `force_sb128` nor `knob_write`. This is the
247+ condition that legitimately earns 11 other ignores in this crate.
248+* **no counter, no `lock_gate_counters()`** — so `--test-threads=1` is not required
249+ of them either.
250+* **no aomenc** — they decode committed bytes and compare to ffmpeg, so they are not
251+ real-aomenc gates and stay out of the `gate_coverage` census either way.
252+* **not slow** — 0.10–0.15 s each, against 9 ignored siblings that declare
253+ minutes-per-item.
254+* **ffmpeg guarded** — `have_ffmpeg()` already honours `EC_AV1_REQUIRE_FFMPEG`, so a
255+ missing ffmpeg is a hard failure, not a silent skip.
256+
257+Precedent in-tree: `gate_coverage.rs` records the 10-bit LR gate *"was `#[ignore]`d on
258+that branch and passes un-ignored on main, which carries the fix"* — the same
259+un-ignore-once-the-blocker-clears move.
260+
261+## 3. Before / after, plain run
262+
263+Both commands are **plain** — no `--ignored`, no `--exact` needed to select them:
264+
265+```
266+cargo test -p ec-av1 --lib --release -- --exact stream::tests::pinned_golden3_stream_decodes_pixel_exact --test-threads=1 --nocapture
267+ test ...pinned_golden3_stream_decodes_pixel_exact ... pinned_golden3_stream_decodes_pixel_exact:
268+ 4 frame(s) byte-exact vs ffmpeg from .../crates/ec-av1/fixtures/golden3-pin.obu
269+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 730 filtered out; finished in 0.15s
270+
271+cargo test -p ec-av1 --lib --release -- --exact stream::tests::pinned_sbpart_stream_decodes_pixel_exact --test-threads=1 --nocapture
272+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 730 filtered out; finished in 0.10s
273+ (EC_SBPART_DIAG=1 additionally prints "DIAG frame 0: 0 luma mismatches ... of 192x128"
274+ plus per-SB-column counts — all 24576 luma samples walked)
275+```
276+
277+| | main `a5867794` plain run | branch `2e9086c0` plain run |
278+|---|---|---|
279+| `pinned_golden3` | *not executed* (ignored) | 1 passed, 0.15s, prints 4 frames byte-exact |
280+| `pinned_sbpart` | *not executed* (ignored) | 1 passed, 0.10s |
281+| `a_real_aomenc_lossless_444_key_frame...` | 1 passed, 0.21s | 1 passed, 0.21s (unchanged) |
282+
283+Three further confirmations that they are genuinely live rather than merely
284+un-flagged: they execute under a plain **substring** filter (`-- pinned_`, no
285+`--exact`, no `--ignored`); neither appears in `-- --ignored` any more (0 matches);
286+and `#[ignore]` in `stream.rs` drops **41 → 39**.
287+
288+## 4. A regression I caused and then disproved — recorded because it nearly shipped
289+
290+The first `gate_coverage` run **on this branch** showed
291+`FAILED. 8 passed; 2 failed` (`never_exercised_8bit_matches_the_gate_recipes`,
292+`never_exercised_10bit_matches_the_gate_recipes`), while the same filter on main
293+passed 10/10. Un-ignoring changes the census input, so I took that as a regression
294+I had introduced.
295+
296+It was not. A 554-second `--ignored` full-suite run was executing **against the same
297+worktree and the same `CARGO_TARGET_DIR` at that moment**. Re-run after it finished:
298+`gate_coverage` **10 passed / 0 failed on 6 consecutive runs**, and alone with
299+`--exact` it also passes. These are compile-time source scans (`include_str!`),
300+which cannot be perturbed by runtime state — consistent with a build/link race on
301+the shared target dir, not with a logic change. Recorded because "I broke a meta-gate"
302+was the correct reading of the evidence at the time, and the reason it was wrong is
303+worth keeping.
304+
305+Final meta-gate state after the change: `gate_coverage` **10 passed**,
306+`refusal_inventory` **15 passed**, both green.
307+
308+## 5. Follow-on found, NOT done here
309+
310+Three sibling pin gates carry the same stale reason **and** still read pins that are
311+not committed — so in a clean checkout each either skips or panics:
312+
313+| gate | pin | committed? | failure mode if un-ignored as-is |
314+|---|---|---|---|
315+| `pinned_golden4_stream_decodes_pixel_exact` | `golden4-pin.obu` | no | silent skip |
316+| `pinned_golden7_stream_decodes_pixel_exact` | `golden7-forwarding-mismatch.obu` | no | silent skip |
317+| `pinned_lr_sgr_stream_call_unique_dump` | `lr-sgr-r7.obu` | no | **panic** — `std::fs::read(path).expect(...)`, no graceful skip |
318+
319+All three read through `pin_dir()` or a `concat!(env!("CARGO_MANIFEST_DIR"),
320+"/../../fixtures/...")` literal, i.e. the gitignored root. `golden6-mismatch.obu` is
321+a fourth untracked pin. These are the same defect and the same fix; recovering them
322+is mechanical from the r1 recipes (golden4 and golden7 are siblings of golden3 off
323+the cdf-forwarding gate). Left out of this commit to keep it a reason-removal, and
324+handed back rather than folded in silently.
325+
326+---
327+
328+# r3 — the four remaining untracked pins, and the class closed
329+
330+Branch `lane-av1pinslive`, rebased onto current main `eccbd6c6`. Commit `f99a5ff9`.
331+Tests only, no decoder change, no push.
332+
333+r2 fixed two gates and handed back three siblings. All four untracked pins are now
334+committed, three gates are live, and one earns a factual ignore.
335+
336+## 1. The pins — RECOVERED, not re-encoded
337+
338+| path | sha256 | size |
339+|---|---|---|
340+| `crates/ec-av1/fixtures/golden4-pin.obu` | `1754023e44e46edaebc2c05065bf1c65db1a41354577cbf71c0e8ebe737ae14a` | 137 B |
341+| `crates/ec-av1/fixtures/golden6-mismatch.obu` | `c56909b98542192b03f3a945e153475aa57a58a1586bf166513297296cb225b3` | 452 B |
342+| `crates/ec-av1/fixtures/golden7-forwarding-mismatch.obu` | `81b3bf657a85e95085287b30d97dee93ba5aea0ed1db1e1f4fcd19a06afc17be` | 152 B |
343+| `crates/ec-av1/fixtures/lr-sgr-r7.obu` | `6b95b20e3377430ffae0b2ce86fad9502e0dedf13cd6c38ab7f5af4a8b21f33d` | 192 B |
344+
345+**`.gitignore` verified as Main described.** `main:.gitignore:12` is
346+`!crates/*/fixtures/**` — a negation, so `git check-ignore -v` printing that line
347+means NOT ignored. Confirmed by exit code and by the decisive test: a plain
348+`git add crates/ec-av1/fixtures/<pin>` staged all four with no `-f`.
349+
350+**Recovered, not re-encoded — and the order matters for provenance.** I first
351+reproduced golden4 and golden7 from the cdf-forwarding recipe (seeds 43–48, all of
352+which decode exact) and captured golden6 through a throwaway harness built on the
353+crate's own `panned_test_card` (the real recipe needs that Rust helper, not a
354+lavfi source). Then I found the **original bytes still on the runner libraries**
355+and fetched those instead. They are the actual historical mismatch witnesses; a
356+re-encode is a different stream that happens to exercise the same path, and
357+labelling it as the pin would be a false provenance claim.
358+
359+The originals also **self-validate**, which is the check a re-encode cannot pass:
360+`pinned_golden7`'s committed doc records `non_last_ref_hits` delta=2 for this
361+stream, and the recovered pin reproduces exactly `0->2` in a plain run.
362+
363+The throwaway capture harness was deleted before the commit (`grep -c zz_throwaway`
364+= 0).
365+
366+## 2. Three gates go live — same bar as r2
367+
368+| gate | on main `eccbd6c6` | on branch, PLAIN run |
369+|---|---|---|
370+| `pinned_golden4_stream_decodes_pixel_exact` | ignored, not executed | **1 passed, 0 failed, 0 ignored, 0.11s** — prints `non_last_ref_hits before=0 after=1` |
371+| `pinned_golden7_stream_decodes_pixel_exact` | ignored, not executed | **1 passed, 0 failed, 0 ignored, 0.10s** — prints `non_last_ref_hits before=0 after=2` |
372+| `a_real_aomenc_stream_with_film_grain_decodes_pixel_exact` | **live and PANICKING** | **1 passed, 0 failed, 0 ignored, 0.10s** |
373+
374+None touches a process-global, none calls aomenc, and the counter each reads
375+(`non_last_ref_hits`) is **printed, never asserted** — so there is no
376+counter-race exposure to justify an ignore. `#[ignore]` in `stream.rs`: **41 → 37**.
377+
378+**The film-grain gate was the worst shape in the class and was already LIVE.** It
379+read its pin through `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/...")`
380+and `.unwrap()` — the gitignored root, with no graceful skip. A clean checkout
381+with no runner library **panics**, it does not skip. That shape can never be
382+satisfied by a committed pin at all, which is exactly why it is now `crate_pin`.
383+
384+## 3. `require_pin` — the new shared shape
385+
386+```rust
387+fn require_pin(path: &std::path::Path, name: &str) -> Vec<u8> {
388+ std::fs::read(path).unwrap_or_else(|e| panic!(
389+ "no pinned bytes at {} ({e}) -- set EC_AV1_GATE_DUMP_PIN to a freshly \
390+ captured stream, or restore the committed copy at \
391+ crates/ec-av1/fixtures/{name}",
392+ path.display()
393+ ))
394+}
395+```
396+
397+A missing pin is a **hard failure naming the path and the generator**, never a raw
398+io panic and never a silent skip. Those are the two shapes this class has taken
399+(`golden4` skipped; the film-grain gate panicked), and both are now impossible.
400+
401+## 4. One gate stays ignored, on facts
402+
403+`pinned_lr_sgr_stream_call_unique_dump` — reason replaced with the two reasons that
404+are still true:
405+
406+> `diagnostic only -- asserts nothing, so it cannot fail on a decode regression;
407+> run with --ignored and EC_LR_CALL_DUMP=1 for the Sgrproj window`
408+
409+The fact: the body `eprintln!`s per-frame mismatch counts and **returns**. There is
410+no `assert!` anywhere in it, so it cannot go red on a decode regression;
411+un-ignoring it would add a test that reports pass unconditionally. Its pin is now
412+committed too, so the old reason ("reads a pinned fixture under the gitignored
413+fixtures dir") was false and is gone. Measured plain run under `--ignored` for the
414+record: **1 passed, 0.10s**, `frame 0: y_mismatch=false u_mismatch=false
415+v_mismatch=false`.
416+
417+**What would close it:** give it the pixel asserts its three siblings have (the
418+compare loop is already there, it only prints), then un-ignore. That is a real
419+change with a real verdict, so it is not folded in here.
420+
421+## 5. State
422+
423+`lane-av1pinslive`, three commits on top of `eccbd6c6`: `c7ea69c1` (r2 un-ignore),
424+`f99a5ff9` (r3 siblings), plus report commits. `cargo check -p ec-av1 --all-targets`
425+clean, no warnings. Meta-gates after the change: `gate_coverage` **10 passed**,
426+`refusal_inventory` **15 passed**. r2's two gates re-verified green
427+(1 passed, 0.15s each). Not pushed; main untouched.
428+
429+Not verified: a full `cargo test -p ec-av1` run (project-wide validation is
430+Main's), and the remaining ignored set — now 37 tests, of which these four were
431+the machine-local-pin population.
432+
433+The class rule this lane earns, in the shape Main is adopting as a batch rule: an
434+`#[ignore]` reason must state a **fact** (what the gate needs, what it costs), never
435+a **judgement** ("bisect aid", "not a suite gate"). A judgement cannot be checked
436+against reality, so it cannot go stale loudly — and that is exactly how the r1
437+reason survived into a tree where it was false.
438+
439+---
440+
441+# r4 — the last assert-free gate, and two corrections to my own r3 claims
442+
443+Branch `lane-av1pinslive`, rebased onto main `aa0ac8c2`. Commit `9a29c974`.
444+Tests only, no decoder change.
445+
446+## 1. What changed
447+
448+`pinned_lr_sgr_stream_call_unique_dump` now asserts. r3 left it `#[ignore]`d on the
449+fact that it asserted nothing; that is fixed and the ignore is gone.
450+
451+**The substantive fix is the frame count, not the asserts.** The old body passed
452+*our own decode's length* as ffmpeg's expected count:
453+
454+```rust
455+let reference = ffmpeg_decode_sequence(&stream, 192, 128, pics.len());
456+```
457+
458+so a decoder emitting **zero** frames asked ffmpeg for zero frames, the zip compared
459+no pairs, and the gate passed having proved nothing — the `cmpaudit` vacuous-pass
460+shape, in the one gate that was already `#[ignore]`d for asserting nothing. The count
461+now comes from the fixture (`FRAMES = 1`, measured), so a lost frame reds on the
462+count.
463+
464+Also added, matching the three sibling pins: a dimensions assert per frame, an
465+explicit `reference.len() == FRAMES` before the zip, and per-plane per-frame pixel
466+asserts. **The diagnostic print is kept** and now runs *before* the asserts, so a
467+failure still names the shape of the divergence.
468+
469+### On "does it compare only frame 0?" — it does not
470+
471+The loop always visited every frame; it is unchanged in that respect. This pin
472+simply holds **one** frame, which is why the pre-r4 run printed `frame 0` and
473+nothing else. So that particular worry is unfounded, and the real gap was the
474+vacuous count above.
475+
476+## 2. Red-before, on a pixel assertion
477+
478+**Method used: mutating the decoder arithmetic the pin exercises**, not a faked
479+expectation — `restoration.rs::apply_sgrproj_stripe`, `+1` on its first output
480+sample. The pin is a loop-restoration stream, so Sgrproj is on its path.
481+
482+```
483+frame 0: y_mismatch=false u_mismatch=true v_mismatch=true
484+panicked at crates/ec-av1/src/stream.rs:30374:13:
485+ assertion `left == right` failed:
486+ pinned_lr_sgr_stream_call_unique_dump frame 0 U vs ffmpeg (pinned lr-sgr)
487+test result: FAILED. 0 passed; 1 failed; 0 ignored
488+```
489+
490+It reds on a **pixel** assert, not on a shape or counter assert. Worth recording:
491+the mutation landed in a **chroma** plane, so the gate caught it on the U assert
492+while luma stayed clean — a luma-only compare would have missed it entirely. That is
493+the capability the three per-plane asserts buy.
494+
495+Reverted (`git status` on `restoration.rs` empty) and the gate returns green.
496+
497+The **count** assert is proven separately: setting `FRAMES = 2` reds at
498+`stream.rs:30328` with *"decoded 1 frame(s), the pinned stream holds 2 -- a short
499+decode would otherwise ask ffmpeg for the same short count and compare nothing"* —
500+on the count, not on a pixel. Both halves proven independently.
501+
502+## 3. Plain-run evidence
503+
504+```
505+cargo test -p ec-av1 --lib --release -- --exact stream::tests::pinned_lr_sgr_stream_call_unique_dump --test-threads=1 --nocapture
506+ frame 0: y_mismatch=false u_mismatch=false v_mismatch=false
507+ pinned_lr_sgr_stream_call_unique_dump: 1 frame(s) byte-exact vs ffmpeg from .../crates/ec-av1/fixtures/lr-sgr-r7.obu
508+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 741 filtered out; finished in 0.10s
509+```
510+
511+`#[ignore]` in `stream.rs` **37 → 36**. `gate_coverage` 10 passed,
512+`refusal_inventory` 15 passed.
513+
514+The ignore was never justified by cost: it measured 0.10 s under `--ignored` too.
515+The only honest reason it carried was the missing asserts, which is now gone.
516+
517+## 4. TWO CORRECTIONS TO MY OWN r3 CLAIMS
518+
519+Both are scanner blind spots of mine, found by auditing the class after this change.
520+Neither is a new defect in the tree; both are wrong things I told you.
521+
522+**Correction 1 — "the machine-local-pin population is zero in ec-av1" is FALSE.**
523+It is zero for the gates I fixed, and there is **one more pin gate with 14
524+uncommitted pins**:
525+
526+`pinned_warp_stream_decodes_pixel_exact` (still `#[ignore]`d, reason *"reads pinned
527+fixture paths under the gitignored fixtures dir; run manually"*) reads **14 pins** —
528+`warp-mismatch`, `warp-flake-5`, `warp-flake-7`, `ii-flake-1/2/3/5/6/7/8/9`,
529+`rect-flake-1/2/3` — through a **directory** `concat!(env!("CARGO_MANIFEST_DIR"),
530+"/../../fixtures")` literal plus a name list, and formats `{fixtures}/{n}.obu` at
531+runtime. **0 of 14 are committed under the crate.**
532+
533+My r3 scanner matched only `crate_pin("X")` and `pin_dir().join("X")` — *single-name*
534+call shapes. A directory literal plus a runtime-formatted name list does not match
535+either, so this gate was invisible to it. The r3 invariant I proposed to the preflight
536+lane ("every `crate_pin("X")` must have `crates/ec-av1/fixtures/X` in the tree") is
537+**too weak to catch this**, and the preflight lane should be told so: the scan must
538+also resolve `concat!` directory literals and any `{fixtures}/{n}` runtime format.
539+
540+**Correction 2 — "4 ignored gates assert nothing" is wrong for one of them.**
541+My body-only scan reported `pinned_warp_stream_decodes_pixel_exact` as assert-free.
542+It is not: the gate delegates to `check_pinned_warp_stream` (`stream.rs:31226`),
543+which carries `assert_eq!` on all three planes per frame. The scan looked at the gate
544+body and missed the delegation.
545+
546+The other three are correct and are diagnostics **by name**:
547+`probe_tiny_fixture_trace`, `scratch_decode_pinned_stream_once`,
548+`scratch_isolate_pinned_mismatch` — 0 asserts each, all `probe_*`/`scratch_*`.
549+
550+So the accurate statement is: **no ignored gate named `pinned_*` asserts nothing**,
551+after this change — but that took checking the helpers, not the bodies.
552+
553+## 5. State
554+
555+`lane-av1pinslive`, four work commits on top of `aa0ac8c2`. `cargo check -p ec-av1
556+--all-targets` clean, no warnings. Not pushed; main untouched.
557+
558+Follow-on handed back rather than folded in: the 14 `pinned_warp` pins, which are
559+the same defect as r3's four and want the same `crate_pin` + committed-copy
560+treatment. Not verified: a full `cargo test -p ec-av1` run (project-wide validation
561+is Main's).