Commit the three lost pins, and correct the two 1:4 gates' stale blocker comment
Browse files at this commit1cd168683ee27cb81f653da8482fc271b42b460cParent: a460dca- test
- commit the three lost pins, and correct the two 1:4 gates' stale blocker comment
4 changed files +142 -54
- crates/ec-av1/fixtures/golden3-pin.obu +0 -0
- crates/ec-av1/fixtures/ll444-lossless-key.obu +0 -0
- crates/ec-av1/fixtures/sbpart-pin.obu +0 -0
- crates/ec-av1/src/stream.rs +142 -54
crates/ec-av1/fixtures/golden3-pin.obuadded+0 -0
Binary file changed
crates/ec-av1/fixtures/ll444-lossless-key.obuadded+0 -0
Binary file changed
crates/ec-av1/fixtures/sbpart-pin.obuadded+0 -0
Binary file changed
crates/ec-av1/src/stream.rsmodified+142 -54
| @@ -6488,12 +6488,20 @@ pub(crate) mod tests { | ||
| 6488 | 6488 | eprintln!("SKIP {NAME}: no ffmpeg"); |
| 6489 | 6489 | return; |
| 6490 | 6490 | } |
| 6491 | - let Ok(stream) = std::fs::read(pin_dir().join("ll444-lossless-key.obu")) else { | |
| 6491 | + // lane-av1pins: committed at crates/ec-av1/fixtures/ll444-lossless-key.obu | |
| 6492 | + // (7845 bytes; sha256 | |
| 6493 | + // f496ef0a1171c2bc66d411cc60db05db547dcdb49cd834d4e0543de9db441374), | |
| 6494 | + // re-encoded 2026-09-29 from the recipe this very SKIP line records -- | |
| 6495 | + // `testsrc2 128x96` yuv444p 6 frames, aomenc --profile=1 --lossless=1 | |
| 6496 | + // --enable-palette=0 --enable-intrabc=0 --bit-depth=8 --cpu-used=0 | |
| 6497 | + // --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100, --limit=1 | |
| 6498 | + // so the key frame's OBUs are the whole stream (no OBU surgery needed). | |
| 6499 | + let pin = crate_pin("ll444-lossless-key.obu"); | |
| 6500 | + let Ok(stream) = std::fs::read(&pin) else { | |
| 6492 | 6501 | eprintln!( |
| 6493 | - "SKIP {NAME}: no pinned bytes at {} -- regenerate with \ | |
| 6494 | - `testsrc2 128x96` yuv444p 6 frames, aomenc --profile=1 --lossless=1 \ | |
| 6495 | - --enable-palette=0 --enable-intrabc=0, cut to the key frame's OBUs", | |
| 6496 | - pin_dir().join("ll444-lossless-key.obu").display() | |
| 6502 | + "SKIP {NAME}: no pinned bytes at {} -- the committed copy is \ | |
| 6503 | + crates/ec-av1/fixtures/ll444-lossless-key.obu", | |
| 6504 | + pin.display() | |
| 6497 | 6505 | ); |
| 6498 | 6506 | return; |
| 6499 | 6507 | }; |
| @@ -8661,6 +8669,23 @@ pub(crate) mod tests { | ||
| 8661 | 8669 | .unwrap_or_else(|_| std::path::PathBuf::from("fixtures")) |
| 8662 | 8670 | } |
| 8663 | 8671 | |
| 8672 | + /// A COMMITTED pin: `crates/ec-av1/fixtures/<name>`, which travels in the | |
| 8673 | + /// tarball and is therefore present on every runner. `pin_dir()` resolves | |
| 8674 | + /// to the gitignored root `fixtures/`, so a pin written there is lost when | |
| 8675 | + /// the machine's scratchpad is reaped -- three gates sat at `rc=0` having | |
| 8676 | + /// tested nothing for exactly that reason (lane-av1pins). Falls back to | |
| 8677 | + /// `pin_dir()` so a locally re-captured stream still overrides. | |
| 8678 | + fn crate_pin(name: &str) -> std::path::PathBuf { | |
| 8679 | + let in_crate = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) | |
| 8680 | + .join("fixtures") | |
| 8681 | + .join(name); | |
| 8682 | + if in_crate.is_file() { | |
| 8683 | + in_crate | |
| 8684 | + } else { | |
| 8685 | + pin_dir().join(name) | |
| 8686 | + } | |
| 8687 | + } | |
| 8688 | + | |
| 8664 | 8689 | fn have_aomenc() -> bool { |
| 8665 | 8690 | let present = aomenc_path().is_file(); |
| 8666 | 8691 | assert!( |
| @@ -22002,19 +22027,33 @@ pub(crate) mod tests { | ||
| 22002 | 22027 | /// `EC_AV1_GATE_DUMP=$SP/golden3-pin.obu` off |
| 22003 | 22028 | /// [`a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact`] |
| 22004 | 22029 | /// (seed 47, frame 1 U). Deterministic and static -- no aomenc/ffmpeg |
| 22005 | - /// re-encode involved, only re-decodes the fixed bytes on disk, so it is | |
| 22006 | - /// `#[ignore]`d (the file only exists on this machine's scratchpad) but | |
| 22007 | - /// gives a fast red/green loop for the actual fix. | |
| 22008 | - #[test] | |
| 22009 | - #[ignore = "reads a pinned fixture path outside the repo; run manually"] | |
| 22030 | + /// re-encode involved, only re-decodes fixed bytes on disk. Still | |
| 22031 | + /// `#[ignore]`d: it is a BISECT aid, not a suite gate. What changed under | |
| 22032 | + /// lane-av1pins is WHERE the bytes live -- they are now committed at | |
| 22033 | + /// `crates/ec-av1/fixtures/golden3-pin.obu` instead of a scratchpad that | |
| 22034 | + /// tmpfs reaps, so the gate does real work on any runner. | |
| 22035 | + /// | |
| 22036 | + /// The original capture (2026-08-28, `bec27414`) is NOT reproducible: it | |
| 22037 | + /// predates `5ae053d3` "route all 20 gradients gate fixtures through | |
| 22038 | + /// seed-derived colours", so `gradients_source` still left c4..c7 to | |
| 22039 | + /// ffmpeg's `random` default then. This is a FRESH capture from the same | |
| 22040 | + /// recipe family at seed 42, which IS byte-reproducible now: the command is | |
| 22041 | + /// in `lanes/av1pins.report.md`, and the stream's FNV-1a-64 | |
| 22042 | + /// (`89c4089148d51c04`; 159 bytes; sha256 | |
| 22043 | + /// `11c9d5331cffa6614c8265ad5fa685d5ce9155db8439949b48ec4a652ace95cf`) is | |
| 22044 | + /// the `stream_hash` the live | |
| 22045 | + /// `a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact` | |
| 22046 | + /// prints for that seed -- which is what proves the recipe is that gate's. | |
| 22047 | + #[test] | |
| 22048 | + #[ignore = "bisect aid, not a suite gate; run it with --ignored"] | |
| 22010 | 22049 | fn pinned_golden3_stream_decodes_pixel_exact() { |
| 22011 | 22050 | let path = std::env::var("EC_AV1_GATE_DUMP_PIN") |
| 22012 | 22051 | .map(std::path::PathBuf::from) |
| 22013 | - .unwrap_or_else(|_| pin_dir().join("golden3-pin.obu")); | |
| 22052 | + .unwrap_or_else(|_| crate_pin("golden3-pin.obu")); | |
| 22014 | 22053 | let Ok(stream) = std::fs::read(&path) else { |
| 22015 | 22054 | eprintln!( |
| 22016 | 22055 | "SKIP pinned_golden3_stream_decodes_pixel_exact: no pinned bytes at {} \ |
| 22017 | - -- re-capture with EC_AV1_GATE_DUMP off the cdf-forwarding gate", | |
| 22056 | + -- the committed copy is crates/ec-av1/fixtures/golden3-pin.obu", | |
| 22018 | 22057 | path.display() |
| 22019 | 22058 | ); |
| 22020 | 22059 | return; |
| @@ -22025,11 +22064,25 @@ pub(crate) mod tests { | ||
| 22025 | 22064 | } |
| 22026 | 22065 | let frames = decode_stream(&stream).expect("pinned stream must decode"); |
| 22027 | 22066 | let ffmpeg_frames = ffmpeg_decode_sequence(&stream, 64, 64, 4); |
| 22067 | + assert_eq!( | |
| 22068 | + frames.len(), | |
| 22069 | + ffmpeg_frames.len(), | |
| 22070 | + "pinned stream decoded {} frames, ffmpeg {} -- a length mismatch would \ | |
| 22071 | + make the zip below compare a mis-paired set", | |
| 22072 | + frames.len(), | |
| 22073 | + ffmpeg_frames.len() | |
| 22074 | + ); | |
| 22028 | 22075 | for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() { |
| 22029 | 22076 | assert_eq!(got.y, want.y, "frame {i} luma vs ffmpeg (pinned)"); |
| 22030 | 22077 | assert_eq!(got.u, want.u, "frame {i} U vs ffmpeg (pinned)"); |
| 22031 | 22078 | assert_eq!(got.v, want.v, "frame {i} V vs ffmpeg (pinned)"); |
| 22032 | 22079 | } |
| 22080 | + eprintln!( | |
| 22081 | + "pinned_golden3_stream_decodes_pixel_exact: {} frame(s) byte-exact vs ffmpeg \ | |
| 22082 | + from {}", | |
| 22083 | + frames.len(), | |
| 22084 | + path.display() | |
| 22085 | + ); | |
| 22033 | 22086 | } |
| 22034 | 22087 | |
| 22035 | 22088 | /// lane-av1golden4: reproduces the pinned mismatch bytes captured by |
| @@ -37736,16 +37789,27 @@ pub(crate) mod tests { | ||
| 37736 | 37789 | /// aomenc/ffmpeg re-encode), same pattern as `pinned_golden3/4_stream_ |
| 37737 | 37790 | /// decodes_pixel_exact` -- fast red/green loop for the bisect, and lets |
| 37738 | 37791 | /// `EC_AV1_TRACE=1` be set for one run without re-driving the encoder. |
| 37739 | - #[test] | |
| 37740 | - #[ignore = "reads a pinned fixture path outside the repo; run manually"] | |
| 37792 | + /// | |
| 37793 | + /// lane-av1pins: the bytes are now committed at | |
| 37794 | + /// `crates/ec-av1/fixtures/sbpart-pin.obu` (238 bytes; sha256 | |
| 37795 | + /// `62238fc077f45d89745d4d254b9c0465464003529da3b42d0a65631fbb7e16e9`), | |
| 37796 | + /// re-encoded 2026-09-29 from the source gate's own recipe | |
| 37797 | + /// (`a_real_aomenc_stream_with_rect_screen_content_decodes_pixel_exact`: | |
| 37798 | + /// smptebars 192x128, single frame, `--sb-size=64 --enable-palette=1 | |
| 37799 | + /// --min-partition-size=16 --max-partition-size=64`, cq=55). The command | |
| 37800 | + /// is in `lanes/av1pins.report.md`. That gate's source list has no | |
| 37801 | + /// 192x128 cell, so this pin is a 192x128 re-run of its recipe, not a | |
| 37802 | + /// replay of the original mismatch bytes. | |
| 37803 | + #[test] | |
| 37804 | + #[ignore = "bisect aid, not a suite gate; run it with --ignored"] | |
| 37741 | 37805 | fn pinned_sbpart_stream_decodes_pixel_exact() { |
| 37742 | 37806 | let path = std::env::var("EC_AV1_GATE_DUMP_PIN") |
| 37743 | 37807 | .map(std::path::PathBuf::from) |
| 37744 | - .unwrap_or_else(|_| pin_dir().join("sbpart-pin.obu")); | |
| 37808 | + .unwrap_or_else(|_| crate_pin("sbpart-pin.obu")); | |
| 37745 | 37809 | let Ok(stream) = std::fs::read(&path) else { |
| 37746 | 37810 | eprintln!( |
| 37747 | 37811 | "SKIP pinned_sbpart_stream_decodes_pixel_exact: no pinned bytes at {} \ |
| 37748 | - -- re-capture with EC_AV1_GATE_DUMP off the sbpart gate", | |
| 37812 | + -- the committed copy is crates/ec-av1/fixtures/sbpart-pin.obu", | |
| 37749 | 37813 | path.display() |
| 37750 | 37814 | ); |
| 37751 | 37815 | return; |
| @@ -37756,6 +37820,14 @@ pub(crate) mod tests { | ||
| 37756 | 37820 | } |
| 37757 | 37821 | let frames = decode_stream(&stream).expect("pinned stream must decode"); |
| 37758 | 37822 | let ffmpeg_frames = ffmpeg_decode_sequence(&stream, 192, 128, 1); |
| 37823 | + assert_eq!( | |
| 37824 | + frames.len(), | |
| 37825 | + ffmpeg_frames.len(), | |
| 37826 | + "pinned stream decoded {} frames, ffmpeg {} -- a length mismatch would \ | |
| 37827 | + make the zip below compare a mis-paired set", | |
| 37828 | + frames.len(), | |
| 37829 | + ffmpeg_frames.len() | |
| 37830 | + ); | |
| 37759 | 37831 | let (width, height) = (192usize, 128usize); |
| 37760 | 37832 | for (i, (got, want)) in frames.iter().zip(&ffmpeg_frames).enumerate() { |
| 37761 | 37833 | if std::env::var_os("EC_SBPART_DIAG").is_some() { |
| @@ -40351,25 +40423,33 @@ pub(crate) mod tests { | ||
| 40351 | 40423 | #[test] |
| 40352 | 40424 | // r1 `#[ignore]`d this gate on "every stream with an intra 1:4 strip also |
| 40353 | 40425 | // hits the inter rect-strip refusal". r2 merged main 18bf7dc (lane-r14 |
| 40354 | - // a2e2e29 lifts exactly that refusal) and re-ran it: 3 of 40 attempts now | |
| 40355 | - // decode whole and reach the pixel compare (0 before), one of them firing | |
| 40356 | - // 64x16=4 16x64=3. But the compare fails on a defect this lane does not | |
| 40357 | - // own -- MEASURED (r2, $HOME/.cache/intra14-r2-*.log): | |
| 40358 | - // * seeds 46 and 54 fire ZERO 1:4 strips (`intra_rect4_strip_in_inter_hits` | |
| 40359 | - // delta 0/0/0/0) and mismatch ffmpeg the same way as the firing seed 52: | |
| 40360 | - // decode-order frame 3/4 luma ~3.7-4.5k samples, max |d| 6..17, then | |
| 40361 | - // frames 5-7 drift to ~24k samples, max |d| ~220 as the references | |
| 40362 | - // carry the error forward. | |
| 40363 | - // * with `--enable-1to4-partitions=0` aomenc emits a BYTE-IDENTICAL | |
| 40364 | - // stream at this recipe (same hits, same per-frame diff counts), so | |
| 40365 | - // the 1:4 shape is not the discriminator either. | |
| 40366 | - // i.e. this mandelbrot 192x128 source has a pre-existing INTER-frame | |
| 40367 | - // pixel defect on this tree (r1 already recorded it as "open, NOT mine" | |
| 40368 | - // with rect partitions off; it is now this gate's blocker). testsrc2 at | |
| 40369 | - // 192x128 decodes pixel-exact on the same recipe but fires no 1:4 strip | |
| 40370 | - // in 4 of 12 attempts that decode whole. So the gate stays `#[ignore]`d | |
| 40371 | - // rather than weakened: a source whose baseline is exact AND that fires | |
| 40372 | - // an intra 1:4 strip has not been found yet. | |
| 40426 | + // a2e2e29 lifts exactly that refusal) and re-ran it: 3 of 40 attempts | |
| 40427 | + // decode whole and reach the pixel compare (0 before), one firing | |
| 40428 | + // 64x16=4 16x64=3 -- and the compare FAILED on an unowned inter-frame | |
| 40429 | + // defect (mandelbrot 192x128, luma ~3.7-4.5k samples on frames 3/4 | |
| 40430 | + // drifting to ~24k, max |d| ~220 on frames 5-7). | |
| 40431 | + // | |
| 40432 | + // lane-av1pins RE-RAN this gate in RELEASE on a21f3680 (the seven-lane | |
| 40433 | + // merged tree) and BOTH halves of that r2 record are now stale: | |
| 40434 | + // * THE PIXEL BLOCKER IS GONE. The gate's own tally reads | |
| 40435 | + // `counted-exact=0 uncounted-exact=40 named-refusals=0 (attempts 40)` | |
| 40436 | + // at both bit depths, and there is NOT ONE mismatch line anywhere in | |
| 40437 | + // the full run log -- no frame 3/4 luma counts, no max |d|, no drift. | |
| 40438 | + // 40/40 streams now compare pixel-exact. (The 10-bit arm is identical: | |
| 40439 | + // same 40/40, same zero-mismatch log.) | |
| 40440 | + // * THE RECIPE NO LONGER FIRES THE FEATURE. Every one of the 42 | |
| 40441 | + // counted attempts reads `64x16=0 16x64=0 32x8=0 8x32=0`. The gate has | |
| 40442 | + // regressed from r2's "fires sometimes, compare fails" to "never | |
| 40443 | + // fires", so the assertion now trips on its non-vacuity precondition | |
| 40444 | + // (stream.rs:40653) rather than on any pixel. | |
| 40445 | + // So the reason these gates stay `#[ignore]`d is the RECIPE, exactly as | |
| 40446 | + // the `#[ignore]` string says -- NOT the mandelbrot defect, which the | |
| 40447 | + // string never claimed and which is no longer reproducing. Kept ignored | |
| 40448 | + // rather than un-ignored: a source whose baseline is exact AND that fires | |
| 40449 | + // a 32-level intra 1:4 strip in an inter frame still does not exist. | |
| 40450 | + // (Corrected 2026-09-29: the comment above previously recorded the r2 | |
| 40451 | + // state and would have had a reader re-filing these as blocked on the | |
| 40452 | + // mandelbrot defect, which is wrong on this tree.) | |
| 40373 | 40453 | #[ignore = "gate recipe never fires the feature (40/40 streams pixel-exact); needs a recipe that produces a 32-level intra 1:4 strip in an inter frame -- class gate-blind-to-feature"] |
| 40374 | 40454 | fn a_real_aomenc_inter_sequence_with_an_intra_1to4_strip_decodes_pixel_exact() { |
| 40375 | 40455 | intra_rect4_in_inter_gate(8); |
| @@ -40379,25 +40459,33 @@ pub(crate) mod tests { | ||
| 40379 | 40459 | #[test] |
| 40380 | 40460 | // r1 `#[ignore]`d this gate on "every stream with an intra 1:4 strip also |
| 40381 | 40461 | // hits the inter rect-strip refusal". r2 merged main 18bf7dc (lane-r14 |
| 40382 | - // a2e2e29 lifts exactly that refusal) and re-ran it: 3 of 40 attempts now | |
| 40383 | - // decode whole and reach the pixel compare (0 before), one of them firing | |
| 40384 | - // 64x16=4 16x64=3. But the compare fails on a defect this lane does not | |
| 40385 | - // own -- MEASURED (r2, $HOME/.cache/intra14-r2-*.log): | |
| 40386 | - // * seeds 46 and 54 fire ZERO 1:4 strips (`intra_rect4_strip_in_inter_hits` | |
| 40387 | - // delta 0/0/0/0) and mismatch ffmpeg the same way as the firing seed 52: | |
| 40388 | - // decode-order frame 3/4 luma ~3.7-4.5k samples, max |d| 6..17, then | |
| 40389 | - // frames 5-7 drift to ~24k samples, max |d| ~220 as the references | |
| 40390 | - // carry the error forward. | |
| 40391 | - // * with `--enable-1to4-partitions=0` aomenc emits a BYTE-IDENTICAL | |
| 40392 | - // stream at this recipe (same hits, same per-frame diff counts), so | |
| 40393 | - // the 1:4 shape is not the discriminator either. | |
| 40394 | - // i.e. this mandelbrot 192x128 source has a pre-existing INTER-frame | |
| 40395 | - // pixel defect on this tree (r1 already recorded it as "open, NOT mine" | |
| 40396 | - // with rect partitions off; it is now this gate's blocker). testsrc2 at | |
| 40397 | - // 192x128 decodes pixel-exact on the same recipe but fires no 1:4 strip | |
| 40398 | - // in 4 of 12 attempts that decode whole. So the gate stays `#[ignore]`d | |
| 40399 | - // rather than weakened: a source whose baseline is exact AND that fires | |
| 40400 | - // an intra 1:4 strip has not been found yet. | |
| 40462 | + // a2e2e29 lifts exactly that refusal) and re-ran it: 3 of 40 attempts | |
| 40463 | + // decode whole and reach the pixel compare (0 before), one firing | |
| 40464 | + // 64x16=4 16x64=3 -- and the compare FAILED on an unowned inter-frame | |
| 40465 | + // defect (mandelbrot 192x128, luma ~3.7-4.5k samples on frames 3/4 | |
| 40466 | + // drifting to ~24k, max |d| ~220 on frames 5-7). | |
| 40467 | + // | |
| 40468 | + // lane-av1pins RE-RAN this gate in RELEASE on a21f3680 (the seven-lane | |
| 40469 | + // merged tree) and BOTH halves of that r2 record are now stale: | |
| 40470 | + // * THE PIXEL BLOCKER IS GONE. The gate's own tally reads | |
| 40471 | + // `counted-exact=0 uncounted-exact=40 named-refusals=0 (attempts 40)` | |
| 40472 | + // at both bit depths, and there is NOT ONE mismatch line anywhere in | |
| 40473 | + // the full run log -- no frame 3/4 luma counts, no max |d|, no drift. | |
| 40474 | + // 40/40 streams now compare pixel-exact. (The 10-bit arm is identical: | |
| 40475 | + // same 40/40, same zero-mismatch log.) | |
| 40476 | + // * THE RECIPE NO LONGER FIRES THE FEATURE. Every one of the 42 | |
| 40477 | + // counted attempts reads `64x16=0 16x64=0 32x8=0 8x32=0`. The gate has | |
| 40478 | + // regressed from r2's "fires sometimes, compare fails" to "never | |
| 40479 | + // fires", so the assertion now trips on its non-vacuity precondition | |
| 40480 | + // (stream.rs:40653) rather than on any pixel. | |
| 40481 | + // So the reason these gates stay `#[ignore]`d is the RECIPE, exactly as | |
| 40482 | + // the `#[ignore]` string says -- NOT the mandelbrot defect, which the | |
| 40483 | + // string never claimed and which is no longer reproducing. Kept ignored | |
| 40484 | + // rather than un-ignored: a source whose baseline is exact AND that fires | |
| 40485 | + // a 32-level intra 1:4 strip in an inter frame still does not exist. | |
| 40486 | + // (Corrected 2026-09-29: the comment above previously recorded the r2 | |
| 40487 | + // state and would have had a reader re-filing these as blocked on the | |
| 40488 | + // mandelbrot defect, which is wrong on this tree.) | |
| 40401 | 40489 | #[ignore = "gate recipe never fires the feature (40/40 streams pixel-exact); needs a recipe that produces a 32-level intra 1:4 strip in an inter frame -- class gate-blind-to-feature"] |
| 40402 | 40490 | fn a_real_aomenc_inter_sequence_with_an_intra_1to4_strip_decodes_pixel_exact_10bit() { |
| 40403 | 40491 | intra_rect4_in_inter_gate(10); |