From 60459a516bc54162d1aa733e969d07c004a4e43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 29 Sep 2026 03:36:52 +0300 Subject: [PATCH] stream: a_real_aomenc_lossless_444_key_frame stops reporting green on a missing pin The gate's pinned fixture `fixtures/ll444-lossless-key.obu` does not exist: not in git, not in the root `fixtures/` directory on this box, and no script under scripts/ produces it -- the only recorded provenance is the prose recipe in the gate's own skip message. Its `Err` arm was a bare SKIP, so it finished in 0.05s (its siblings take seconds: it had decoded nothing) and the suite reported green. The root `fixtures/` directory is listed in `.gitignore:2`, so the pin cannot be committed and cannot be regenerated by a fresh clone; every `~/.cache/wt/*` worktree lacks it for the same reason. The arm is therefore kept as a skip (deleting the gate or failing every box outright is worse), but `EC_AV1_REQUIRE_AOMENC=1` now turns it into a hard failure that names the missing path, the exact regeneration recipe and the `EC_AV1_PIN_DIR` override, so a batch run cannot report green off it. The skip line itself now says the gate decoded nothing and proves nothing. Tests only; no gate body below the arm is touched. --- crates/ec-av1/src/stream.rs | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 7cc17c3e..8a5d2325 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -6488,14 +6488,34 @@ pub(crate) mod tests { eprintln!("SKIP {NAME}: no ffmpeg"); return; } - let Ok(stream) = std::fs::read(pin_dir().join("ll444-lossless-key.obu")) else { - eprintln!( - "SKIP {NAME}: no pinned bytes at {} -- regenerate with \ - `testsrc2 128x96` yuv444p 6 frames, aomenc --profile=1 --lossless=1 \ - --enable-palette=0 --enable-intrabc=0, cut to the key frame's OBUs", - pin_dir().join("ll444-lossless-key.obu").display() - ); - return; + // lane-av1skipfix: this arm used to be a bare SKIP, so on any box + // without the pin (the root `fixtures/` directory is GITIGNORED -- + // `.gitignore:2` -- so a fresh clone can never have it) the gate + // reported green having decoded nothing. `EC_AV1_REQUIRE_AOMENC=1` + // turns it into a hard failure naming the missing pin and its exact + // regeneration recipe, so a batch run cannot report green off it. + let pin = pin_dir().join("ll444-lossless-key.obu"); + let stream = match std::fs::read(&pin) { + Ok(stream) => stream, + Err(e) => { + assert!( + std::env::var_os("EC_AV1_REQUIRE_AOMENC").is_none(), + "{NAME}: the pinned 4:4:4 lossless key frame is missing at {} ({e}). \ + Regenerate it with `testsrc2 128x96` yuv444p 6 frames, aomenc \ + --profile=1 --lossless=1 --enable-palette=0 --enable-intrabc=0, \ + cut to the key frame's OBUs -- or point EC_AV1_PIN_DIR at a \ + directory that has it.", + pin.display() + ); + eprintln!( + "SKIP {NAME}: no pinned bytes at {} ({e}) -- this gate decoded nothing \ + and proves nothing; regenerate with `testsrc2 128x96` yuv444p 6 \ + frames, aomenc --profile=1 --lossless=1 --enable-palette=0 \ + --enable-intrabc=0, cut to the key frame's OBUs", + pin.display() + ); + return; + } }; // Blindness guard: the pinned fixture must really be a lossless frame. let mut parser = Av1Parser::new();