forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'lane-av1fixlib'

Browse files at this commit

ce93bbf07dffa68e44eb81820d3b64b24f124765Ahmet Kaan GümüşParent: 6f7e58f623a860

31 changed files +2783 -158

crates/ec-aac/tests/oracle.rsmodified+29 -10
@@ -19,6 +19,30 @@ fn have_ffmpeg() -> bool {
19 .unwrap_or(false)19 .unwrap_or(false)
20 }20 }
21 21
22+/// Fixture-presence probe for the committed `fixtures/audio` media this file
23+/// decodes. Returns whether the fixture is present, but never silently: under
24+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
25+/// and the script that regenerates it, so a host whose fixture library drifted
26+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
27+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
28+/// short-circuited because the probe ran first in a compound `if`).
29+///
30+/// Order is load-bearing: probe, assert, return. Never merge the probe into
31+/// the same `if` as the escape.
32+fn require_fixture(path: &Path, generator: &str) -> bool {
33+ let present = path.exists();
34+ assert!(
35+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
36+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
37+ path.display(),
38+ generator
39+ );
40+ if !present {
41+ eprintln!("SKIP: fixture {} absent", path.display());
42+ }
43+ present
44+}
45+
22 /// ffmpeg's decode of a file, as planar-by-channel `f32`.46 /// ffmpeg's decode of a file, as planar-by-channel `f32`.
23 fn ffmpeg_decode(path: &Path, channels: usize) -> Vec<Vec<f32>> {47 fn ffmpeg_decode(path: &Path, channels: usize) -> Vec<Vec<f32>> {
24 let out = Command::new("ffmpeg")48 let out = Command::new("ffmpeg")
@@ -128,8 +152,7 @@ fn adts_fixtures_match_ffmpeg_per_channel() {
128 "aac-adts-5.1-48000.aac",152 "aac-adts-5.1-48000.aac",
129 ] {153 ] {
130 let path = dir.join(name);154 let path = dir.join(name);
131- if !path.exists() {155+ if !require_fixture(&path, "scripts/gen-fixtures.sh") {
132- eprintln!("SKIP {name}: fixture missing");
133 continue;156 continue;
134 }157 }
135 let corr = compare(&path);158 let corr = compare(&path);
@@ -164,8 +187,7 @@ fn mp4_fixtures_match_ffmpeg_per_channel() {
164 "aac-mp4-5.1-48000.mp4",187 "aac-mp4-5.1-48000.mp4",
165 ] {188 ] {
166 let path = dir.join(name);189 let path = dir.join(name);
167- if !path.exists() {190+ if !require_fixture(&path, "scripts/gen-fixtures.sh") {
168- eprintln!("SKIP {name}: fixture missing");
169 continue;191 continue;
170 }192 }
171 // The mp4 side of the family is another slice; the elementary stream193 // The mp4 side of the family is another slice; the elementary stream
@@ -209,8 +231,7 @@ fn aac_coding_tools_match_ffmpeg_in_isolation() {
209 for tool in ["pns", "is", "ms", "tns", "all"] {231 for tool in ["pns", "is", "ms", "tns", "all"] {
210 let name = format!("aac-tool-{tool}-mp4-stereo-48000.m4a");232 let name = format!("aac-tool-{tool}-mp4-stereo-48000.m4a");
211 let path = dir.join(&name);233 let path = dir.join(&name);
212- if !path.exists() {234+ if !require_fixture(&path, "scripts/gen-fixtures.sh") {
213- eprintln!("SKIP {name}: fixture missing");
214 continue;235 continue;
215 }236 }
216 let adts = tmp.join(format!("{name}.aac"));237 let adts = tmp.join(format!("{name}.aac"));
@@ -421,8 +442,7 @@ fn encoder_beats_the_incumbent_bar() {
421 let mut checked = 0;442 let mut checked = 0;
422 for (name, channels, kbps, bar) in INCUMBENT_BAR {443 for (name, channels, kbps, bar) in INCUMBENT_BAR {
423 let src = dir.join(format!("flac-{name}-48000.flac"));444 let src = dir.join(format!("flac-{name}-48000.flac"));
424- if !src.exists() {445+ if !require_fixture(&src, "scripts/gen-fixtures.sh") {
425- eprintln!("SKIP {name}: fixture missing");
426 continue;446 continue;
427 }447 }
428 let source = ffmpeg_decode(&src, *channels);448 let source = ffmpeg_decode(&src, *channels);
@@ -811,8 +831,7 @@ fn aac_stream(path: &Path) -> Option<(usize, usize, String)> {
811 #[test]831 #[test]
812 fn five_one_decodes_faster_than_realtime() {832 fn five_one_decodes_faster_than_realtime() {
813 let path = fixtures().join("audio/aac-adts-5.1-48000.aac");833 let path = fixtures().join("audio/aac-adts-5.1-48000.aac");
814- if !path.exists() {834+ if !require_fixture(&path, "scripts/gen-fixtures.sh") {
815- eprintln!("SKIP: 5.1 fixture missing");
816 return;835 return;
817 }836 }
818 let data = std::fs::read(&path).expect("fixture readable");837 let data = std::fs::read(&path).expect("fixture readable");
crates/ec-aac/tests/sbr_real_library.rsmodified+78 -26
@@ -38,6 +38,33 @@ fn have_ffmpeg() -> bool {
38 .unwrap_or(false)38 .unwrap_or(false)
39 }39 }
40 40
41+/// Fixture-presence probe for the generated HE-AAC matrix under
42+/// `<repo>/.cache/heaac-fixtures` (`scripts/aac-tables/make-heaac-fixtures.sh`).
43+/// Returns whether the fixture is present, but never silently: under
44+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
45+/// and the script that regenerates it, so a host whose fixture library drifted
46+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
47+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
48+/// short-circuited because the probe ran first in a compound `if`).
49+///
50+/// Order is load-bearing: probe, assert, return. Never merge the probe into
51+/// the same `if` as the escape. The `~/Music` / `~/Downloads` / `~/Videos`
52+/// scans in this file are host corpora, not the committed fixture library, and
53+/// keep their plain skip.
54+fn require_fixture(path: &Path, generator: &str) -> bool {
55+ let present = path.exists();
56+ assert!(
57+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
58+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
59+ path.display(),
60+ generator
61+ );
62+ if !present {
63+ eprintln!("SKIP: fixture {} absent", path.display());
64+ }
65+ present
66+}
67+
41 /// A film's audio track is hours long; the correlation only needs a bounded68 /// A film's audio track is hours long; the correlation only needs a bounded
42 /// window near the start, so both sides cap how much they ever decode.69 /// window near the start, so both sides cap how much they ever decode.
43 const MAX_SAMPLES: usize = 1_000_000;70 const MAX_SAMPLES: usize = 1_000_000;
@@ -2444,11 +2471,7 @@ fn synthetic_heaac_matrix() {
2444 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")2471 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")
2445 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));2472 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));
2446 let dir = PathBuf::from(dir);2473 let dir = PathBuf::from(dir);
2447- if !dir.is_dir() {2474+ if !require_fixture(&dir, "scripts/aac-tables/make-heaac-fixtures.sh") {
2448- eprintln!(
2449- "SKIP: {} absent -- run scripts/aac-tables/make-heaac-fixtures.sh first",
2450- dir.display()
2451- );
2452 return;2475 return;
2453 }2476 }
2454 unsafe {2477 unsafe {
@@ -2477,6 +2500,10 @@ fn synthetic_heaac_matrix() {
2477 // samples at the doubled/full output rate) both land well inside it,2500 // samples at the doubled/full output rate) both land well inside it,
2478 // not right at the edge the way the plain (LAG_MAX=4000) search did.2501 // not right at the edge the way the plain (LAG_MAX=4000) search did.
2479 const WIDE_LAG_MAX: i64 = 20_000;2502 const WIDE_LAG_MAX: i64 = 20_000;
2503+ // Floor: the matrix is 2 rates x 4 bitrates x 2 profiles. Without a count
2504+ // the whole test is green having probed nothing, which is the same
2505+ // false-green this file's `require_fixture` exists to kill.
2506+ let mut probed = 0usize;
2480 for rate in [48_000u32, 44_100] {2507 for rate in [48_000u32, 44_100] {
2481 for br in ["32k", "48k", "64k", "96k"] {2508 for br in ["32k", "48k", "64k", "96k"] {
2482 // LC first: its winning lag is the pure container/decoder2509 // LC first: its winning lag is the pure container/decoder
@@ -2485,10 +2512,10 @@ fn synthetic_heaac_matrix() {
2485 let mut lc_lag: Option<i64> = None;2512 let mut lc_lag: Option<i64> = None;
2486 for (profile, prefix) in [("LC", "lc"), ("HE", "heaac")] {2513 for (profile, prefix) in [("LC", "lc"), ("HE", "heaac")] {
2487 let path = dir.join(format!("{prefix}_{rate}_{br}.m4a"));2514 let path = dir.join(format!("{prefix}_{rate}_{br}.m4a"));
2488- if !path.exists() {2515+ if !require_fixture(&path, "scripts/aac-tables/make-heaac-fixtures.sh") {
2489- eprintln!("SKIP {}: missing", path.display());
2490 continue;2516 continue;
2491 }2517 }
2518+ probed += 1;
2492 let before = ec_aac::sbr_sideinfo_log().len();2519 let before = ec_aac::sbr_sideinfo_log().len();
2493 let Some((ours, _sbr, our_rate)) = our_decode(&path, 0) else {2520 let Some((ours, _sbr, our_rate)) = our_decode(&path, 0) else {
2494 eprintln!("SKIP {}: could not decode", path.display());2521 eprintln!("SKIP {}: could not decode", path.display());
@@ -2733,6 +2760,11 @@ fn synthetic_heaac_matrix() {
2733 }2760 }
2734 }2761 }
2735 }2762 }
2763+ assert!(
2764+ probed >= 16,
2765+ "only {probed} of 16 HE-AAC matrix fixtures were present -- rerun \
2766+ scripts/aac-tables/make-heaac-fixtures.sh"
2767+ );
2736 }2768 }
2737 2769
2738 fn candidates() -> Vec<Candidate> {2770 fn candidates() -> Vec<Candidate> {
@@ -3756,11 +3788,11 @@ fn sbr_header_feature_table() {
3756 let fixtures = std::env::var("EC_AAC_HEAAC_FIXTURES")3788 let fixtures = std::env::var("EC_AAC_HEAAC_FIXTURES")
3757 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));3789 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));
3758 let fixtures = PathBuf::from(fixtures);3790 let fixtures = PathBuf::from(fixtures);
3759- if fixtures.is_dir() {3791+ if require_fixture(&fixtures, "scripts/aac-tables/make-heaac-fixtures.sh") {
3760 for rate in [48_000u32, 44_100] {3792 for rate in [48_000u32, 44_100] {
3761 for br in ["32k", "48k", "64k", "96k"] {3793 for br in ["32k", "48k", "64k", "96k"] {
3762 let p = fixtures.join(format!("heaac_{rate}_{br}.m4a"));3794 let p = fixtures.join(format!("heaac_{rate}_{br}.m4a"));
3763- if p.exists() {3795+ if require_fixture(&p, "scripts/aac-tables/make-heaac-fixtures.sh") {
3764 rows.push(Row {3796 rows.push(Row {
3765 label: format!("synth-{rate}-{br}"),3797 label: format!("synth-{rate}-{br}"),
3766 path: p,3798 path: p,
@@ -3770,11 +3802,6 @@ fn sbr_header_feature_table() {
3770 }3802 }
3771 }3803 }
3772 }3804 }
3773- } else {
3774- eprintln!(
3775- "SKIP synthetic rows: {} absent -- run scripts/aac-tables/make-heaac-fixtures.sh first",
3776- fixtures.display()
3777- );
3778 }3805 }
3779 if rows.is_empty() {3806 if rows.is_empty() {
3780 eprintln!("SKIP: no real HE-AAC files and no synthetic fixtures found");3807 eprintln!("SKIP: no real HE-AAC files and no synthetic fixtures found");
@@ -4044,10 +4071,8 @@ fn per_au_low_band_divergence() {
4044 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")4071 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")
4045 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));4072 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));
4046 let failing = PathBuf::from(&dir).join("heaac_44100_48k.m4a");4073 let failing = PathBuf::from(&dir).join("heaac_44100_48k.m4a");
4047- if failing.exists() {4074+ if require_fixture(&failing, "scripts/aac-tables/make-heaac-fixtures.sh") {
4048 per_au_low_band_probe("synthetic 44100 48k (failing)", &failing, 0);4075 per_au_low_band_probe("synthetic 44100 48k (failing)", &failing, 0);
4049- } else {
4050- eprintln!("SKIP synthetic 44100 48k: {} absent", failing.display());
4051 }4076 }
4052 }4077 }
4053 4078
@@ -4094,7 +4119,20 @@ fn probe_explicit_config_and_wide_lag() {
4094 (planes, rate)4119 (planes, rate)
4095 }4120 }
4096 4121
4097- for (label, path, aac_stream, ffmpeg_stream, core_sf_index, core_rate, ext_rate, channels) in [4122+ // `synthetic` marks the case as coming from the committed fixture library
4123+ // (`scripts/aac-tables/make-heaac-fixtures.sh`); the FMJ row is a
4124+ // `~/Downloads` host corpus and keeps its plain skip.
4125+ for (
4126+ label,
4127+ path,
4128+ aac_stream,
4129+ ffmpeg_stream,
4130+ core_sf_index,
4131+ core_rate,
4132+ ext_rate,
4133+ channels,
4134+ synthetic,
4135+ ) in [
4098 (4136 (
4099 "FMJ",4137 "FMJ",
4100 format!(4138 format!(
@@ -4107,6 +4145,7 @@ fn probe_explicit_config_and_wide_lag() {
4107 24_000u32,4145 24_000u32,
4108 48_000u32,4146 48_000u32,
4109 2u16,4147 2u16,
4148+ false,
4110 ),4149 ),
4111 (4150 (
4112 "heaac_44100_48k",4151 "heaac_44100_48k",
@@ -4120,10 +4159,15 @@ fn probe_explicit_config_and_wide_lag() {
4120 44_100,4159 44_100,
4121 0, // filled below from parsed cfg's own extension_sample_rate4160 0, // filled below from parsed cfg's own extension_sample_rate
4122 2,4161 2,
4162+ true,
4123 ),4163 ),
4124 ] {4164 ] {
4125 let path = PathBuf::from(path);4165 let path = PathBuf::from(path);
4126- if !path.exists() {4166+ if synthetic {
4167+ if !require_fixture(&path, "scripts/aac-tables/make-heaac-fixtures.sh") {
4168+ continue;
4169+ }
4170+ } else if !path.exists() {
4127 eprintln!("SKIP {label}: {} absent", path.display());4171 eprintln!("SKIP {label}: {} absent", path.display());
4128 continue;4172 continue;
4129 }4173 }
@@ -4334,8 +4378,7 @@ fn coupled_cpe_channel_swap_probe() {
4334 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")4378 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")
4335 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));4379 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));
4336 let path = PathBuf::from(&dir).join("heaac_44100_48k.m4a");4380 let path = PathBuf::from(&dir).join("heaac_44100_48k.m4a");
4337- if !path.exists() {4381+ if !require_fixture(&path, "scripts/aac-tables/make-heaac-fixtures.sh") {
4338- eprintln!("SKIP: {} absent", path.display());
4339 return;4382 return;
4340 }4383 }
4341 let Some((ours, sbr, out_rate)) = our_decode(&path, 0) else {4384 let Some((ours, sbr, out_rate)) = our_decode(&path, 0) else {
@@ -4682,11 +4725,15 @@ fn sbr441_family_sample_drift_probe() {
4682 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")4725 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")
4683 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));4726 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));
4684 let home = std::env::var("HOME").unwrap_or_default();4727 let home = std::env::var("HOME").unwrap_or_default();
4685- let cases: [(&str, PathBuf, i64); 3] = [4728+ // `synthetic` marks the rows served by the committed fixture library
4729+ // (`scripts/aac-tables/make-heaac-fixtures.sh`); the reeln control is
4730+ // a `~/Music` host corpus and keeps its plain skip.
4731+ let cases: [(&str, PathBuf, i64, bool); 3] = [
4686 (4732 (
4687 "heaac_44100_48k (FAIL family)",4733 "heaac_44100_48k (FAIL family)",
4688 PathBuf::from(&dir).join("heaac_44100_48k.m4a"),4734 PathBuf::from(&dir).join("heaac_44100_48k.m4a"),
4689 -4674,4735 -4674,
4736+ true,
4690 ),4737 ),
4691 (4738 (
4692 "heaac_48000_48k (48k control)",4739 "heaac_48000_48k (48k control)",
@@ -4695,6 +4742,7 @@ fn sbr441_family_sample_drift_probe() {
4695 // (below) -- 0 was a bad guess, true fixed lag is -4673, same4742 // (below) -- 0 was a bad guess, true fixed lag is -4673, same
4696 // as the failing family's.4743 // as the failing family's.
4697 -4673,4744 -4673,
4745+ true,
4698 ),4746 ),
4699 (4747 (
4700 "reeln (44.1k control)",4748 "reeln (44.1k control)",
@@ -4704,11 +4752,16 @@ fn sbr441_family_sample_drift_probe() {
4704 // from an earlier probe, not its full-chain-vs-ffmpeg-reference4752 // from an earlier probe, not its full-chain-vs-ffmpeg-reference
4705 // lag, which is +385.4753 // lag, which is +385.
4706 385,4754 385,
4755+ false,
4707 ),4756 ),
4708 ];4757 ];
4709- for (label, path, seed_lag) in cases {4758+ for (label, path, seed_lag, synthetic) in cases {
4710 println!("\n=== {label}: {} ===", path.display());4759 println!("\n=== {label}: {} ===", path.display());
4711- if !path.exists() {4760+ if synthetic {
4761+ if !require_fixture(&path, "scripts/aac-tables/make-heaac-fixtures.sh") {
4762+ continue;
4763+ }
4764+ } else if !path.exists() {
4712 eprintln!("SKIP {label}: {} absent", path.display());4765 eprintln!("SKIP {label}: {} absent", path.display());
4713 continue;4766 continue;
4714 }4767 }
@@ -4802,8 +4855,7 @@ fn sbr_hf_window_band_probe() {
4802 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")4855 let dir = std::env::var("EC_AAC_HEAAC_FIXTURES")
4803 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));4856 .unwrap_or_else(|_| format!("{}/../../.cache/heaac-fixtures", env!("CARGO_MANIFEST_DIR")));
4804 let path = PathBuf::from(&dir).join("heaac_48000_64k.m4a");4857 let path = PathBuf::from(&dir).join("heaac_48000_64k.m4a");
4805- if !path.exists() {4858+ if !require_fixture(&path, "scripts/aac-tables/make-heaac-fixtures.sh") {
4806- eprintln!("SKIP: {} absent", path.display());
4807 return;4859 return;
4808 }4860 }
4809 const LAG: i64 = -4673;4861 const LAG: i64 = -4673;
crates/ec-av1/fixtures/ii-flake-1.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/ii-flake-2.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/ii-flake-3.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/ii-flake-5.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/ii-flake-6.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/ii-flake-7.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/ii-flake-8.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/ii-flake-9.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/rect-flake-1.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/rect-flake-2.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/rect-flake-3.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/warp-flake-5.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/warp-flake-7.obuadded+0 -0

Binary file changed

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

Binary file changed

crates/ec-av1/src/stream.rsmodified+37 -29
@@ -31540,59 +31540,67 @@ pub(crate) mod tests {
31540 /// clamping; ii-flake-1..8: interintra neighbours excluded from31540 /// clamping; ii-flake-1..8: interintra neighbours excluded from
31541 /// warp-sample gathering, ref_frame[1] == INTRA_FRAME in the mi grid).31541 /// warp-sample gathering, ref_frame[1] == INTRA_FRAME in the mi grid).
31542 /// `EC_AV1_GATE_DUMP_PIN` overrides to a single stream.31542 /// `EC_AV1_GATE_DUMP_PIN` overrides to a single stream.
31543- /// Deterministic and static -- `#[ignore]`d because the gitignored31543+ ///
31544- /// fixtures dir may be absent; run manually.31544+ /// Un-`#[ignore]`d with the pin shape fixed: the fourteen pins are COMMITTED
31545+ /// under `crates/ec-av1/fixtures/`, so the gate runs on a clean checkout
31546+ /// and carries `warp_selected_hits` 0 -> 113 over the set instead of
31547+ /// skipping GREEN having read nothing.
31545 #[test]31548 #[test]
31546- #[ignore = "reads pinned fixture paths under the gitignored fixtures dir; run manually"]
31547 fn pinned_warp_stream_decodes_pixel_exact() {31549 fn pinned_warp_stream_decodes_pixel_exact() {
31548 if !have_ffmpeg() {31550 if !have_ffmpeg() {
31549 eprintln!("SKIP pinned_warp_stream_decodes_pixel_exact: no ffmpeg");31551 eprintln!("SKIP pinned_warp_stream_decodes_pixel_exact: no ffmpeg");
31550 return;31552 return;
31551 }31553 }
31552- let fixtures = concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures");31554+ // Every pin is COMMITTED under `crates/ec-av1/fixtures/` and named by a
31553- let paths: Vec<String> = match std::env::var("EC_AV1_GATE_DUMP_PIN") {31555+ // string literal, which is the convention every other pinned gate here
31554- Ok(p) => vec![p],31556+ // uses and the only shape the pin census can resolve name-by-name. The
31555- Err(_) => [31557+ // old shape -- one GITIGNORED root directory literal plus a runtime
31556- "warp-mismatch",31558+ // name list formatted against it -- can never be satisfied by a
31557- "warp-flake-5",31559+ // committed tree, so this gate skipped GREEN having tested nothing.
31558- "warp-flake-7",31560+ let pins = match std::env::var("EC_AV1_GATE_DUMP_PIN") {
31559- "ii-flake-1",31561+ Ok(p) => vec![std::path::PathBuf::from(p)],
31560- "ii-flake-2",31562+ Err(_) => vec![
31561- "ii-flake-3",31563+ crate_pin("warp-mismatch.obu"),
31562- "ii-flake-5",31564+ crate_pin("warp-flake-5.obu"),
31563- "ii-flake-6",31565+ crate_pin("warp-flake-7.obu"),
31564- "ii-flake-7",31566+ crate_pin("ii-flake-1.obu"),
31565- "ii-flake-8",31567+ crate_pin("ii-flake-2.obu"),
31568+ crate_pin("ii-flake-3.obu"),
31569+ crate_pin("ii-flake-5.obu"),
31570+ crate_pin("ii-flake-6.obu"),
31571+ crate_pin("ii-flake-7.obu"),
31572+ crate_pin("ii-flake-8.obu"),
31566 // switchable_interp missing from reset_counts (counter31573 // switchable_interp missing from reset_counts (counter
31567 // saturation slowed the adaptation rate) -- unrelated to31574 // saturation slowed the adaptation rate) -- unrelated to
31568 // interintra, caught by the same gate.31575 // interintra, caught by the same gate.
31569- "ii-flake-9",31576+ crate_pin("ii-flake-9.obu"),
31570 // lane-rect r2: HORZ strip rect defects (mvstack size_h,31577 // lane-rect r2: HORZ strip rect defects (mvstack size_h,
31571 // warp sample/projection dims, OBMC overlap, deblock tx-h).31578 // warp sample/projection dims, OBMC overlap, deblock tx-h).
31572- "rect-flake-1",31579+ crate_pin("rect-flake-1.obu"),
31573 // scan_row/scan_col weight `inc` min'd by the wrong candidate31580 // scan_row/scan_col weight `inc` min'd by the wrong candidate
31574 // axis (width vs height) -- ties reordered DRL entry 1 for a31581 // axis (width vs height) -- ties reordered DRL entry 1 for a
31575 // block under a 32x16 strip, and suppressed the -5 extended31582 // block under a 32x16 strip, and suppressed the -5 extended
31576 // row scan.31583 // row scan.
31577- "rect-flake-2",31584+ crate_pin("rect-flake-2.obu"),
31578 // overlappable_left stepped the vertical walk by the31585 // overlappable_left stepped the vertical walk by the
31579 // neighbour's WIDTH: a 32x16 left strip swallowed the strip31586 // neighbour's WIDTH: a 32x16 left strip swallowed the strip
31580 // below it, blending the wrong OBMC prediction there.31587 // below it, blending the wrong OBMC prediction there.
31581- "rect-flake-3",31588+ crate_pin("rect-flake-3.obu"),
31582- ]31589+ ],
31583- .iter()
31584- .map(|n| format!("{fixtures}/{n}.obu"))
31585- .collect(),
31586 };31590 };
31587- for path in paths {31591+ for path in pins {
31588- eprintln!("pin: {path}");31592+ eprintln!("pin: {}", path.display());
31589 check_pinned_warp_stream(&path);31593 check_pinned_warp_stream(&path);
31590 }31594 }
31591 }31595 }
31592 31596
31593- fn check_pinned_warp_stream(path: &str) {31597+ fn check_pinned_warp_stream(path: &std::path::Path) {
31594 use crate::decode::warp_selected_hits;31598 use crate::decode::warp_selected_hits;
31595- let stream = std::fs::read(path).expect("reading pinned stream");31599+ let name = path
31600+ .file_name()
31601+ .map(|n| n.to_string_lossy().into_owned())
31602+ .unwrap_or_default();
31603+ let stream = require_pin(path, &name);
31596 let before = warp_selected_hits();31604 let before = warp_selected_hits();
31597 let frames = decode_stream(&stream).expect("pinned stream must decode");31605 let frames = decode_stream(&stream).expect("pinned stream must decode");
31598 eprintln!(31606 eprintln!(
crates/ec-flac/tests/encode_matrix.rsmodified+49 -4
@@ -20,6 +20,30 @@ struct Source {
20 bits: u32,20 bits: u32,
21 }21 }
22 22
23+/// Fixture-presence probe for the encoder matrix corpus.
24+/// Returns whether the fixture is present, but never silently: under
25+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
26+/// and the script that regenerates it, so a host whose fixture library drifted
27+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
28+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
29+/// short-circuited because the probe ran first in a compound `if`).
30+///
31+/// Order is load-bearing: probe, assert, return. Never merge the probe into
32+/// the same `if` as the escape.
33+fn require_fixture(path: &Path, generator: &str) -> bool {
34+ let present = path.exists();
35+ assert!(
36+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
37+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
38+ path.display(),
39+ generator
40+ );
41+ if !present {
42+ eprintln!("SKIP: fixture {} absent", path.display());
43+ }
44+ present
45+}
46+
23 fn fixtures() -> PathBuf {47 fn fixtures() -> PathBuf {
24 Path::new(env!("CARGO_MANIFEST_DIR")).join("../../fixtures")48 Path::new(env!("CARGO_MANIFEST_DIR")).join("../../fixtures")
25 }49 }
@@ -124,7 +148,12 @@ fn matrix() -> Vec<Source> {
124 let audio = fixtures().join("audio");148 let audio = fixtures().join("audio");
125 let vectors = fixtures().join("vectors/flac-xiph/flac-test-files-main/subset");149 let vectors = fixtures().join("vectors/flac-xiph/flac-test-files-main/subset");
126 let mut paths: Vec<PathBuf> = Vec::new();150 let mut paths: Vec<PathBuf> = Vec::new();
127- if let Ok(entries) = std::fs::read_dir(&audio) {151+ // Probe first, assert inside the helper, and only then take the empty-list
152+ // branch: under EC_REQUIRE_FIXTURES the assert fires instead of a silent
153+ // skip that leaves every loop below running zero times.
154+ if require_fixture(&audio, "scripts/gen-fixtures.sh") {
155+ let entries = std::fs::read_dir(&audio)
156+ .unwrap_or_else(|e| panic!("read fixture dir {}: {e}", audio.display()));
128 let mut found: Vec<PathBuf> = entries157 let mut found: Vec<PathBuf> = entries
129 .filter_map(|e| e.ok().map(|e| e.path()))158 .filter_map(|e| e.ok().map(|e| e.path()))
130 .filter(|p| {159 .filter(|p| {
@@ -136,6 +165,7 @@ fn matrix() -> Vec<Source> {
136 paths.append(&mut found);165 paths.append(&mut found);
137 }166 }
138 // Depth coverage the generated fixtures do not have: 24- and 20-bit.167 // Depth coverage the generated fixtures do not have: 24- and 20-bit.
168+ if require_fixture(&vectors, "scripts/fetch-vectors.sh") {
139 for name in [169 for name in [
140 "28 - high resolution audio, default settings.flac",170 "28 - high resolution audio, default settings.flac",
141 "37 - 20 bit per sample.flac",171 "37 - 20 bit per sample.flac",
@@ -145,6 +175,7 @@ fn matrix() -> Vec<Source> {
145 paths.push(p);175 paths.push(p);
146 }176 }
147 }177 }
178+ }
148 paths.iter().filter_map(|p| probe(p)).collect()179 paths.iter().filter_map(|p| probe(p)).collect()
149 }180 }
150 181
@@ -155,6 +186,12 @@ fn encoded_streams_decode_back_bit_exact_through_ffmpeg() {
155 eprintln!("skipped: fixtures not generated");186 eprintln!("skipped: fixtures not generated");
156 return;187 return;
157 }188 }
189+ // Non-empty floor: the loop below must run, not zero times.
190+ assert!(
191+ sources.len() >= 5,
192+ "encoder matrix holds {} usable sources, expected at least 5",
193+ sources.len()
194+ );
158 let dir = workdir("roundtrip");195 let dir = workdir("roundtrip");
159 let config = EncoderConfig::default();196 let config = EncoderConfig::default();
160 let mut failures = Vec::new();197 let mut failures = Vec::new();
@@ -227,10 +264,18 @@ fn encoded_streams_decode_back_bit_exact_through_ffmpeg() {
227 264
228 #[test]265 #[test]
229 fn our_streams_survive_a_probe_and_state_their_shape() {266 fn our_streams_survive_a_probe_and_state_their_shape() {
230- let Some(source) = matrix().into_iter().find(|s| s.channels == 6) else {267+ // The 5.1 source this test needs is a named fixture, not a shape we hope the
231- eprintln!("skipped: no 5.1 fixture");268+ // matrix happens to contain: probe it first so EC_REQUIRE_FIXTURES fails on
269+ // a drifted library instead of skipping.
270+ let surround = fixtures().join("audio/flac-5.1-44100.flac");
271+ if !require_fixture(&surround, "scripts/gen-fixtures.sh") {
232 return;272 return;
233- };273+ }
274+ let source = matrix()
275+ .into_iter()
276+ .find(|s| s.channels == 6)
277+ .or_else(|| probe(&surround))
278+ .expect("5.1 source in the encoder matrix");
234 let dir = workdir("probe");279 let dir = workdir("probe");
235 let pcm = ffmpeg_pcm(&source.path, source.bits);280 let pcm = ffmpeg_pcm(&source.path, source.bits);
236 let samples = samples_from_pcm(&pcm, source.bits);281 let samples = samples_from_pcm(&pcm, source.bits);
crates/ec-h264/tests/encode.rsmodified+35 -3
@@ -435,6 +435,30 @@ fn have_ffmpeg() -> bool {
435 .is_ok_and(|s| s.success())435 .is_ok_and(|s| s.success())
436 }436 }
437 437
438+/// Fixture-presence probe for `<what this test needs>`.
439+/// Returns whether the fixture is present, but never silently: under
440+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
441+/// and the script that regenerates it, so a host whose fixture library drifted
442+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
443+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
444+/// short-circuited because the probe ran first in a compound `if`).
445+///
446+/// Order is load-bearing: probe, assert, return. Never merge the probe into
447+/// the same `if` as the escape.
448+fn require_fixture(path: &std::path::Path, generator: &str) -> bool {
449+ let present = path.exists();
450+ assert!(
451+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
452+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
453+ path.display(),
454+ generator
455+ );
456+ if !present {
457+ eprintln!("SKIP: fixture {} absent", path.display());
458+ }
459+ present
460+}
461+
438 /// Decode an Annex B stream with ffmpeg, returning one I420 triple per picture.462 /// Decode an Annex B stream with ffmpeg, returning one I420 triple per picture.
439 fn ffmpeg_decode(stream: &[u8], w: usize, h: usize, extra: &[&str]) -> Option<Vec<Planes>> {463 fn ffmpeg_decode(stream: &[u8], w: usize, h: usize, extra: &[&str]) -> Option<Vec<Planes>> {
440 // Distinct per call, not per process: several #[test]s in this binary464 // Distinct per call, not per process: several #[test]s in this binary
@@ -702,10 +726,10 @@ fn real_library_frames_encode_and_decode_exactly() {
702 }726 }
703 let manifest = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))727 let manifest = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
704 .join("../../fixtures/real-library-manifest.tsv");728 .join("../../fixtures/real-library-manifest.tsv");
705- let Ok(text) = std::fs::read_to_string(&manifest) else {729+ if !require_fixture(&manifest, "scripts/scan-real-library.sh") {
706- eprintln!("SKIP real_library_frames: {} missing", manifest.display());
707 return;730 return;
708- };731+ }
732+ let text = std::fs::read_to_string(&manifest).expect("manifest reads");
709 // The first 8-bit 4:2:0 H.264 mp4 of at least 720p in the manifest.733 // The first 8-bit 4:2:0 H.264 mp4 of at least 720p in the manifest.
710 let mut source = None;734 let mut source = None;
711 for line in text.lines().skip(1) {735 for line in text.lines().skip(1) {
@@ -726,6 +750,14 @@ fn real_library_frames_encode_and_decode_exactly() {
726 break;750 break;
727 }751 }
728 let Some((path, w, h)) = source else {752 let Some((path, w, h)) = source else {
753+ // A manifest with no qualifying row is a corpus that drifted, not a
754+ // reason to report PASS for a sweep that never ran.
755+ assert!(
756+ std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
757+ "EC_REQUIRE_FIXTURES=1 but {} lists no H.264 4:2:0 mp4 of at least \
758+ 720p -- regenerate with: scripts/scan-real-library.sh",
759+ manifest.display()
760+ );
729 eprintln!("SKIP real_library_frames: no H.264 4:2:0 mp4 in the manifest");761 eprintln!("SKIP real_library_frames: no H.264 4:2:0 mp4 in the manifest");
730 return;762 return;
731 };763 };
crates/ec-mp3/tests/encode_matrix.rsmodified+52 -8
@@ -45,6 +45,30 @@ fn fixtures() -> PathBuf {
45 Path::new(env!("CARGO_MANIFEST_DIR")).join("../../fixtures")45 Path::new(env!("CARGO_MANIFEST_DIR")).join("../../fixtures")
46 }46 }
47 47
48+/// Fixture-presence probe for the encoder matrix corpus.
49+/// Returns whether the fixture is present, but never silently: under
50+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
51+/// and the script that regenerates it, so a host whose fixture library drifted
52+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
53+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
54+/// short-circuited because the probe ran first in a compound `if`).
55+///
56+/// Order is load-bearing: probe, assert, return. Never merge the probe into
57+/// the same `if` as the escape.
58+fn require_fixture(path: &Path, generator: &str) -> bool {
59+ let present = path.exists();
60+ assert!(
61+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
62+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
63+ path.display(),
64+ generator
65+ );
66+ if !present {
67+ eprintln!("SKIP: fixture {} absent", path.display());
68+ }
69+ present
70+}
71+
48 fn workdir(test: &str) -> PathBuf {72 fn workdir(test: &str) -> PathBuf {
49 let dir = std::env::temp_dir().join(format!("ec-mp3-{}-{test}", std::process::id()));73 let dir = std::env::temp_dir().join(format!("ec-mp3-{}-{test}", std::process::id()));
50 std::fs::create_dir_all(&dir).expect("create work dir");74 std::fs::create_dir_all(&dir).expect("create work dir");
@@ -360,11 +384,15 @@ fn vbr_mean_bitrate_tracks_quality_on_music() {
360 #[test]384 #[test]
361 fn encodes_above_the_incumbent_bar() {385 fn encodes_above_the_incumbent_bar() {
362 let dir = fixtures().join("audio");386 let dir = fixtures().join("audio");
387+ // Probe first, assert inside the helper, and only then take the empty-list
388+ // branch: under EC_REQUIRE_FIXTURES the assert fires instead of a silent
389+ // skip that leaves every row below running zero times.
390+ if !require_fixture(&dir, "scripts/gen-fixtures.sh") {
391+ return;
392+ }
363 let mut sources: Vec<PathBuf> = std::fs::read_dir(&dir)393 let mut sources: Vec<PathBuf> = std::fs::read_dir(&dir)
364- .into_iter()394+ .unwrap_or_else(|e| panic!("read fixture dir {}: {e}", dir.display()))
365- .flatten()395+ .filter_map(|e| e.ok().map(|e| e.path()))
366- .flatten()
367- .map(|e| e.path())
368 .filter(|p| {396 .filter(|p| {
369 let name = p.file_name().map(|n| n.to_string_lossy().to_string());397 let name = p.file_name().map(|n| n.to_string_lossy().to_string());
370 name.is_some_and(|n| n.starts_with("wav16-") || n.starts_with("mp3src-"))398 name.is_some_and(|n| n.starts_with("wav16-") || n.starts_with("mp3src-"))
@@ -376,10 +404,17 @@ fn encodes_above_the_incumbent_bar() {
376 let name = p.file_name().unwrap().to_string_lossy().to_string();404 let name = p.file_name().unwrap().to_string_lossy().to_string();
377 name.contains("mono") || name.contains("stereo")405 name.contains("mono") || name.contains("stereo")
378 });406 });
379- if sources.is_empty() {407+ // The corpus is eight committed WAVs (four `mp3src-*`, four `wav16-*`),
380- eprintln!("no WAV fixtures: run scripts/gen-fixtures.sh");408+ // all produced by `scripts/gen-fixtures.sh`. Fewer than all eight means
381- return;409+ // the library drifted, not that the rows passed.
382- }410+ assert!(
411+ sources.len() >= 8,
412+ "only {} of the 8 mp3 encoder-matrix WAV fixtures are present in {} -- \
413+ regenerate with: scripts/gen-fixtures.sh",
414+ sources.len(),
415+ dir.display()
416+ );
417+ let mut decoded_rows = 0usize;
383 let work = workdir("encode");418 let work = workdir("encode");
384 println!(419 println!(
385 "{:<30} {:>5} {:>6} {:>3} {:>9} {:>8} {:>9}",420 "{:<30} {:>5} {:>6} {:>3} {:>9} {:>8} {:>9}",
@@ -390,6 +425,7 @@ fn encodes_above_the_incumbent_bar() {
390 let Some((pcm, rate, channels)) = read_wav(source) else {425 let Some((pcm, rate, channels)) = read_wav(source) else {
391 continue;426 continue;
392 };427 };
428+ decoded_rows += 1;
393 for kbps in BITRATES {429 for kbps in BITRATES {
394 let bar = bar_for(&source.file_name().unwrap().to_string_lossy(), kbps);430 let bar = bar_for(&source.file_name().unwrap().to_string_lossy(), kbps);
395 let bytes = encode(&pcm, rate, channels, kbps);431 let bytes = encode(&pcm, rate, channels, kbps);
@@ -455,6 +491,14 @@ fn encodes_above_the_incumbent_bar() {
455 }491 }
456 }492 }
457 }493 }
494+ // A present-but-unreadable WAV takes the `read_wav` skip above, so the
495+ // corpus count alone would leave this green having measured nothing.
496+ assert!(
497+ decoded_rows == sources.len(),
498+ "only {decoded_rows} of {} fixtures decoded; a present fixture that \
499+ ffmpeg cannot read is a broken fixture, not a passing row",
500+ sources.len()
501+ );
458 assert!(failures.is_empty(), "{failures:#?}");502 assert!(failures.is_empty(), "{failures:#?}");
459 }503 }
460 504
crates/ec-vorbis/tests/oracle.rsmodified+207 -46
@@ -603,7 +603,11 @@ fn onset_after_silence_has_no_pre_echo() {
603 // last few hundred samples before it cannot hide behind a guard band, and603 // last few hundred samples before it cannot hide behind a guard band, and
604 // the peak is barred too.604 // the peak is barred too.
605 let amp = 0.7f64;605 let amp = 0.7f64;
606- for (rate, layouts) in [(44_100u32, &[1usize, 2][..]), (48_000, &[1, 2, 6]), (96_000, &[6])] {606+ for (rate, layouts) in [
607+ (44_100u32, &[1usize, 2][..]),
608+ (48_000, &[1, 2, 6]),
609+ (96_000, &[6]),
610+ ] {
607 let grid = 16 * 1024usize;611 let grid = 16 * 1024usize;
608 let onsets = [0.3333f64, 0.5, 0.7321, 0.9137, 1.0]612 let onsets = [0.3333f64, 0.5, 0.7321, 0.9137, 1.0]
609 .into_iter()613 .into_iter()
@@ -618,7 +622,8 @@ fn onset_after_silence_has_no_pre_echo() {
618 let start = onset + 11 * c;622 let start = onset + 11 * c;
619 for i in 0..tone_len {623 for i in 0..tone_len {
620 let t = i as f64 / f64::from(rate);624 let t = i as f64 / f64::from(rate);
621- plane[start + i] = (amp * (2.0 * std::f64::consts::PI * hz * t).sin()) as f32;625+ plane[start + i] =
626+ (amp * (2.0 * std::f64::consts::PI * hz * t).sin()) as f32;
622 }627 }
623 }628 }
624 let name = format!("onset-{rate}-{channels}ch-{onset}.ogg");629 let name = format!("onset-{rate}-{channels}ch-{onset}.ogg");
@@ -650,7 +655,10 @@ fn onset_after_silence_has_no_pre_echo() {
650 gap_rms <= 0.002 * tone_rms,655 gap_rms <= 0.002 * tone_rms,
651 "{name}/{label} ch{c}: gap RMS {gap_rms:.6} vs tone RMS {tone_rms:.6}"656 "{name}/{label} ch{c}: gap RMS {gap_rms:.6} vs tone RMS {tone_rms:.6}"
652 );657 );
653- assert!(f64::from(peak) <= 0.01 * amp, "{name}/{label} ch{c}: gap peak {peak:.4}");658+ assert!(
659+ f64::from(peak) <= 0.01 * amp,
660+ "{name}/{label} ch{c}: gap peak {peak:.4}"
661+ );
654 }662 }
655 };663 };
656 let (ours, _) = our_decode(&path);664 let (ours, _) = our_decode(&path);
@@ -717,8 +725,8 @@ fn the_rate_loop_tracks_the_target_bitrate() {
717 fn quiet_content_reaches_the_target_or_is_transparent() {725 fn quiet_content_reaches_the_target_or_is_transparent() {
718 let rate = 48_000u32;726 let rate = 48_000u32;
719 let samples = rate as usize * 3;727 let samples = rate as usize * 3;
720- let fixture = ffmpeg_decode(&fixtures().join("audio/wav16-stereo-48000.wav"))728+ let fixture =
721- .expect("fixture decodes");729+ ffmpeg_decode(&fixtures().join("audio/wav16-stereo-48000.wav")).expect("fixture decodes");
722 assert_eq!(fixture.1, rate);730 assert_eq!(fixture.1, rate);
723 let attenuate = |mut source: Vec<Vec<f32>>| {731 let attenuate = |mut source: Vec<Vec<f32>>| {
724 for channel in source.iter_mut() {732 for channel in source.iter_mut() {
@@ -740,7 +748,10 @@ fn quiet_content_reaches_the_target_or_is_transparent() {
740 .fold(1.0f64, f64::min)748 .fold(1.0f64, f64::min)
741 };749 };
742 let loud = busy(2, rate, samples);750 let loud = busy(2, rate, samples);
743- let loud_corr = corr_at(&encode_to_file(&loud, rate, 128_000, "loud-128k.ogg"), &loud);751+ let loud_corr = corr_at(
752+ &encode_to_file(&loud, rate, 128_000, "loud-128k.ogg"),
753+ &loud,
754+ );
744 let quiet_noise = attenuate(loud);755 let quiet_noise = attenuate(loud);
745 let mut quiet_tones = attenuate(tones(2, rate, samples));756 let mut quiet_tones = attenuate(tones(2, rate, samples));
746 for (channel, noise) in quiet_tones.iter_mut().zip(busy(2, rate, samples)) {757 for (channel, noise) in quiet_tones.iter_mut().zip(busy(2, rate, samples)) {
@@ -757,11 +768,19 @@ fn quiet_content_reaches_the_target_or_is_transparent() {
757 let mut measured = Vec::new();768 let mut measured = Vec::new();
758 let mut spent = Vec::new();769 let mut spent = Vec::new();
759 for target in [96_000i32, 128_000, 192_000] {770 for target in [96_000i32, 128_000, 192_000] {
760- let path = encode_to_file(source, rate, target, &format!("{name}-{}k.ogg", target / 1000));771+ let path = encode_to_file(
772+ source,
773+ rate,
774+ target,
775+ &format!("{name}-{}k.ogg", target / 1000),
776+ );
761 let bytes = std::fs::metadata(&path).expect("file").len();777 let bytes = std::fs::metadata(&path).expect("file").len();
762 let kbps = bytes as f64 * 8.0 * f64::from(rate) / source[0].len() as f64 / 1000.0;778 let kbps = bytes as f64 * 8.0 * f64::from(rate) / source[0].len() as f64 / 1000.0;
763 let corr = corr_at(&path, source);779 let corr = corr_at(&path, source);
764- println!("{name}: target {} kbps -> {kbps:.0} kbps, corr {corr:.4}", target / 1000);780+ println!(
781+ "{name}: target {} kbps -> {kbps:.0} kbps, corr {corr:.4}",
782+ target / 1000
783+ );
765 let target_kbps = f64::from(target) / 1000.0;784 let target_kbps = f64::from(target) / 1000.0;
766 let within_25pct = (kbps - target_kbps).abs() / target_kbps < 0.25;785 let within_25pct = (kbps - target_kbps).abs() / target_kbps < 0.25;
767 let transparent_undershoot = kbps < target_kbps && corr >= 0.999;786 let transparent_undershoot = kbps < target_kbps && corr >= 0.999;
@@ -776,7 +795,10 @@ fn quiet_content_reaches_the_target_or_is_transparent() {
776 }795 }
777 }796 }
778 if spent.iter().all(|&s| s) {797 if spent.iter().all(|&s| s) {
779- assert!(measured[0] < measured[1] && measured[1] < measured[2], "{name}: {measured:?}");798+ assert!(
799+ measured[0] < measured[1] && measured[1] < measured[2],
800+ "{name}: {measured:?}"
801+ );
780 }802 }
781 }803 }
782 }804 }
@@ -800,7 +822,10 @@ fn residue_histogram_vs_reference() {
800 ("reell", "~/Music/reell.mp4"),822 ("reell", "~/Music/reell.mp4"),
801 ("reelm", "~/Music/reelm.wav"),823 ("reelm", "~/Music/reelm.wav"),
802 ("dl8a", "~/Downloads/8a3b6d1d19.mp3"),824 ("dl8a", "~/Downloads/8a3b6d1d19.mp3"),
803- ("hein", "~/Downloads/reelm.mp3"),825+ (
826+ "hein",
827+ "~/Downloads/reelm.mp3",
828+ ),
804 ];829 ];
805 let bitrate = 128_000i32;830 let bitrate = 128_000i32;
806 let rate = 48_000u32;831 let rate = 48_000u32;
@@ -812,11 +837,17 @@ fn residue_histogram_vs_reference() {
812 std::fs::create_dir_all(&out_dir).expect("out dir");837 std::fs::create_dir_all(&out_dir).expect("out dir");
813 let mut report = String::new();838 let mut report = String::new();
814 report.push_str("# Residue histogram: ours vs libvorbis reference\n\n");839 report.push_str("# Residue histogram: ours vs libvorbis reference\n\n");
815- report.push_str(&format!("Bitrate: {} kbps, {} Hz, {}ch, {} s max\n\n",840+ report.push_str(&format!(
816- bitrate / 1000, rate, channels, max_samples / rate as usize));841+ "Bitrate: {} kbps, {} Hz, {}ch, {} s max\n\n",
842+ bitrate / 1000,
843+ rate,
844+ channels,
845+ max_samples / rate as usize
846+ ));
817 let mut total_ours_bytes = 0u64;847 let mut total_ours_bytes = 0u64;
818 let mut total_ref_bytes = 0u64;848 let mut total_ref_bytes = 0u64;
819 849
850+ let mut rows = 0usize;
820 for &(name, src_path) in sources {851 for &(name, src_path) in sources {
821 let expanded = shellexpand(src_path);852 let expanded = shellexpand(src_path);
822 let src = PathBuf::from(&expanded);853 let src = PathBuf::from(&expanded);
@@ -824,6 +855,7 @@ fn residue_histogram_vs_reference() {
824 report.push_str(&format!("## {name}: SKIP (file not found: {expanded})\n\n"));855 report.push_str(&format!("## {name}: SKIP (file not found: {expanded})\n\n"));
825 continue;856 continue;
826 }857 }
858+ rows += 1;
827 // Decode source with ffmpeg, limit duration.859 // Decode source with ffmpeg, limit duration.
828 let Some((source_pcm, src_rate)) = ffmpeg_decode_limited(&src, rate, max_samples) else {860 let Some((source_pcm, src_rate)) = ffmpeg_decode_limited(&src, rate, max_samples) else {
829 report.push_str(&format!("## {name}: SKIP (ffmpeg decode failed)\n\n"));861 report.push_str(&format!("## {name}: SKIP (ffmpeg decode failed)\n\n"));
@@ -856,9 +888,19 @@ fn residue_histogram_vs_reference() {
856 // target; audio-only input encodes at the requested rate.888 // target; audio-only input encodes at the requested rate.
857 .args(["-y", "-v", "error", "-i"])889 .args(["-y", "-v", "error", "-i"])
858 .arg(&src)890 .arg(&src)
859- .args(["-vn", "-t", &format!("{}", max_samples / rate as usize),891+ .args([
860- "-ac", "2", "-ar", "48000",892+ "-vn",
861- "-c:a", "libvorbis", "-b:a", "128k"])893+ "-t",
894+ &format!("{}", max_samples / rate as usize),
895+ "-ac",
896+ "2",
897+ "-ar",
898+ "48000",
899+ "-c:a",
900+ "libvorbis",
901+ "-b:a",
902+ "128k",
903+ ])
862 .arg(&ref_ogg)904 .arg(&ref_ogg)
863 .status();905 .status();
864 let (ref_residue, ref_split) = match ref_status {906 let (ref_residue, ref_split) = match ref_status {
@@ -919,11 +961,27 @@ fn residue_histogram_vs_reference() {
919 let r_spend: u64 = r[1..].iter().sum();961 let r_spend: u64 = r[1..].iter().sum();
920 let ratio = if r_spend > 0 {962 let ratio = if r_spend > 0 {
921 o_spend as f64 / r_spend as f64963 o_spend as f64 / r_spend as f64
922- } else { f64::INFINITY };964+ } else {
965+ f64::INFINITY
966+ };
923 report.push_str(&format!(967 report.push_str(&format!(
924 "| {} | {}/{} | {}/{} | {}/{} | {}/{} | {}/{} | {}/{} | {}/{} | {:.2} |\n",968 "| {} | {}/{} | {}/{} | {}/{} | {}/{} | {}/{} | {}/{} | {}/{} | {:.2} |\n",
925- band, o[0], r[0], o[1], r[1], o[2], r[2], o[3], r[3], o[4], r[4], o[5], r[5],969+ band,
926- o_total, r_total, ratio,970+ o[0],
971+ r[0],
972+ o[1],
973+ r[1],
974+ o[2],
975+ r[2],
976+ o[3],
977+ r[3],
978+ o[4],
979+ r[4],
980+ o[5],
981+ r[5],
982+ o_total,
983+ r_total,
984+ ratio,
927 ));985 ));
928 }986 }
929 987
@@ -967,18 +1025,26 @@ fn residue_histogram_vs_reference() {
967 report.push_str(&format!(1025 report.push_str(&format!(
968 "\nshape Bark 3-22: max dist {max_d:.3}, bands >= 0.15: {over}/{} — {}\n",1026 "\nshape Bark 3-22: max dist {max_d:.3}, bands >= 0.15: {over}/{} — {}\n",
969 in_scope.len(),1027 in_scope.len(),
970- if over == 0 { "SHAPE PASS" } else { "shape fail" },1028+ if over == 0 {
1029+ "SHAPE PASS"
1030+ } else {
1031+ "shape fail"
1032+ },
971 ));1033 ));
972 }1034 }
973 report.push_str("\n");1035 report.push_str("\n");
974 }1036 }
975 1037
1038+ // The seven sources are the user's own library, so each may be absent on a
1039+ // given host -- but a run that encoded none of them is a measurement of
1040+ // nothing, and the report it writes looks the same as a real one.
1041+ assert!(rows > 0, "no library sources were readable");
976 report.push_str(&format!(1042 report.push_str(&format!(
977 "\nTotal bytes: ours {total_ours_bytes} vs ref {total_ref_bytes} ({:.2}x)\n",1043 "\nTotal bytes: ours {total_ours_bytes} vs ref {total_ref_bytes} ({:.2}x)\n",
978 total_ours_bytes as f64 / total_ref_bytes as f64,1044 total_ours_bytes as f64 / total_ref_bytes as f64,
979 ));1045 ));
980- let report_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))1046+ let report_path =
981- .join("../../lanes/vorbis-psy-r1.histogram.txt");1047+ PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../../lanes/vorbis-psy-r1.histogram.txt");
982 let mut f = File::create(&report_path).expect("create report");1048 let mut f = File::create(&report_path).expect("create report");
983 f.write_all(report.as_bytes()).expect("write report");1049 f.write_all(report.as_bytes()).expect("write report");
984 println!("Histogram report: {}", report_path.display());1050 println!("Histogram report: {}", report_path.display());
@@ -1028,7 +1094,10 @@ fn decode_capture(path: &Path) -> Vec<(usize, Vec<Vec<i32>>)> {
1028 1094
1029 /// Bit split summed over the stream: (floor bits, residue bits, packet bits,1095 /// Bit split summed over the stream: (floor bits, residue bits, packet bits,
1030 /// non-zero residue count) — bits per coded value is the coding-efficiency oracle.1096 /// non-zero residue count) — bits per coded value is the coding-efficiency oracle.
1031-fn bit_split_summary(split: &[(u64, u64, u64)], residue: &[(usize, Vec<Vec<i32>>)]) -> (u64, u64, u64, u64) {1097+fn bit_split_summary(
1098+ split: &[(u64, u64, u64)],
1099+ residue: &[(usize, Vec<Vec<i32>>)],
1100+) -> (u64, u64, u64, u64) {
1032 let (mut f, mut r, mut p) = (0u64, 0u64, 0u64);1101 let (mut f, mut r, mut p) = (0u64, 0u64, 0u64);
1033 for &(a, b, c) in split {1102 for &(a, b, c) in split {
1034 f += a;1103 f += a;
@@ -1037,7 +1106,11 @@ fn bit_split_summary(split: &[(u64, u64, u64)], residue: &[(usize, Vec<Vec<i32>>
1037 }1106 }
1038 let nz: u64 = residue1107 let nz: u64 = residue
1039 .iter()1108 .iter()
1040- .map(|(_, chs)| chs.iter().map(|c| c.iter().filter(|&&v| v != 0).count() as u64).sum::<u64>())1109+ .map(|(_, chs)| {
1110+ chs.iter()
1111+ .map(|c| c.iter().filter(|&&v| v != 0).count() as u64)
1112+ .sum::<u64>()
1113+ })
1041 .sum();1114 .sum();
1042 (f, r, p, nz)1115 (f, r, p, nz)
1043 }1116 }
@@ -1100,25 +1173,45 @@ fn compare_captures(
1100 }1173 }
1101 }1174 }
1102 if diffs.is_empty() {1175 if diffs.is_empty() {
1103- (true, format!("identical histograms ({} vs {} blocks)", a.len(), b.len()))1176+ (
1177+ true,
1178+ format!("identical histograms ({} vs {} blocks)", a.len(), b.len()),
1179+ )
1104 } else {1180 } else {
1105- (false, format!(1181+ (
1182+ false,
1183+ format!(
1106 "{} vs {} blocks; first diffs: {}",1184 "{} vs {} blocks; first diffs: {}",
1107 a.len(),1185 a.len(),
1108 b.len(),1186 b.len(),
1109 diffs.iter().take(5).cloned().collect::<Vec<_>>().join("; ")1187 diffs.iter().take(5).cloned().collect::<Vec<_>>().join("; ")
1110- ))1188+ ),
1189+ )
1111 }1190 }
1112 }1191 }
1113 1192
1114 /// Decode with ffmpeg into planar f32, resampled to `rate`, limited to `max_samples`.1193 /// Decode with ffmpeg into planar f32, resampled to `rate`, limited to `max_samples`.
1115-fn ffmpeg_decode_limited(path: &Path, rate: u32, max_samples: usize) -> Option<(Vec<Vec<f32>>, u32)> {1194+fn ffmpeg_decode_limited(
1195+ path: &Path,
1196+ rate: u32,
1197+ max_samples: usize,
1198+) -> Option<(Vec<Vec<f32>>, u32)> {
1116 let out = Command::new("ffmpeg")1199 let out = Command::new("ffmpeg")
1117 .args(["-v", "error", "-i"])1200 .args(["-v", "error", "-i"])
1118 .arg(path)1201 .arg(path)
1119- .args(["-t", &format!("{}", max_samples / rate as usize),1202+ .args([
1120- "-ac", "2", "-ar", &rate.to_string(),1203+ "-t",
1121- "-f", "f32le", "-acodec", "pcm_f32le", "-"])1204+ &format!("{}", max_samples / rate as usize),
1205+ "-ac",
1206+ "2",
1207+ "-ar",
1208+ &rate.to_string(),
1209+ "-f",
1210+ "f32le",
1211+ "-acodec",
1212+ "pcm_f32le",
1213+ "-",
1214+ ])
1122 .output()1215 .output()
1123 .expect("ffmpeg runs");1216 .expect("ffmpeg runs");
1124 if !out.stderr.is_empty() {1217 if !out.stderr.is_empty() {
@@ -1179,7 +1272,6 @@ fn shellexpand(path: &str) -> String {
1179 }1272 }
1180 }1273 }
1181 1274
1182-
1183 /// Full-file sweep over the user's library at the two managed rates: ours1275 /// Full-file sweep over the user's library at the two managed rates: ours
1184 /// encoded at the size libvorbis actually produced (ffmpeg's -b:a is1276 /// encoded at the size libvorbis actually produced (ffmpeg's -b:a is
1185 /// unmanaged VBR, 10-30% under nominal on real music), bytes within ±3% of1277 /// unmanaged VBR, 10-30% under nominal on real music), bytes within ±3% of
@@ -1196,19 +1288,28 @@ fn real_library_sweep_vs_reference() {
1196 ("reell", "~/Music/reell.mp4"),1288 ("reell", "~/Music/reell.mp4"),
1197 ("reelm", "~/Music/reelm.wav"),1289 ("reelm", "~/Music/reelm.wav"),
1198 ("dl8a", "~/Downloads/8a3b6d1d19.mp3"),1290 ("dl8a", "~/Downloads/8a3b6d1d19.mp3"),
1199- ("hein", "~/Downloads/reelm.mp3"),1291+ (
1292+ "hein",
1293+ "~/Downloads/reelm.mp3",
1294+ ),
1200 ];1295 ];
1201 let rate = 48_000u32;1296 let rate = 48_000u32;
1202 let max_samples = rate as usize * 600;1297 let max_samples = rate as usize * 600;
1203 let out_dir = scratch().join("vorbis7-sweep");1298 let out_dir = scratch().join("vorbis7-sweep");
1204 std::fs::create_dir_all(&out_dir).expect("out dir");1299 std::fs::create_dir_all(&out_dir).expect("out dir");
1205- let mut table = String::from("source kbps ours_kbps ref_kbps rate% corr_ours corr_ref gap minsec_o minsec_r drops verdict\n");1300+ let mut table = String::from(
1301+ "source kbps ours_kbps ref_kbps rate% corr_ours corr_ref gap minsec_o minsec_r drops verdict\n",
1302+ );
1206 let mut failures = Vec::new();1303 let mut failures = Vec::new();
1207 let only = std::env::var("SWEEP_ONLY").ok();1304 let only = std::env::var("SWEEP_ONLY").ok();
1208 let dump_drops = std::env::var("DROPS_DUMP").is_ok();1305 let dump_drops = std::env::var("DROPS_DUMP").is_ok();
1209 let mut drops = String::new();1306 let mut drops = String::new();
1307+ let mut rows = 0usize;
1210 for &(name, src_path) in sources {1308 for &(name, src_path) in sources {
1211- if only.as_deref().is_some_and(|o| !o.split(',').any(|n| n == name)) {1309+ if only
1310+ .as_deref()
1311+ .is_some_and(|o| !o.split(',').any(|n| n == name))
1312+ {
1212 continue;1313 continue;
1213 }1314 }
1214 let src = PathBuf::from(shellexpand(src_path));1315 let src = PathBuf::from(shellexpand(src_path));
@@ -1216,6 +1317,7 @@ fn real_library_sweep_vs_reference() {
1216 table.push_str(&format!("{name:<7} - SKIP (missing)\n"));1317 table.push_str(&format!("{name:<7} - SKIP (missing)\n"));
1217 continue;1318 continue;
1218 }1319 }
1320+ rows += 1;
1219 let Some((source_pcm, _)) = ffmpeg_decode_limited(&src, rate, max_samples) else {1321 let Some((source_pcm, _)) = ffmpeg_decode_limited(&src, rate, max_samples) else {
1220 table.push_str(&format!("{name:<7} - SKIP (decode)\n"));1322 table.push_str(&format!("{name:<7} - SKIP (decode)\n"));
1221 continue;1323 continue;
@@ -1229,14 +1331,31 @@ fn real_library_sweep_vs_reference() {
1229 let status = Command::new("ffmpeg")1331 let status = Command::new("ffmpeg")
1230 .args(["-y", "-v", "error", "-i"])1332 .args(["-y", "-v", "error", "-i"])
1231 .arg(&src)1333 .arg(&src)
1232- .args(["-vn", "-t", "600", "-ac", "2", "-ar", "48000", "-c:a", "libvorbis", "-b:a", &format!("{kbps}k")])1334+ .args([
1335+ "-vn",
1336+ "-t",
1337+ "600",
1338+ "-ac",
1339+ "2",
1340+ "-ar",
1341+ "48000",
1342+ "-c:a",
1343+ "libvorbis",
1344+ "-b:a",
1345+ &format!("{kbps}k"),
1346+ ])
1233 .arg(&reference)1347 .arg(&reference)
1234 .status()1348 .status()
1235 .expect("ffmpeg runs");1349 .expect("ffmpeg runs");
1236 assert!(status.success(), "libvorbis encode of {name} at {kbps}k");1350 assert!(status.success(), "libvorbis encode of {name} at {kbps}k");
1237 let bytes = |p: &Path| std::fs::metadata(p).expect("size").len() as f64;1351 let bytes = |p: &Path| std::fs::metadata(p).expect("size").len() as f64;
1238 let ref_kbps = bytes(&reference) * 8.0 / seconds / 1000.0;1352 let ref_kbps = bytes(&reference) * 8.0 / seconds / 1000.0;
1239- let (ours, block_log) = encode_to_file_with_log(&source_pcm, rate, (ref_kbps * 1000.0).round() as i32, &format!("vorbis7-sweep/ours-{name}-{kbps}k.ogg"));1353+ let (ours, block_log) = encode_to_file_with_log(
1354+ &source_pcm,
1355+ rate,
1356+ (ref_kbps * 1000.0).round() as i32,
1357+ &format!("vorbis7-sweep/ours-{name}-{kbps}k.ogg"),
1358+ );
1240 let ours_kbps = bytes(&ours) * 8.0 / seconds / 1000.0;1359 let ours_kbps = bytes(&ours) * 8.0 / seconds / 1000.0;
1241 let rate_pct = (ours_kbps / ref_kbps - 1.0) * 100.0;1360 let rate_pct = (ours_kbps / ref_kbps - 1.0) * 100.0;
1242 // Whole-file corr plus a per-second trace: a dropout (the1361 // Whole-file corr plus a per-second trace: a dropout (the
@@ -1246,12 +1365,18 @@ fn real_library_sweep_vs_reference() {
1246 let corr_of = |p: &Path| -> (f64, Vec<f64>) {1365 let corr_of = |p: &Path| -> (f64, Vec<f64>) {
1247 let (pcm, _) = our_decode(p);1366 let (pcm, _) = our_decode(p);
1248 let n = pcm[0].len().min(source_pcm[0].len());1367 let n = pcm[0].len().min(source_pcm[0].len());
1249- let mean = (0..2).map(|c| correlation(&pcm[c][..n], &source_pcm[c][..n])).sum::<f64>() / 2.0;1368+ let mean = (0..2)
1369+ .map(|c| correlation(&pcm[c][..n], &source_pcm[c][..n]))
1370+ .sum::<f64>()
1371+ / 2.0;
1250 let step = rate as usize;1372 let step = rate as usize;
1251 let per_second = (0..n / step)1373 let per_second = (0..n / step)
1252 .map(|s| {1374 .map(|s| {
1253 let r = s * step..(s + 1) * step;1375 let r = s * step..(s + 1) * step;
1254- (0..2).map(|c| correlation(&pcm[c][r.clone()], &source_pcm[c][r.clone()])).sum::<f64>() / 2.01376+ (0..2)
1377+ .map(|c| correlation(&pcm[c][r.clone()], &source_pcm[c][r.clone()]))
1378+ .sum::<f64>()
1379+ / 2.0
1255 })1380 })
1256 .collect();1381 .collect();
1257 (mean, per_second)1382 (mean, per_second)
@@ -1275,7 +1400,9 @@ fn real_library_sweep_vs_reference() {
1275 .collect();1400 .collect();
1276 let pass = rate_pct.abs() <= 3.0 && gap <= 0.005 && dropouts == 0;1401 let pass = rate_pct.abs() <= 3.0 && gap <= 0.005 && dropouts == 0;
1277 if !pass {1402 if !pass {
1278- failures.push(format!("{name}@{kbps}k rate {rate_pct:+.2}% gap {gap:.4} dropouts {dropouts}"));1403+ failures.push(format!(
1404+ "{name}@{kbps}k rate {rate_pct:+.2}% gap {gap:.4} dropouts {dropouts}"
1405+ ));
1279 }1406 }
1280 table.push_str(&format!(1407 table.push_str(&format!(
1281 "{name:<7} {kbps:<6} {ours_kbps:<9.1} {ref_kbps:<8.1} {rate_pct:+6.2} {corr_ours:<9.4} {corr_ref:<8.4} {gap:<7.4} {min_ours:<8.3} {min_ref:<7.3} {dropouts:<5} {}\n",1408 "{name:<7} {kbps:<6} {ours_kbps:<9.1} {ref_kbps:<8.1} {rate_pct:+6.2} {corr_ours:<9.4} {corr_ref:<8.4} {gap:<7.4} {min_ours:<8.3} {min_ref:<7.3} {dropouts:<5} {}\n",
@@ -1326,6 +1453,7 @@ fn real_library_sweep_vs_reference() {
1326 Path::new(env!("CARGO_MANIFEST_DIR")).join("../../lanes/vorbis-psy-r1.sweep.txt"),1453 Path::new(env!("CARGO_MANIFEST_DIR")).join("../../lanes/vorbis-psy-r1.sweep.txt"),
1327 &table,1454 &table,
1328 );1455 );
1456+ assert!(rows > 0, "no library sources were readable");
1329 assert!(failures.is_empty(), "sweep failures: {failures:?}");1457 assert!(failures.is_empty(), "sweep failures: {failures:?}");
1330 }1458 }
1331 1459
@@ -1385,7 +1513,10 @@ fn band_error_vs_reference() {
1385 ("reell", "~/Music/reell.mp4"),1513 ("reell", "~/Music/reell.mp4"),
1386 ("reelm", "~/Music/reelm.wav"),1514 ("reelm", "~/Music/reelm.wav"),
1387 ("dl8a", "~/Downloads/8a3b6d1d19.mp3"),1515 ("dl8a", "~/Downloads/8a3b6d1d19.mp3"),
1388- ("hein", "~/Downloads/reelm.mp3"),1516+ (
1517+ "hein",
1518+ "~/Downloads/reelm.mp3",
1519+ ),
1389 ];1520 ];
1390 let rate = 48_000u32;1521 let rate = 48_000u32;
1391 let max_samples = rate as usize * 600;1522 let max_samples = rate as usize * 600;
@@ -1412,8 +1543,12 @@ fn band_error_vs_reference() {
1412 let mut bands = String::from("# Band error: ours vs libvorbis, both via our decoder\n\n");1543 let mut bands = String::from("# Band error: ours vs libvorbis, both via our decoder\n\n");
1413 let mut bits = String::from("# Bit split over full sources, same rows as the band error\n\n");1544 let mut bits = String::from("# Bit split over full sources, same rows as the band error\n\n");
1414 let only = std::env::var("SWEEP_ONLY").ok();1545 let only = std::env::var("SWEEP_ONLY").ok();
1546+ let mut rows = 0usize;
1415 for &(name, src_path) in sources {1547 for &(name, src_path) in sources {
1416- if only.as_deref().is_some_and(|o| !o.split(',').any(|n| n == name)) {1548+ if only
1549+ .as_deref()
1550+ .is_some_and(|o| !o.split(',').any(|n| n == name))
1551+ {
1417 continue;1552 continue;
1418 }1553 }
1419 let src = PathBuf::from(shellexpand(src_path));1554 let src = PathBuf::from(shellexpand(src_path));
@@ -1421,6 +1556,7 @@ fn band_error_vs_reference() {
1421 bands.push_str(&format!("## {name}: SKIP (missing)\n\n"));1556 bands.push_str(&format!("## {name}: SKIP (missing)\n\n"));
1422 continue;1557 continue;
1423 }1558 }
1559+ rows += 1;
1424 let Some((source_pcm, _)) = ffmpeg_decode_limited(&src, rate, max_samples) else {1560 let Some((source_pcm, _)) = ffmpeg_decode_limited(&src, rate, max_samples) else {
1425 bands.push_str(&format!("## {name}: SKIP (decode)\n\n"));1561 bands.push_str(&format!("## {name}: SKIP (decode)\n\n"));
1426 continue;1562 continue;
@@ -1433,7 +1569,19 @@ fn band_error_vs_reference() {
1433 let status = Command::new("ffmpeg")1569 let status = Command::new("ffmpeg")
1434 .args(["-y", "-v", "error", "-i"])1570 .args(["-y", "-v", "error", "-i"])
1435 .arg(&src)1571 .arg(&src)
1436- .args(["-vn", "-t", "600", "-ac", "2", "-ar", "48000", "-c:a", "libvorbis", "-b:a", &format!("{kbps}k")])1572+ .args([
1573+ "-vn",
1574+ "-t",
1575+ "600",
1576+ "-ac",
1577+ "2",
1578+ "-ar",
1579+ "48000",
1580+ "-c:a",
1581+ "libvorbis",
1582+ "-b:a",
1583+ &format!("{kbps}k"),
1584+ ])
1437 .arg(&reference)1585 .arg(&reference)
1438 .status()1586 .status()
1439 .expect("ffmpeg runs");1587 .expect("ffmpeg runs");
@@ -1457,7 +1605,10 @@ fn band_error_vs_reference() {
1457 };1605 };
1458 let (ref_pcm, ref_split) = {1606 let (ref_pcm, ref_split) = {
1459 let (residue, split) = decode_capture_with_bits(&reference);1607 let (residue, split) = decode_capture_with_bits(&reference);
1460- (our_decode(&reference).0, bit_split_summary(&split, &residue))1608+ (
1609+ our_decode(&reference).0,
1610+ bit_split_summary(&split, &residue),
1611+ )
1461 };1612 };
1462 1613
1463 // Bit-split block: (floor, residue, packet, non-zero) per stream.1614 // Bit-split block: (floor, residue, packet, non-zero) per stream.
@@ -1494,8 +1645,9 @@ fn band_error_vs_reference() {
1494 let (mut e_src, mut e_ours, mut e_ref) =1645 let (mut e_src, mut e_ours, mut e_ref) =
1495 (vec![0f64; nb], vec![0f64; nb], vec![0f64; nb]);1646 (vec![0f64; nb], vec![0f64; nb], vec![0f64; nb]);
1496 let (mut err_ours, mut err_ref) = (vec![0f64; nb], vec![0f64; nb]);1647 let (mut err_ours, mut err_ref) = (vec![0f64; nb], vec![0f64; nb]);
1497- let mut spec: Vec<(Vec<f64>, Vec<f64>)> =1648+ let mut spec: Vec<(Vec<f64>, Vec<f64>)> = (0..3)
1498- (0..3).map(|_| (vec![0.0; FRAME], vec![0.0; FRAME])).collect();1649+ .map(|_| (vec![0.0; FRAME], vec![0.0; FRAME]))
1650+ .collect();
1499 let mut start = 0;1651 let mut start = 0;
1500 while start + FRAME <= n {1652 while start + FRAME <= n {
1501 for ch in 0..2 {1653 for ch in 0..2 {
@@ -1523,7 +1675,13 @@ fn band_error_vs_reference() {
1523 }1675 }
1524 start += HOP;1676 start += HOP;
1525 }1677 }
1526- let db = |e: f64, s: f64| if s > 0.0 { 10.0 * (e / s).log10() } else { f64::NAN };1678+ let db = |e: f64, s: f64| {
1679+ if s > 0.0 {
1680+ 10.0 * (e / s).log10()
1681+ } else {
1682+ f64::NAN
1683+ }
1684+ };
1527 bands.push_str(&format!(1685 bands.push_str(&format!(
1528 "## {name} @ {kbps}k (ours {ours_kbps:.1} vs ref {ref_kbps:.1} kbps)\n"1686 "## {name} @ {kbps}k (ours {ours_kbps:.1} vs ref {ref_kbps:.1} kbps)\n"
1529 ));1687 ));
@@ -1560,6 +1718,9 @@ fn band_error_vs_reference() {
1560 );1718 );
1561 }1719 }
1562 }1720 }
1721+ // Both report files above are written unconditionally, so a run that
1722+ // measured no source writes a report indistinguishable from a real one.
1723+ assert!(rows > 0, "no library sources were readable");
1563 for (text, file) in [1724 for (text, file) in [
1564 (&bands, "vorbis-psy-r1.bands.txt"),1725 (&bands, "vorbis-psy-r1.bands.txt"),
1565 (&bits, "vorbis-psy-r1.bits.txt"),1726 (&bits, "vorbis-psy-r1.bits.txt"),
crates/ec-vp9/tests/hbd_exact.rsmodified+35 -9
@@ -3,21 +3,47 @@
3 //! yuv420p10le -`). Pre-fix the decoder refuses `profile 2` by name, so this3 //! yuv420p10le -`). Pre-fix the decoder refuses `profile 2` by name, so this
4 //! test fails at the first frame; post-fix every shown frame matches.4 //! test fails at the first frame; post-fix every shown frame matches.
5 //!5 //!
6-//! Media-gated: the 10-bit corpus streams are gitignored, so the test skips6+//! Media-gated: the 10-bit corpus streams are gitignored, so the test prints
7-//! by name when the fixture is absent (set the fixture tree up per the lane7+//! SKIP when the fixture is absent (set the fixture tree up per the lane
8-//! notes). The 4:4:4 and 12-bit shapes are covered by `subsampling_exact.rs`.8+//! notes) -- and goes RED instead under `EC_REQUIRE_FIXTURES=1`, so a drifted
9+//! fixture library can never read as a pass. The 4:4:4 and 12-bit shapes are
10+//! covered by `subsampling_exact.rs`.
9 11
10 mod ivf;12 mod ivf;
11 13
12 use ec_vp9::decode::Decoder;14 use ec_vp9::decode::Decoder;
13 use std::path::{Path, PathBuf};15 use std::path::{Path, PathBuf};
14 16
15-fn fixture(name: &str) -> Option<PathBuf> {17+/// Fixture-presence probe for the 10-bit corpus IVF `profile2_10bit_is_byte_exact`
18+/// decodes and compares against ffmpeg.
19+/// Returns whether the fixture is present, but never silently: under
20+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
21+/// and the script that regenerates it, so a host whose fixture library drifted
22+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
23+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
24+/// short-circuited because the probe ran first in a compound `if`).
25+///
26+/// Order is load-bearing: probe, assert, return. Never merge the probe into
27+/// the same `if` as the escape.
28+fn require_fixture(path: &std::path::Path, generator: &str) -> bool {
29+ let present = path.exists();
30+ assert!(
31+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
32+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
33+ path.display(),
34+ generator
35+ );
36+ if !present {
37+ eprintln!("SKIP: fixture {} absent", path.display());
38+ }
39+ present
40+}
41+
42+fn fixture(name: &str) -> PathBuf {
16 let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR"));43 let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
17 p.pop();44 p.pop();
18 p.pop();45 p.pop();
19- p = p.join("fixtures/bitstreams").join(name);46+ p.join("fixtures/bitstreams").join(name)
20- p.exists().then_some(p)
21 }47 }
22 48
23 /// ffmpeg's rawvideo `yuv420p10le` bytes (little-endian u16 samples,49 /// ffmpeg's rawvideo `yuv420p10le` bytes (little-endian u16 samples,
@@ -56,10 +82,10 @@ fn decode_all(path: &Path) -> (Vec<Vec<u8>>, u8) {
56 /// produces, sample for sample.82 /// produces, sample for sample.
57 #[test]83 #[test]
58 fn profile2_10bit_is_byte_exact() {84 fn profile2_10bit_is_byte_exact() {
59- let Some(a) = fixture("vp9-1080p-23.976-10bit.ivf") else {85+ let a = fixture("vp9-1080p-23.976-10bit.ivf");
60- eprintln!("SKIP profile2_10bit_is_byte_exact: 10-bit fixture absent");86+ if !require_fixture(&a, "scripts/gen-bitstream-fixtures.sh") {
61 return;87 return;
62- };88+ }
63 let (ours, bd) = decode_all(&a);89 let (ours, bd) = decode_all(&a);
64 assert_eq!(bd, 10, "the fixture must decode at 10 bits");90 assert_eq!(bd, 10, "the fixture must decode at 10 bits");
65 let want = ffmpeg_raw_yuv10(&a);91 let want = ffmpeg_raw_yuv10(&a);
crates/ec-vp9/tests/inter_pixels_exact.rsmodified+30 -9
@@ -9,6 +9,30 @@
9 mod ivf;9 mod ivf;
10 10
11 use ec_vp9::decode::Decoder;11 use ec_vp9::decode::Decoder;
12+/// Fixture-presence probe for the 120-frame 1080p corpus IVF
13+/// `corpus_1080p_60fps_matches_ffmpeg_past_frame_72` decodes.
14+/// Returns whether the fixture is present, but never silently: under
15+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
16+/// and the script that regenerates it, so a host whose fixture library drifted
17+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
18+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
19+/// short-circuited because the probe ran first in a compound `if`).
20+///
21+/// Order is load-bearing: probe, assert, return. Never merge the probe into
22+/// the same `if` as the escape.
23+fn require_fixture(path: &std::path::Path, generator: &str) -> bool {
24+ let present = path.exists();
25+ assert!(
26+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
27+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
28+ path.display(),
29+ generator
30+ );
31+ if !present {
32+ eprintln!("SKIP: fixture {} absent", path.display());
33+ }
34+ present
35+}
12 36
13 /// Generate a GOP fixture with libvpx: 6 frames of testsrc2 at 320x240,37 /// Generate a GOP fixture with libvpx: 6 frames of testsrc2 at 320x240,
14 /// `-g 10` so frames 1..5 are inter frames.38 /// `-g 10` so frames 1..5 are inter frames.
@@ -137,17 +161,14 @@ fn inter_gop_with_tile_columns_matches_ffmpeg() {
137 /// TAIL slot set (`write_tx_context`), and the next row of blocks read it161 /// TAIL slot set (`write_tx_context`), and the next row of blocks read it
138 /// as an entropy context. Every shown frame must match ffmpeg.162 /// as an entropy context. Every shown frame must match ffmpeg.
139 ///163 ///
140-/// Media-gated: the corpus fixture is not versioned, so the witness skips164+/// Media-gated: the corpus fixture is not versioned, so the witness prints
141-/// when `fixtures/bitstreams/vp9-1080p-60-8bit.ivf` is absent.165+/// SKIP when `fixtures/bitstreams/vp9-1080p-60-8bit.ivf` is absent -- and goes
166+/// RED instead under `EC_REQUIRE_FIXTURES=1`.
142 #[test]167 #[test]
143 fn corpus_1080p_60fps_matches_ffmpeg_past_frame_72() {168 fn corpus_1080p_60fps_matches_ffmpeg_past_frame_72() {
144- let Some(dir) = ivf::fixture_dir() else {169+ let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
145- println!("SKIP: fixtures/bitstreams absent (media-gated witness)");170+ .join("../../fixtures/bitstreams/vp9-1080p-60-8bit.ivf");
146- return;171+ if !require_fixture(&path, "scripts/gen-bitstream-fixtures.sh") {
147- };
148- let path = dir.join("vp9-1080p-60-8bit.ivf");
149- if !path.exists() {
150- println!("SKIP: {} absent (media-gated witness)", path.display());
151 return;172 return;
152 }173 }
153 let shown = compare(&path);174 let shown = compare(&path);
crates/ec-vp9/tests/scratch_interdump.rsmodified+36 -4
@@ -27,6 +27,30 @@
27 mod ivf;27 mod ivf;
28 28
29 use ec_vp9::decode::Decoder;29 use ec_vp9::decode::Decoder;
30+/// Fixture-presence probe for the inter-frame IVF this gate parses (the
31+/// `INTER_IVF` path, or its generated `/tmp/inter1.ivf` default).
32+/// Returns whether the fixture is present, but never silently: under
33+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
34+/// and how to regenerate it, so a host whose fixture library drifted reports
35+/// RED instead of a green SKIP (class: gate-skips-on-its-own-failure; model
36+/// `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
37+/// short-circuited because the probe ran first in a compound `if`).
38+///
39+/// Order is load-bearing: probe, assert, return. Never merge the probe into
40+/// the same `if` as the escape.
41+fn require_fixture(path: &std::path::Path, generator: &str) -> bool {
42+ let present = path.exists();
43+ assert!(
44+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
45+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
46+ path.display(),
47+ generator
48+ );
49+ if !present {
50+ eprintln!("SKIP: fixture {} absent", path.display());
51+ }
52+ present
53+}
30 54
31 #[test]55 #[test]
32 fn inter_syntax_dump() {56 fn inter_syntax_dump() {
@@ -43,17 +67,25 @@ fn inter_syntax_dump() {
43 } else {67 } else {
44 expect_raw68 expect_raw
45 .split(',')69 .split(',')
46- .map(|t| t.trim().parse().expect("INTER_EXPECT entries are block counts"))70+ .map(|t| {
71+ t.trim()
72+ .parse()
73+ .expect("INTER_EXPECT entries are block counts")
74+ })
47 .collect()75 .collect()
48 };76 };
49- let Ok(bytes) = std::fs::read(&path) else {77+ if !require_fixture(
78+ std::path::Path::new(&path),
79+ "INTER_IVF=<file>; the default is generated, not committed \
80+ (ffmpeg -f lavfi -i testsrc2=... -c:v libvpx-vp9 -f ivf)",
81+ ) {
50 assert!(82 assert!(
51 explicit.is_none(),83 explicit.is_none(),
52 "INTER_IVF={path} was set explicitly but the file does not exist"84 "INTER_IVF={path} was set explicitly but the file does not exist"
53 );85 );
54- println!("SKIP: fixture {path} not found - set INTER_IVF=<file> to run");
55 return;86 return;
56- };87+ }
88+ let bytes = std::fs::read(&path).expect("fixture presence was just probed");
57 let (_fourcc, w, h, frames) = ivf::parse_ivf(&bytes);89 let (_fourcc, w, h, frames) = ivf::parse_ivf(&bytes);
58 println!("IVF {w}x{h} frames={}", frames.len());90 println!("IVF {w}x{h} frames={}", frames.len());
59 let mut dec = Decoder::new();91 let mut dec = Decoder::new();
crates/ec-vp9/tests/subsampling_exact.rsmodified+36 -10
@@ -5,7 +5,9 @@
5 //! Every fixture under `tests/data/` is committed (see the lane report for5 //! Every fixture under `tests/data/` is committed (see the lane report for
6 //! the exact generator commands), so these cases always run; the two6 //! the exact generator commands), so these cases always run; the two
7 //! `corpus_*` cases additionally cover the media-gated 4:4:4 corpus streams7 //! `corpus_*` cases additionally cover the media-gated 4:4:4 corpus streams
8-//! and skip by name when the fixture tree is absent.8+//! and print SKIP when the fixture is absent -- RED instead under
9+//! `EC_REQUIRE_FIXTURES=1`, so a drifted fixture library can never read as a
10+//! pass.
9 //!11 //!
10 //! The comparison is the whole flattened plane stream (u16 samples) against12 //! The comparison is the whole flattened plane stream (u16 samples) against
11 //! ffmpeg's `rawvideo` output for the matching `pix_fmt` — full-resolution13 //! ffmpeg's `rawvideo` output for the matching `pix_fmt` — full-resolution
@@ -17,18 +19,42 @@ mod ivf;
17 use ec_vp9::decode::Decoder;19 use ec_vp9::decode::Decoder;
18 use std::path::{Path, PathBuf};20 use std::path::{Path, PathBuf};
19 21
22+/// Fixture-presence probe for the media-gated 4:4:4 corpus IVFs the `corpus_*`
23+/// cases decode (`corpus()` below, and any path a `scripts/*` generator makes).
24+/// Returns whether the fixture is present, but never silently: under
25+/// `EC_REQUIRE_FIXTURES=1` an absent fixture is a hard failure naming the path
26+/// and the script that regenerates it, so a host whose fixture library drifted
27+/// reports RED instead of a green SKIP (class: gate-skips-on-its-own-failure;
28+/// model `have_ffmpeg` in crates/ec-av1/src/stream.rs, which was silently
29+/// short-circuited because the probe ran first in a compound `if`).
30+///
31+/// Order is load-bearing: probe, assert, return. Never merge the probe into
32+/// the same `if` as the escape.
33+fn require_fixture(path: &std::path::Path, generator: &str) -> bool {
34+ let present = path.exists();
35+ assert!(
36+ present || std::env::var_os("EC_REQUIRE_FIXTURES").is_none(),
37+ "EC_REQUIRE_FIXTURES=1 but fixture {} is absent -- regenerate with: {}",
38+ path.display(),
39+ generator
40+ );
41+ if !present {
42+ eprintln!("SKIP: fixture {} absent", path.display());
43+ }
44+ present
45+}
46+
20 fn data(name: &str) -> PathBuf {47 fn data(name: &str) -> PathBuf {
21 Path::new(env!("CARGO_MANIFEST_DIR"))48 Path::new(env!("CARGO_MANIFEST_DIR"))
22 .join("tests/data")49 .join("tests/data")
23 .join(name)50 .join(name)
24 }51 }
25 52
26-fn corpus(name: &str) -> Option<PathBuf> {53+fn corpus(name: &str) -> PathBuf {
27 let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR"));54 let mut p = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
28 p.pop();55 p.pop();
29 p.pop();56 p.pop();
30- let p = p.join("fixtures/bitstreams").join(name);57+ p.join("fixtures/bitstreams").join(name)
31- p.exists().then_some(p)
32 }58 }
33 59
34 /// ffmpeg's decoded samples as a flat u16 stream (8-bit zero-extended,60 /// ffmpeg's decoded samples as a flat u16 stream (8-bit zero-extended,
@@ -133,18 +159,18 @@ fn profile2_420_12bit_is_byte_exact() {
133 159
134 #[test]160 #[test]
135 fn corpus_profile1_444_matches_ffmpeg() {161 fn corpus_profile1_444_matches_ffmpeg() {
136- let Some(p) = corpus("vp9-profile1-444.ivf") else {162+ let p = corpus("vp9-profile1-444.ivf");
137- eprintln!("SKIP corpus_profile1_444_matches_ffmpeg: fixture absent");163+ if !require_fixture(&p, "scripts/gen-bitstream-fixtures.sh") {
138 return;164 return;
139- };165+ }
140 check(&p, "yuv444p", 8);166 check(&p, "yuv444p", 8);
141 }167 }
142 168
143 #[test]169 #[test]
144 fn corpus_profile3_444_10bit_matches_ffmpeg() {170 fn corpus_profile3_444_10bit_matches_ffmpeg() {
145- let Some(p) = corpus("vp9-profile3-444-10bit.ivf") else {171+ let p = corpus("vp9-profile3-444-10bit.ivf");
146- eprintln!("SKIP corpus_profile3_444_10bit_matches_ffmpeg: fixture absent");172+ if !require_fixture(&p, "scripts/gen-bitstream-fixtures.sh") {
147 return;173 return;
148- };174+ }
149 check(&p, "yuv444p10le", 10);175 check(&p, "yuv444p10le", 10);
150 }176 }
lanes/av1fixlib.report.mdadded+383 -0
@@ -0,0 +1,383 @@
1+# lane-av1fixlib — the fixture preflight, and the sweep that motivated it
2+
3+Branch `lane-av1fixlib`, rebased onto the merge wave (`main` is an ancestor; the
4+last merge is recorded in the log). Not pushed.
5+
6+## What this lane is
7+
8+A test that cannot find its fixture prints `SKIP` and returns, so the suite
9+reports PASS having tested nothing. That cost a 3-hour suite red from a missing
10+repo-root `fixtures/` and three hosts whose fixture libraries differed silently.
11+Two halves: kill the shape in the test crates, and ship a preflight that keeps
12+hosts honest.
13+
14+## 1. The sweep — and what this branch actually carries
15+
16+`EC_REQUIRE_FIXTURES` is the escape: unset, an absent fixture SKIPs as before
17+(local convenience); set, it is a HARD FAILURE naming the path and the script
18+that regenerates it. The helper's order is load-bearing — probe, assert, return
19+— and never a probe folded into the same `if` as the escape, which is the
20+short-circuit that made the in-tree `have_ffmpeg` model silently green.
21+
22+**Crates and files carrying the guard on this branch** (exact list, replacing the
23+earlier "four crates" claim, which was wrong in the same way a stale ignore
24+reason is):
25+
26+| crate | files | what |
27+|---|---|---|
28+| ec-aac | `tests/oracle.rs`, `tests/sbr_real_library.rs` | 5 + 9 fixture sites, plus a `probed >= 16` floor on the synthetic HE-AAC matrix |
29+| ec-flac | `tests/encode_matrix.rs` | corpus guard + a `sources.len() >= 5` floor |
30+| ec-h264 | `tests/encode.rs` | real-library manifest read and its "no H.264 in the manifest" escape |
31+| ec-mp3 | `tests/encode_matrix.rs` | the WAV corpus guard, `>= 8` floor, a `read_dir` that swallowed IO errors as an empty list |
32+| ec-vp9 | `tests/hbd_exact.rs`, `inter_pixels_exact.rs`, `subsampling_exact.rs`, `scratch_interdump.rs` | `Option`-returning corpus helpers and a per-vector skip |
33+| ec-vorbis | `tests/oracle.rs` | **no guard, deliberately** — see below |
34+
35+**ec-vorbis has no `EC_REQUIRE_FIXTURES` guard and does not get one.** Its three
36+fixture sites sweep the operator's own media library; making that a hard failure
37+would turn one person's home directory into a red fleet on every other host. The
38+crate carries non-empty floors instead (`rows > 0` on each sweep), because a run
39+that encoded nothing is a measurement of nothing even when the corpus is
40+legitimately absent.
41+
42+**ec-h264 `conformance.rs`, ec-opus `conformance.rs` and ec-flac
43+`xiph_vectors.rs` are main's version verbatim on this branch.** The wave landed
44+the same class fix for those three crates in its own `require_fixtures` shape.
45+Carrying both would be two conventions in one file and a 1054-line diff in a
46+preflight lane, so the conversion was dropped rather than kept. Residual gaps in
47+main's versions, for whoever owns them: `jvt_full_sequence_bit_exact` still ends
48+in a bare `assert!(failed.is_empty())` over a zero-iteration-capable loop, its
49+per-vector `find_stream(dir) -> None => continue` is still a silent per-vector
50+skip, and `xiph_vectors.rs` still has three loop ends with no floor.
51+
52+Also out of scope by design, and reported rather than converted: tool-absence
53+SKIPs (ffmpeg/x264/aomenc on PATH — a different gate with its own env) and host
54+media corpora.
55+
56+## 2. The preflight
57+
58+`scripts/fixture-library.tsv` is GENERATED, never hand-typed. Columns:
59+
60+```
61+path <TAB> required-by file:line <TAB> class <TAB> generator <TAB> status <TAB> tracked <TAB> sha256
62+```
63+
64+`class` is separate from `generator` because a recovered witness is not a
65+re-encode: `regenerated` (192+ rows, a script reproduces the bytes), `captured`
66+(committed bytes whose only provenance is a gate comment — a FINDING, no recipe
67+recorded), `recovered-original` (the runner-library bytes, sha256 recorded).
68+
69+`scripts/verify-fixture-library.sh` checks SHAPE, RESOLVE (every path exists and
70+every directory is non-empty) and DRIFT (regenerating reproduces the committed
71+ROWS), and distinguishes two failure modes with different fixes:
72+
73+- **mode i** — the fixture ROOT is absent. `fixtures/` is gitignored
74+ (`.gitignore:2`), so a linked worktree never has it; fix the TREE
75+ (`scripts/link-fixtures.sh`, or point `EC_FIXTURES` at a staged library).
76+- **mode ii** — a path is absent, or a directory is empty, INSIDE a tree that has
77+ a root. Fix the LIBRARY: run the generator named in the row.
78+
79+`scripts/pin-gate-audit.py` is the gate census. Matching `crate_pin("X")` is
80+blind to a gate that reads N pins through a directory literal plus a runtime
81+name list — `pinned_warp_stream_decodes_pixel_exact`
82+(`crates/ec-av1/src/stream.rs:31099` in the tree this was written against) reads
83+fourteen that way, none committed under the crate, and the gate is `#[ignore]`d,
84+so it is a no-op that reports nothing. The audit resolves the root literal,
85+strips line comments (the name list has comments between its items, which is
86+why a bracket-shaped parse finds nothing), anchors on the `format!` that
87+consumes the list, and enumerates every runtime name. It also classifies
88+assertions through the helper CALL GRAPH, not the gate body: the warp gate has
89+no `assert` of its own but calls `check_pinned_warp_stream`, which asserts all
90+three planes per frame — a body-only read calls it assertless, which is the
91+misclassification that happened earlier today.
92+
93+Census, identical on this box and on all three runner hosts:
94+
95+```
96+pin gates: total=8 committed=7 uncommitted=14 ignored=3 assertless=0
97+```
98+
99+## 3. The four invariants, and how each fails
100+
101+All four are reported on every run; the count is always printed.
102+
103+1. **No committed pin through the gitignored root.** The shape
104+ `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/<file>")` can never be
105+ satisfied by a committed pin, so its gate skips on every clean checkout and
106+ runner — the film-grain instance combined it with `.unwrap()` and PANICKED
107+ instead. A root *subdirectory* is deliberately not this shape: a generator
108+ produces those.
109+2. **Every committed pin present AND tracked.** A pin on disk but untracked dies
110+ with the machine's scratchpad and its gate skips GREEN. `tracked` is
111+ computed at generation time, so a host with no `.git` asserts the committed
112+ value.
113+3. **The `.gitignore` negation is intact** — `!crates/*/fixtures/**` checked
114+ statically (works with no `.git`), plus `git check-ignore` in a git tree. A
115+ plain `git add` of a new pin has to work: that is what let four recovered and
116+ three regenerated pins land today.
117+4. **The pin-reading gate census** above, including the bare-directory verdict.
118+
119+**Exit status: shape is now FATAL BY DEFAULT.** The LIBRARY verdict (mode i, mode ii,
120+drift) decides the exit under `EC_REQUIRE_FIXTURES=1`. The four code-shape
121+invariants fail only under `EC_FIXTURE_SHAPE_STRICT=1`. A shape violation is a
122+defect in a file this preflight does not own — two live sites in `crates/ec-av1`
123+— and a batch that cannot start because another crate has two open lines helps
124+nobody. Nothing is hidden: the count is printed every run and the sites are named
125+every run.
126+
127+The split existed only while two `crates/ec-av1` violations were open and owned by
128+another lane. Agent01-5's `2364d7a7` closed both — the root pin now reads
129+`crate_pin("lr-sgr-r7.obu")`, and all fourteen warp pins are committed under
130+`crates/ec-av1/fixtures/` and read through the pin helper — so
131+`SHAPE=${EC_FIXTURE_SHAPE_STRICT:-1}` is the default now. `--strict` and
132+`EC_FIXTURE_SHAPE_STRICT=0` are the escape hatches, in that direction.
133+
134+Measured exit codes after the flip:
135+
136+| mode | exit |
137+|---|---|
138+| A intact, `EC_REQUIRE_FIXTURES=1` | 0 — GREEN (303 rows) |
139+| B one fixture renamed, flag set | 1 — `FAIL [mode ii]`, names path, both sites, generator |
140+| C same rename, flag unset | 0 — the same list printed SKIP-shaped |
141+| D `EC_FIXTURES=/nonexistent`, flag set | 1 — `FAIL [mode i]`, names `.gitignore:2` |
142+| E intact, flag set, `--strict` | 0 — was 1 before the flip |
143+| F a reintroduced `concat!` root-pin line, flag set | 1 — `FAIL [invariant 1]` |
144+
145+F is the point of the flip: reintroducing the shape is now fatal with no flag.
146+
147+Three defects this lane's own tooling had, all found by running it off its own
148+tree, and all the class it exists to prevent:
149+
150+1. Off-git the `tracked` column was recomputed as `no-git` for all 37 pin rows,
151+ so every host reported DRIFT with a good library.
152+2. Invariant 1 could not see a comment: a doc comment that REPRODUCES the
153+ forbidden literal to explain what was fixed read as a live violation for a
154+ whole round. It now strips comments before matching, the way the gate census
155+ already did.
156+3. The census's single-name branch neither tracked `ignored` (every `crate_pin`
157+ gate reported `ignored=0` whether or not it was `#[ignore]`d) nor noticed a
158+ `crate_pin` whose name is built at runtime — such a gate would have vanished
159+ from the census silently, the same blind spot in a new place. It now counts
160+ `ignored` and prints a `BADCALL` row the preflight fails on, because a gate
161+ the census cannot resolve is UNPROVEN, not proven clean.
162+
163+## 4. Proof
164+
165+**Green, fixtures present, `EC_REQUIRE_FIXTURES=1`:**
166+
167+| suite | result |
168+|---|---|
169+| ec-h264 conformance | 23 passed, 0 failed |
170+| ec-h264 encode | 12 passed, 1 ignored |
171+| ec-flac xiph_vectors / encode_matrix | 4 passed / 2 passed |
172+| ec-opus conformance | 28 passed, 16 ignored |
173+| ec-aac oracle | 14 passed |
174+| ec-mp3 encode_matrix | 5 passed, 2 ignored |
175+| ec-vorbis oracle | 8 passed, 3 ignored |
176+
177+(`EC_NOMEMGUARD=1` throughout: the repo's memguard runner aborts on a stale
178+systemd scope. CI plumbing, not a test bypass.)
179+
180+**Red, by renaming a real fixture, flag set, all restored:**
181+
182+- `mv fixtures/video/h264-open-gop.mp4{,.bak}` →
183+ `panicked at crates/ec-h264/tests/conformance.rs:83:5: EC_REQUIRE_FIXTURES=1
184+ but fixture …/fixtures/video/h264-open-gop.mp4 is absent -- regenerate with:
185+ scripts/gen-fixtures.sh` → `0 passed; 1 failed`
186+- `mv …/flac-test-files-main/subset{,.bak}` → the same assert, 2 failed
187+- `mv …/opus_testvectors/testvector01.bit{,.bak}` → the same assert, 1 failed
188+
189+**Preflight, four modes:**
190+
191+- intact, flag set → `GREEN (290 rows)`, exit 0
192+- one fixture renamed, flag set → exit 1, `FAIL [mode ii]` naming the path, both
193+ referencing sites and the generator
194+- same rename, flag unset → exit 0, the same list printed SKIP-shaped
195+- `EC_FIXTURES=/nonexistent` → exit 1, `FAIL [mode i]` naming `.gitignore:2` and
196+ "fix the TREE, not the code"
197+
198+**Not vacuous.** On two runner hosts: hardlink-copy the staged library, remove one
199+file from the COPY, rerun → RED naming the path, both referencing sites, the
200+generator and the drift row; the real library untouched (793/802 files before
201+and after) and GREEN.
202+
203+**Reproducible artifact.** `cp tsv; regenerate; cmp` → byte-identical, on this
204+box. On all three hosts, `grep -c '/home/' scripts/fixture-library.tsv` → 0: the
205+generated header carries no absolute path (it says `worktree-relative` and
206+resolves through `EC_FIXTURES` at run time), so the drift check is not
207+structurally red off the generating worktree.
208+
209+**Three-host run** (source tarball, `fixtures/` excluded, each host's own library
210+at `~/gates/library/fixtures` via `EC_FIXTURES`) — host-b (793 files),
211+host-d (793), host-a (802): all three `verify_exit=0`,
212+`GREEN (290 rows)`, `resolve: 0 missing, 0 empty`, the same census, `code-shape
213+violations: 2`.
214+
215+**The hosts really do differ, and the preflight is right to be silent about it.**
216+h1 and h2 have byte-identical library listings (same md5 over `find | sort`, 793
217+files); h3 has 802 — nine extra paths (`hbd-r5/*`, `part32/reelc-extract.obu`,
218+`realworld/*`, `sbpart/seed42.*`, `sub8`). No code literal reaches any of them.
219+That is the measured blind spot, not a sync failure.
220+
221+## 5. Blind spots, stated rather than papered over
222+
223+- Enumeration is grep-derived. 188 media-name literals in this tree resolve under
224+ no enumerated fixture directory; they are covered only as far as their parent
225+ directory, which must exist and be non-empty. The h3 difference above is
226+ exactly this blind spot.
227+- The pin-gate audit anchors on a `format!` against the root variable. A gate
228+ that builds its path by `PathBuf::push` in a loop, by string concatenation, or
229+ from a name read at runtime out of a manifest is not enumerated; it would need
230+ its own shape added.
231+- The audit resolves one level of helper indirection for assertion
232+ classification. `assertless=0` today, so nothing is currently hidden by that
233+ limit, but it is a real limit.
234+- The `tracked` column and the fixture-root path are committed provenance, not
235+ host state: off-git the column is normalised and the path is never written, so
236+ a host asserts the committed value instead of recomputing what it cannot know.
237+- The recovered-pin self-validation has two halves. This script decides the hash
238+ half — every `recovered-original` row must hash to its recorded sha256, and a
239+ re-encode fails it. **The behavioural half now runs too:**
240+
241+ ```
242+ CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1fixlib EC_NOMEMGUARD=1 \
243+ cargo test -p ec-av1 --lib -- \
244+ --exact stream::tests::pinned_golden7_stream_decodes_pixel_exact \
245+ --include-ignored --nocapture
246+ non_last_ref_hits before=0 after=2
247+ test stream::tests::pinned_golden7_stream_decodes_pixel_exact ... ok
248+ test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 745 filtered out
249+ ```
250+
251+ The recovered pin reproduces exactly the 0→2 its doc records — the
252+ self-validation a re-encode cannot pass. Two notes for whoever repeats it: the
253+ test is LIVE in the merged tree (no `#[ignore]`), so `--include-ignored` is
254+ belt-and-braces, and a lane-scoped `CARGO_TARGET_DIR` is REQUIRED — the shared
255+ `$HOME/.cache/cargo-target` held a stale `ec_av1` binary from another worktree
256+ of the same package, and its panic pointed at a line that does not exist in
257+ this source.
258+- `pinned_lr_sgr_stream_call_unique_dump` stays `#[ignore]`d for a true reason:
259+ it prints per-frame mismatch counts and asserts nothing.
260+
261+## 6. The two shape violations: what they were, and who fixed them
262+
263+A CORRECTION to an earlier version of this section, because a report naming an
264+already-fixed gate sends the next reader to the wrong file.
265+
266+- `pinned_lr_sgr_stream_call_unique_dump` was named here as reading
267+ `/../../fixtures/lr-sgr-r7.obu`. **It does not.** At the base this was measured
268+ on, that gate already read `crate_pin("lr-sgr-r7.obu")` (`stream.rs:30519`)
269+ and the pin is committed at `crates/ec-av1/fixtures/lr-sgr-r7.obu`.
270+- The only invariant-1 hit in the tree was a **DOC COMMENT** inside
271+ `pinned_golden7_stream_decodes_pixel_exact` that reproduces the forbidden
272+ literal verbatim while explaining the shape it removed. A `grep` cannot tell
273+ prose from code. The comment is correct and stays; the scanner was wrong.
274+- The one real violation was `pinned_warp_stream_decodes_pixel_exact`
275+ (`stream.rs:31386`): the `/../../fixtures` directory literal plus a 14-name
276+ runtime list, none of the fourteen committed under the crate.
277+
278+All of it is closed as of `53b851a7` (merging Agent01-5's `2364d7a7`): the warp
279+gate's fourteen pins — `warp-mismatch`, `warp-flake-5`, `warp-flake-7`,
280+`ii-flake-1/2/3/5/6/7/8/9`, `rect-flake-1/2/3` — are committed under
281+`crates/ec-av1/fixtures/` and each is read through `crate_pin` with a string
282+literal, and the gate is no longer `#[ignore]`d because a plain run proves it
283+executes (`warp_selected_hits` 0 → 113, 1 passed in 1.8 s plus ffmpeg). Census
284+after the fix: `total=8 committed=21 uncommitted=0 ignored=0 assertless=0`,
285+`code-shape violations: 0`, and shape is fatal by default.
286+
287+The four pins recovered earlier in this lane (`golden4-pin.obu` 137 B
288+`1754023e…`, `golden6-mismatch.obu` 452 B `c56909b9…`,
289+`golden7-forwarding-mismatch.obu` 152 B `81b3bf65…`, `lr-sgr-r7.obu` 192 B
290+`6b95b20e…`) are committed with `recovered-original` provenance; they lived only
291+in the gitignored root, i.e. only in each machine's scratchpad.
292+
293+## 7. Three-host run on the FLIPPED tree (commit f4e1ac6b)
294+
295+Every host: its own staged library at `~/gates/library/fixtures`, passed as
296+`EC_FIXTURES`; the source tarball excludes the root `fixtures/`, so the preflight
297+resolves against that host's library and nothing else.
298+
299+```
300+EC_FIXTURES=~/gates/library/fixtures EC_REQUIRE_FIXTURES=1 \
301+ ./scripts/verify-fixture-library.sh
302+```
303+
304+| host | library | verify exit | verdict | census | violations | invariant-1 control | census self-test |
305+|---|---|---|---|---|---|---|---|
306+| host-b | 793 files | 0 | GREEN (303 rows) | 8 / 21 / 0 / 0 / 0 | 0 | fired | passed |
307+| host-d | 793 files | 0 | GREEN (303 rows) | 8 / 21 / 0 / 0 / 0 | 0 | fired | passed |
308+| host-a | 802 files | 0 | GREEN (303 rows) | 8 / 21 / 0 / 0 / 0 | 0 | fired | passed |
309+
310+Census columns are `total / committed / uncommitted / ignored / assertless`.
311+
312+**Not vacuous, re-proved on all three.** `cp -al` the staged library, remove
313+`video/h264-open-gop.mp4` from the COPY, rerun with `EC_FIXTURES` pointed at the
314+copy:
315+
316+```
317+FAIL [mode ii]: 2 referenced fixture path(s) do not resolve,
318+ fixtures/video/h264-open-gop.mp4 <- crates/ec-h264/tests/conformance.rs:2381 (regenerated, generator: scripts/gen-fixtures.sh)
319+ fixtures/video/h264-open-gop.mp4 <- crates/ec-hw/tests/gpu.rs:2793 (regenerated, generator: scripts/gen-fixtures.sh)
320+ '+ only committed' is a row this host cannot satisfy ...
321+```
322+
323+exit 1 on every host, naming the path, both referencing sites, the generator and
324+the drift row. The real library was untouched — 793 files before and after on
325+h1/h2, 802 on h3 — and GREEN again immediately afterwards. `cp -al` hardlinks,
326+so `rm` removes only the copy's link; nothing in a staged library is reachable
327+from the probe.
328+
329+**The hosts still differ, and the extra files are still unreachable.** h1 and h2
330+have byte-identical library listings (same md5 over `find | sort`, 793 files);
331+h3 has 802. The nine extra paths are `hbd-r5/{reelb,reelc}.obu`,
332+`part32/reelc-extract.obu`, `realworld/{reelb,reelc}.obu`,
333+`sbpart/{seed42.obu,seed42.y4m,seed42.y.gray,seed42.yuv}`, `sub8`. Stated
334+explicitly rather than left to inference: **the manifest carries zero rows under
335+`fixtures/hbd-r5`, `fixtures/part32`, `fixtures/realworld`, `fixtures/sub8` and
336+`fixtures/sbpart`, and no string literal anywhere in `crates/*/src` or
337+`crates/*/tests` names any file inside them.** So this preflight gives no
338+coverage of that difference — it is the grep-derived blind spot, measured rather
339+than assumed, and closing it means either a sync decision (delete what nothing
340+reads) or code that actually reads those pins. Neither is this lane's call, and
341+nothing was re-synced.
342+
343+Six modes on the flipped tree, re-measured after the census fix:
344+
345+| mode | exit |
346+|---|---|
347+| A intact, `EC_REQUIRE_FIXTURES=1` | 0 — GREEN (303 rows) |
348+| B one fixture renamed, flag set | 1 — `FAIL [mode ii]` |
349+| C same rename, flag unset | 0 — SKIP-shaped report |
350+| D `EC_FIXTURES=/nonexistent`, flag set | 1 — `FAIL [mode i]` |
351+| E intact, flag set, `--strict` | 0 |
352+| F a reintroduced `concat!` root-pin line, flag set | 1 — `FAIL [invariant 1]`, no flag needed |
353+
354+## 8. The census hole, and the control that closes it
355+
356+Agent01-5 measured a real defect: `fn_bodies` spans a gate's body from its `fn`
357+line to the NEXT `fn` line, so a doc comment belonging to the following gate sits
358+inside the previous gate's body. `ROOT_RE` matched the comment, the gate was
359+reclassified into the root-literal branch, found no names and hit `continue` — the
360+census count dropped and **nothing went red**, with `uncommitted=0` still reading
361+clean. Unproven read as clean, which is the principle this lane exists to hold.
362+
363+Two things close that door, and the second is the one that matters:
364+
365+1. every search — `ROOT_RE`, `JOIN_RE`, the `crate_pin`/`pin_dir` singles, the
366+ `asserts` check — matches on a comment-stripped body (`/* */`, `//`, `///`).
367+2. `scripts/pin-gate-audit.py --self-test` is a positive control in the exact
368+ shape: a comment reproducing the forbidden literal INSIDE a gate that reads
369+ `crate_pin`, plus a second gate after it. It runs the real pipeline over a
370+ synthetic tree in a temp dir (so it works on a read-only staged tree) and
371+ asserts both gates are still counted as `crate_pin`. The verifier runs it and
372+ fails if it does not pass.
373+
374+**Mutation-proved, because a control nobody made fail is not a control:** with the
375+comment-stripping removed from the self-test path it fails with
376+`reclassified=[('selftest_a_reads_a_pin', 'root-literal')]`; restored, it passes.
377+A control that only proved "the scanner finds a forbidden literal" would NOT have
378+caught this, which is exactly why the census needed its own.
379+
380+Measured with the verbatim prose restored — the state that ships, since the
381+sentence explaining the removed shape is what a reader needs: census
382+`total=8 committed=21 uncommitted=0 ignored=0 assertless=0`, violations 0, both
383+controls firing, verify GREEN.
lanes/av1fixtureshape.report.mdadded+309 -0
@@ -0,0 +1,309 @@
1+# lane-av1fixtureshape — the two live code-shape violations in `crates/ec-av1`
2+
3+Branch `lane-av1fixtureshape`, worktree `~/.cache/wt/av1fixtureshape`.
4+
5+| commit | what |
6+|---|---|
7+| `2364d7a7` (merged as `53b851a7`) | the two sites in `crates/ec-av1` |
8+| `0790e90c` (parent `12cae635`) | restores the verbatim literal in the golden7 doc comment |
9+
10+Not pushed. Primary checkout clean. **The branch is rebased onto `12cae635`
11+(`lane-av1fixlib`), so `scripts/verify-fixture-library.sh`,
12+`pin-gate-audit.py`, `gen-fixture-library.sh` and `fixture-library.tsv` are
13+committed in this tree** and every run below is from the committed tree. An
14+earlier revision copied them in untracked; that is superseded.
15+
16+---
17+
18+## 1. The two sites, as the preflight printed them
19+
20+`EC_REQUIRE_FIXTURES=1 EC_FIXTURE_SHAPE_STRICT=1
21+EC_FIXTURES=<primary>/fixtures scripts/verify-fixture-library.sh`
22+
23+**Site 1 — invariant 1, quoted:**
24+
25+```
26+FAIL [invariant 1]: a committed pin is reached through the gitignored root
27+ fixtures/ (silent SKIP on every clean checkout and runner):
28+ .../crates/ec-av1/src/stream.rs:23980: /// class: a `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/...")`
29+ fix: commit the pin under crates/<crate>/fixtures/ and read it with
30+ that crate's pin helper (crate_pin / pin_dir), never /../../fixtures/.
31+```
32+
33+**Site 2 — invariant 4, quoted:**
34+
35+```
36+FAIL [invariant 4]: pin-reading gates whose pins are not committed
37+ crates/ec-av1/src/stream.rs:31386:pinned_warp_stream_decodes_pixel_exact /../../fixtures bare directory literal feeding 14 runtime name(s): no committed tree satisfies it
38+ crates/ec-av1/src/stream.rs:31386:pinned_warp_stream_decodes_pixel_exact concat! 14/14 pin(s) not committed+tracked, e.g. warp-mismatch
39+ crates/ec-av1/src/stream.rs:31386:pinned_warp_stream_decodes_pixel_exact /../../fixtures + 14 runtime name(s)
40+ fix: commit each pin under crates/<crate>/fixtures/ and read it
41+ through that crate's pin helper, not /../../fixtures/.
42+```
43+
44+### Site 1 was a SCANNER defect, and the report named the wrong gate
45+
46+`lanes/av1fixlib.report.md` §6 attributes site 1 to
47+`pinned_lr_sgr_stream_call_unique_dump` reading
48+`/../../fixtures/lr-sgr-r7.obu` through the gitignored root. **At this base
49+that gate is already correct** — `stream.rs:30519` reads
50+`crate_pin("lr-sgr-r7.obu")` and the pin is committed at
51+`crates/ec-av1/fixtures/lr-sgr-r7.obu`. A direct grep of the invariant-1
52+pattern over `crates/*/src` and `crates/*/tests` returns exactly one hit, and
53+it is the line quoted above.
54+
55+That one hit is a **doc comment**, in
56+`pinned_golden7_stream_decodes_pixel_exact`, reproducing the forbidden literal
57+verbatim to explain the shape that gate removed:
58+
59+```rust
60+ /// LIVE since lane-av1pinslive r3. The old shape was the worst of the
61+ /// class: a `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/...")`
62+ /// literal, which points at the GITIGNORED root and can therefore never be
63+ /// satisfied by a committed pin, combined with a bare `.expect()`. The
64+```
65+
66+Invariant 1 was a plain `grep -rn` and could not tell prose from code, so the
67+crate carried an enforced "violation" that was a sentence explaining a fixed
68+bug. The correction is two-sided, and both halves were needed:
69+
70+- **the prose stays.** The sentence is what a reader needs; it is the only
71+ record of why that gate's shape was the worst of its class. It is restored
72+ verbatim in `0790e90c` after `2364d7a7` had reworded it.
73+- **the scanner is fixed.** `lane-av1fixlib` `12cae635` strips `//` and
74+ `/* */` before invariant 1 matches, via a python scan rather than grep, and
75+ plants a **positive control** — a known forbidden literal in a scratch `.rs`
76+ — that fails loudly if the stripper ever stops matching. That is the floor
77+ that makes a comment-stripping bug impossible to mistake for an all-clear.
78+
79+Verified in this tree with the literal present and the shape fatal by default:
80+
81+```
82+ invariant 1: no root-fixture pin path
83+ code-shape violations: 0
84+verify-fixture-library: GREEN (303 rows) exit 0
85+```
86+
87+## 2. What each site said before and after
88+
89+### Site 1 — doc comment of `pinned_golden7_stream_decodes_pixel_exact`
90+
91+The text is **unchanged from `0dfdf0c8`**. `2364d7a7` reworded it, `0790e90c`
92+restores it exactly:
93+
94+```rust
95+ /// LIVE since lane-av1pinslive r3. The old shape was the worst of the
96+ /// class: a `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/...")`
97+ /// literal, which points at the GITIGNORED root and can therefore never be
98+ /// satisfied by a committed pin, combined with a bare `.expect()`. The
99+ /// bytes are now committed at
100+```
101+
102+No code changed; the gate's behaviour is untouched.
103+
104+### Site 2 — `stream.rs:31388`, `pinned_warp_stream_decodes_pixel_exact`
105+
106+Before: one directory literal, fourteen runtime names, no committed pin.
107+
108+```rust
109+ #[test]
110+ #[ignore = "reads pinned fixture paths under the gitignored fixtures dir; run manually"]
111+ fn pinned_warp_stream_decodes_pixel_exact() {
112+ if !have_ffmpeg() { ... return; }
113+ let fixtures = concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures");
114+ let paths: Vec<String> = match std::env::var("EC_AV1_GATE_DUMP_PIN") {
115+ Ok(p) => vec![p],
116+ Err(_) => ["warp-mismatch", "warp-flake-5", "warp-flake-7",
117+ "ii-flake-1", "ii-flake-2", "ii-flake-3", "ii-flake-5",
118+ "ii-flake-6", "ii-flake-7", "ii-flake-8", "ii-flake-9",
119+ "rect-flake-1", "rect-flake-2", "rect-flake-3"]
120+ .iter().map(|n| format!("{fixtures}/{n}.obu")).collect(),
121+ };
122+ for path in paths { check_pinned_warp_stream(&path); }
123+ }
124+```
125+
126+After: fourteen committed pins, each named by a string literal through
127+`crate_pin` — the spelling `pinned_golden3`, `pinned_golden4`,
128+`pinned_golden7` and `pinned_sbpart` already use, one per pin, no second
129+dialect. The per-pin provenance comments stay in place, each still attached to
130+the pin it describes.
131+
132+```rust
133+ #[test]
134+ fn pinned_warp_stream_decodes_pixel_exact() {
135+ if !have_ffmpeg() { ... return; }
136+ let pins = match std::env::var("EC_AV1_GATE_DUMP_PIN") {
137+ Ok(p) => vec![std::path::PathBuf::from(p)],
138+ Err(_) => vec![
139+ crate_pin("warp-mismatch.obu"),
140+ crate_pin("warp-flake-5.obu"),
141+ /* ... thirteen more, each its own literal ... */
142+ crate_pin("rect-flake-3.obu"),
143+ ],
144+ };
145+ for path in pins { check_pinned_warp_stream(&path); }
146+ }
147+```
148+
149+`check_pinned_warp_stream` now takes `&std::path::Path` and reads through
150+`require_pin`, so an absent pin is a hard failure naming the crate-local path
151+rather than a raw io `expect` panic — the helper the sibling gates use.
152+
153+**All fourteen pins were recoverable**, each committed byte-for-byte under
154+`crates/ec-av1/fixtures/`:
155+
156+| pin | sha256 (16) | pin | sha256 (16) |
157+|---|---|---|---|
158+| `warp-mismatch.obu` | `24cca5beb41c1078` | `ii-flake-6.obu` | `84a1f60011dfdb77` |
159+| `warp-flake-5.obu` | `1a99f9e5b257eed0` | `ii-flake-7.obu` | `61ba4d114aa55ebc` |
160+| `warp-flake-7.obu` | `c2f8b93f5a59c56b` | `ii-flake-8.obu` | `f19d3d80ed564850` |
161+| `ii-flake-1.obu` | `700ded3e61e15bc3` | `ii-flake-9.obu` | `0df4874737cc6152` |
162+| `ii-flake-2.obu` | `edc4ad3a6c00c6bc` | `rect-flake-1.obu` | `a3869b5d2bd8a8bc` |
163+| `ii-flake-3.obu` | `994bfbdc952ecef1` | `rect-flake-2.obu` | `c780ddee1adf25cf` |
164+| `ii-flake-5.obu` | `f43fe77ea0e8ddd9` | `rect-flake-3.obu` | `3b23d204549b7bcf` |
165+
166+### The `#[ignore]`, and why it came off
167+
168+The old reason ("reads pinned fixture paths under the gitignored fixtures
169+dir") became factually false with the shape fix. The acceptance was that a
170+plain run must actually execute the gate — a gate un-ignored while its pins
171+are absent is the same no-op with a better excuse. It is not absent, and it is
172+not vacuous: `--nocapture` shows all fourteen paths resolving under
173+`crates/ec-av1/fixtures/` (not the gitignored root) with
174+`warp_selected_hits` carried 0 → 113 across the set. Had any pin been
175+unrecoverable the gate would have stayed `#[ignore]`d with the reason. Cost is
176+1.7 s plus ffmpeg, which `have_ffmpeg()` already gates.
177+
178+## 3. Generalisation — what the tooling cannot see
179+
180+Three findings, all measured. The third is **open and blocks the wave**.
181+
182+**1. A gate can vanish from the census, and the obvious refactor of the code
183+just landed would do it.** The census finds names only through a root literal
184+plus `[..].iter().map(|n| format!("{var}/{n}.obu"))`, and through
185+`crate_pin\(\s*"([^"]+)"` — a **string literal**. The DRY spelling
186+`crate_pin(&format!("{n}.obu"))` matches neither, so the loop hits `continue`
187+and the gate is not counted at all: a green `uncommitted=0` would then mean
188+"this gate is absent from the census", the same silent-SKIP class wearing a
189+census. That is why each pin is spelled out individually. `12cae635` closes
190+this one: the audit now emits a `BADCALL` row and the preflight **fails** on a
191+non-literal `crate_pin` argument, because a gate the census cannot resolve is
192+unproven rather than clean.
193+
194+**2. The census prints one `GATE` row per NAME, not per gate.** The `crate_pin`
195+branch prints inside the name loop, so the 14-pin warp gate prints 14 identical
196+`GATE` lines: measured 21 printed rows for 8 gates at `12cae635`, 20 for 7
197+once the doc comment below removes one. `COUNT total=` is the real number.
198+`lane-av1fixlib` owns the printing fix; it is cosmetic, not a counting bug.
199+
200+**3. OPEN — `pin-gate-audit.py` strips no comments, and that silently un-counts
201+a gate.** Invariant 1 was fixed for comment-blindness; the census was not.
202+`12cae635` has no strip helper and no `code` variable in the audit at all
203+(`grep -c code` = 1, incidental). `ROOT_RE.search(body)` (line 131),
204+`JOIN_RE.search(body)` (136) and the `crate_pin` singles (146) all run on the
205+raw body; only the name-list branch strips `//`, as before. Measured on
206+`12cae635` itself, both directions:
207+
208+```
209+ 12cae635 pristine -> COUNT total=8 committed=21 uncommitted=0
210+ 12cae635 + the restored doc comment -> COUNT total=7 committed=20 uncommitted=0
211+```
212+
213+`pinned_golden4_stream_decodes_pixel_exact` (`stream.rs:23950`) stops being
214+counted entirely — no `GATE` row, no `NAME` row — and `uncommitted=0` still
215+reads clean, so **nothing goes red**. Cause: `fn_bodies` runs a gate's body
216+from its `fn` line to the *next* `fn` line, so golden4's captured body spans
217+23950–23987 and golden7's doc comment (23974–23986) sits inside it.
218+`ROOT_RE` matches the comment, `root_lit` becomes `/../../fixtures/...`, the
219+gate takes the root-literal branch, finds no bracketed list and no
220+`"/fixtures/..."` literal, and hits `continue`. A comment moved a gate out of
221+the census.
222+
223+This is finding 1's failure mode reached through the other door: the gate is
224+not unreadable, it is reclassified into a branch that counts nothing. It also
225+means the site-1 prose is only safe to land once the audit strips comments on
226+all three searches. Reported to `lane-av1fixlib` with both measurements, the
227+mechanism, the one-line shape of the fix, and a request for a census positive
228+control for this specific shape — their existing control only proves the
229+scanner finds a bad literal, and would not have caught this.
230+
231+## 4. Red / green
232+
233+Measured on this branch's own commits, same tree, same committed scripts.
234+
235+**Red — fix reverted** (`git stash push -- crates/ec-av1/src/stream.rs
236+crates/ec-av1/fixtures/`, against the pre-comment-strip tool):
237+
238+```
239+FAIL [invariant 1]: a committed pin is reached through the gitignored root
240+ .../crates/ec-av1/src/stream.rs:23980: /// class: a `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/...")`
241+ pin gates: total=7 committed=6 uncommitted=14 ignored=1 assertless=0
242+FAIL [invariant 4]: pin-reading gates whose pins are not committed
243+ crates/ec-av1/src/stream.rs:31386:pinned_warp_stream_decodes_pixel_exact /../../fixtures bare directory literal feeding 14 runtime name(s): no committed tree satisfies it
244+ crates/ec-av1/src/stream.rs:31386:pinned_warp_stream_decodes_pixel_exact concat! 14/14 pin(s) not committed+tracked, e.g. warp-mismatch
245+```
246+
247+named exactly the two sites, `uncommitted=14`.
248+
249+```
250+EC_FIXTURE_SHAPE_STRICT=1 -> exit 1
251+```
252+
253+**Green — fix applied** (`12cae635` tool, `0790e90c` crate, shape fatal by
254+default):
255+
256+```
257+ invariant 1: no root-fixture pin path
258+ invariant 4: every pin-reading gate resolves through committed copies
259+ pin gates: total=7 committed=20 uncommitted=0 ignored=0 assertless=0
260+ code-shape violations: 0
261+verify-fixture-library: GREEN (303 rows) exit 0
262+```
263+
264+`total=7` rather than 8 is finding 3 above, not a regression in the fix — the
265+missing gate is golden4, present in the red run's tool and removed from the
266+count by the doc comment the preflight now correctly ignores. It is reported
267+as a defect in the census rather than papered over by re-adding the reword.
268+
269+**Caveat on the exit code, stated not hidden.** The script's exit status is the
270+*LIBRARY* verdict (root present, paths resolve, no manifest drift), not the
271+shape verdict. In this tree the library verdict is clean — `EC_FIXTURES` points
272+at the primary checkout's library and the manifest is regenerated against this
273+tree. The earlier DRIFT reds in this lane's history were the manifest's
274+`required-by file:line` column generated against a different `stream.rs`;
275+rebasing onto `12cae635` resolved them.
276+
277+## 5. Gates
278+
279+Lane-scoped `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1fixtureshape`
280+throughout — the shared `$HOME/.cache/cargo-target` was observed serving an
281+`ec_av1` binary built from another worktree of the same package. `stream.rs`
282+`touched` before every run.
283+
284+```
285+cargo check -p ec-av1 --all-targets
286+ Finished `dev` profile in 7.73s (no warnings)
287+
288+cargo test -p ec-av1 --lib -- gate_coverage refusal_inventory
289+ ok. 28 passed; 0 failed; 0 ignored; 719 filtered out; 0.91s
290+
291+cargo test -p ec-av1 --lib -- pinned_ golden
292+ ok. 19 passed; 0 failed; 2 ignored; 726 filtered out; 1.61s
293+ including pinned_lr_sgr_stream_call_unique_dump, pinned_golden7, pinned_sbpart,
294+ pinned_warp_stream_decodes_pixel_exact, rect_sizes_pinned_against_libaom
295+
296+cargo test -p ec-av1 --lib -- pinned_golden7 pinned_warp
297+ ok. 2 passed; 0 failed; 745 filtered out; 2.02s (after the doc-comment restore)
298+```
299+
300+Gate bodies touched: exactly two — `pinned_warp_stream_decodes_pixel_exact`
301+(rewritten) and `pinned_golden7_stream_decodes_pixel_exact` (doc comment only,
302+no behaviour). The fourteen new pins are consumed by the warp gate alone, and
303+that gate is in every run above.
304+
305+## 6. Handed over
306+
307+`0790e90c` to `lane-av1fixlib` for the crate half. Nothing open on the fourteen
308+pins. One item open against their branch before it goes to the wave: the
309+census comment-stripping in finding 3.
scripts/fixture-library.tsvadded+331 -0
@@ -0,0 +1,331 @@
1+# GENERATED by scripts/gen-fixture-library.sh -- do not hand-edit.
2+# Regenerate: scripts/gen-fixture-library.sh
3+# Verify: scripts/verify-fixture-library.sh
4+# path <TAB> required-by file:line <TAB> provenance <TAB> status <TAB> sha256
5+#
6+# Enumeration is grep-derived. It cannot see a fixture name that is not a
7+# string literal in the same file (manifest rows, vectors.sha256 names,
8+# format! interpolation); such names are only covered through their parent
9+# directory, which the verifier requires to exist AND be non-empty.
10+# 189 media-name literal(s) in this tree resolved under no enumerated
11+# fixture directory and are therefore not listed individually.
12+#
13+# FIXTURE ROOT: worktree-relative, deliberately NOT an absolute path. A
14+# generated file in the repo must not carry the authoring machine's home
15+# directory: this repo scans commit MESSAGES for host paths, and a generated
16+# artefact is exactly how one slips past that check. The path is resolved
17+# through EC_FIXTURES at run time by verify-fixture-library.sh.
18+#
19+# HOST-STATE LINES (per-host by nature, excluded from the drift comparison,
20+# which diffs the ROWS only): the unresolved-literal count above, and the
21+# status/tracked/sha256 columns below.
22+#
23+# VECTORS consumers (fixtures/vectors/*): crates/ec-flac/tests/xiph_vectors.rs crates/ec-h264/tests/conformance.rs crates/ec-opus/tests/conformance.rs
24+# VECTORS .tar.gz blob referenced by: nothing
25+# The three fleet hosts carry the EXTRACTED vector sets (~470 files) and the
26+# sync deliberately excluded the .tar.gz blobs; nothing in crates/ reads a
27+# blob, so the extracted directories are the whole requirement.
28+# Unreferenced committed pins carried as rows: 4
29+crates/ec-av1/fixtures/420_intrabc_rect4_witness.obu crates/ec-av1/src/stream.rs:8005 captured - ok yes d01352af5059919cdce733abdcbae8e8240ac3c2a6190fa1bd96d3c6f945b979
30+crates/ec-av1/fixtures/422_allskip_2f.obu crates/ec-av1/src/stream.rs:2311 captured - ok yes ba4932c14f95971b5f25321b04abce80c9fdd5de4b1fe6fffcdad82aaea87ce1
31+crates/ec-av1/fixtures/422_intrabc_sb128_strip_notxsearch.obu crates/ec-av1/src/stream.rs:2373 captured - ok yes 80dd0d4e93fd6c3d4b7188a43e69d9638f2bece38edfab60ff3582628314b5ec
32+crates/ec-av1/fixtures/422_intrabc_sb128_strip.obu crates/ec-av1/src/stream.rs:2368 captured - ok yes f92000db86df7acc577d60dd1d0d97454bff4705799ea59d9de34eb5a71dbbcd
33+crates/ec-av1/fixtures/422_residual_compound_warp_16f.obu crates/ec-av1/src/stream.rs:2590 captured - ok yes d78e2afb43ce311d3d82335a945c6f80f62db4537966d881c1349a68b3aecb95
34+crates/ec-av1/fixtures/422_residual_compound_warp_nolr_16f.obu crates/ec-av1/src/stream.rs:2669 captured - ok yes 8bed368f7ec4bca772137c6a9c2af89e1b2767ed5f937b91bd9e72ec60aeb42f
35+crates/ec-av1/fixtures/422_sb128_3f.obu crates/ec-av1/src/stream.rs:2312 captured - ok yes 0b851799d99cb4d141a7d042138a3999aad7e0fb24d69c670bca1d38c286dce9
36+crates/ec-av1/fixtures/444_intrabc_rect4_witness.obu crates/ec-av1/src/stream.rs:7999 captured - ok yes 7fe888edf18caa74bdb415f0de643dc59963e87e0255d77191200b7a62eb2542
37+crates/ec-av1/fixtures/444_leaf8_oob.obu crates/ec-av1/src/stream.rs:8424 captured - ok yes 72bed2791d1ceba8be7926a052c7838c5d96d4f9d56d28fb69789a753d3593af
38+crates/ec-av1/fixtures/444_lossy_rect4_inter_witness.obu crates/ec-av1/src/stream.rs:21054 captured - ok yes 77f727e76d81fe48cd03709f799131677c04869b163e18d78e96bc742ec69153
39+crates/ec-av1/fixtures/444_lossy_rect4_inter_witness.obu crates/ec-av1/src/stream.rs:7589 captured - ok yes 77f727e76d81fe48cd03709f799131677c04869b163e18d78e96bc742ec69153
40+crates/ec-av1/fixtures/444_lossy_rect4_odd_130x122.obu crates/ec-av1/src/stream.rs:46760 captured - ok yes c87ac65b77579afd2938669b0cbe3ec44c3abf775c0223cacb9d14b8c2eee27c
41+crates/ec-av1/fixtures/444_lossy_rect4_wide_256x128.obu crates/ec-av1/src/stream.rs:46768 captured - ok yes 06621606c11ae805f784a1c9736db6301a925a4fa3154e2fc38db1df7ad9b826
42+crates/ec-av1/fixtures/444_lossy_superres_256x128_d12_10bit.obu crates/ec-av1/src/stream.rs:14445 captured - ok yes 95b49d7aa81843399ee3aa64bdadfec8f4037bcc3f861923c9b2da3bc868b223
43+crates/ec-av1/fixtures/444_lossy_superres_256x128_d12_12bit.obu crates/ec-av1/src/stream.rs:14492 captured - ok yes 973bf374c0185c4e6301509ce834cef01318e6cdb9488fd258118d7ec89bdd04
44+crates/ec-av1/fixtures/444_lossy_superres_256x128_d12.obu crates/ec-av1/src/stream.rs:46912 captured - ok yes 450caa3e31526a8973b9f64d5030a2f11b87bd60fac07aef121cb62af9bf85ff
45+crates/ec-av1/fixtures/444_lossy_superres_256x128_d9_12bit.obu crates/ec-av1/src/stream.rs:14519 captured - ok yes 898c775108495b998cb5ec9b08e194d4656ed0140aa8e7e7236892d468bbad99
46+crates/ec-av1/fixtures/444_lossy_superres_256x128_d9.obu crates/ec-av1/src/stream.rs:47302 captured - ok yes 3d619ee0fda3d9bb9cf8ff0541ba00ea5d83ae38cd8eec1322f8dbbbe6a5ec96
47+crates/ec-av1/fixtures/444_lossy_superres_mode2_256x128_10bit.obu crates/ec-av1/src/stream.rs:14560 captured - ok yes 699398aba58fb53b80e05d3d214eb746a3c91945e01da6b47488513f20b55668
48+crates/ec-av1/fixtures/444_lossy_superres_mode2_256x128_12bit.obu crates/ec-av1/src/stream.rs:14607 captured - ok yes 18aa8b3124ab10672f22577a8eea81e44141a3d0bb506104aee2f950254a2e9f
49+crates/ec-av1/fixtures/444_lossy_superres_mode2_256x128.obu crates/ec-av1/src/stream.rs:47359 captured - ok yes c18496cf3b7db0feca9aa904024cec2115be80b5b94f87c848ac52f9b32ffd97
50+crates/ec-av1/fixtures/444_lossy_superres_mode2_256x128.obu crates/ec-av1/src/stream.rs:47408 captured - ok yes c18496cf3b7db0feca9aa904024cec2115be80b5b94f87c848ac52f9b32ffd97
51+crates/ec-av1/fixtures/444_quad_leaf_tx_type.obu crates/ec-av1/src/stream.rs:20817 captured - ok yes a06c9f7a0862252f6ab7ebdcec340d0602e730e38089365f14747db37f8e78d5
52+crates/ec-av1/fixtures/444_rect_strip_leaf_tx_type.obu crates/ec-av1/src/stream.rs:20912 captured - ok yes 06174a66e92aaeb751a8e86db59711fcb1f18d74bde2d77e1ef1be7983eb7c80
53+crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu crates/ec-av1/src/stream.rs:14669 captured - ok yes 27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80
54+crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu crates/ec-av1/src/stream.rs:20947 captured - ok yes 27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80
55+crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu crates/ec-av1/src/stream.rs:7383 captured - ok yes 27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80
56+crates/ec-av1/fixtures/444_sb128rect_lr_witness.obu crates/ec-av1/src/stream.rs:8096 captured - ok yes 27825e14633a4b23e37d48a2acdc7f5d814ca4fadd0b8797d72a1ffb34061e80
57+crates/ec-av1/fixtures/av112bit-compound-masked.obu (committed pin: NO source reference found) captured - ok yes 83625de2ed347d457eb67f9781eed3fea598ef035f29bbc311d7025fe178c691
58+crates/ec-av1/fixtures/av112bit-compound.obu (committed pin: NO source reference found) captured - ok yes a839cff534b89d5cd52681dd43a7dedc10131d8dd7725bdfa5502d6bc4421740
59+crates/ec-av1/fixtures/av112bit-inter.obu (committed pin: NO source reference found) captured - ok yes e679d577e61b4a8bc99685355cca8c0473cfb637284b07786a6c53b1755553d9
60+crates/ec-av1/fixtures/av112bit-key.obu (committed pin: NO source reference found) captured - ok yes c74f62b57f71f7c36c49ea1feeb482786a2650e5c7f66610949b5f65fbbed8d1
61+crates/ec-av1/fixtures/av1_192x128_8bit_intra64_in_inter.obu crates/ec-av1/src/stream.rs:20750 captured - ok yes e4cff46cb1700527c68efc866db27a2835705e949d646f73f0c9df577d594bd6
62+crates/ec-av1/fixtures/av1_192x128_8bit_intra64_in_inter.obu crates/ec-av1/src/stream.rs:20850 captured - ok yes e4cff46cb1700527c68efc866db27a2835705e949d646f73f0c9df577d594bd6
63+crates/ec-av1/fixtures/av1_192x128_8bit_intra64_in_inter.obu crates/ec-av1/src/stream.rs:21082 captured - ok yes e4cff46cb1700527c68efc866db27a2835705e949d646f73f0c9df577d594bd6
64+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:14672 regenerated scripts/gen-fixtures.sh ok - -
65+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:14721 regenerated scripts/gen-fixtures.sh ok - -
66+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:14778 regenerated scripts/gen-fixtures.sh ok - -
67+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:2315 regenerated scripts/gen-fixtures.sh ok - -
68+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:2379 regenerated scripts/gen-fixtures.sh ok - -
69+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:2594 regenerated scripts/gen-fixtures.sh ok - -
70+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:2673 regenerated scripts/gen-fixtures.sh ok - -
71+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:44163 regenerated scripts/gen-fixtures.sh ok - -
72+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:44240 regenerated scripts/gen-fixtures.sh ok - -
73+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:45262 regenerated scripts/gen-fixtures.sh ok - -
74+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:9302 regenerated scripts/gen-fixtures.sh ok - -
75+crates/ec-av1/fixtures crates/ec-av1/src/stream.rs:9329 regenerated scripts/gen-fixtures.sh ok - -
76+crates/ec-av1/fixtures/filter_intra_8x16_strip_seed49.obu crates/ec-av1/src/stream.rs:38899 captured - ok yes 6f837e47ad0a67f31c3998aa789cf0811e7540ac2114981853a0148744cb76c2
77+crates/ec-av1/fixtures/gm_small_side_witness.obu crates/ec-av1/src/stream.rs:44168 captured - ok yes f1cdbcbb8d6d469c7957d70252ab42b24ab75f48a717600ffa25991458775dca
78+crates/ec-av1/fixtures/gm_small_side_witness.obu crates/ec-av1/src/stream.rs:44245 captured - ok yes f1cdbcbb8d6d469c7957d70252ab42b24ab75f48a717600ffa25991458775dca
79+crates/ec-av1/fixtures/gm_small_side_witness.obu crates/ec-av1/src/stream.rs:44328 captured - ok yes f1cdbcbb8d6d469c7957d70252ab42b24ab75f48a717600ffa25991458775dca
80+crates/ec-av1/fixtures/gm_small_side_witness.obu crates/ec-av1/src/stream.rs:45257 captured - ok yes f1cdbcbb8d6d469c7957d70252ab42b24ab75f48a717600ffa25991458775dca
81+crates/ec-av1/fixtures/golden3-pin.obu crates/ec-av1/src/stream.rs:23900 captured - ok yes 11c9d5331cffa6614c8265ad5fa685d5ce9155db8439949b48ec4a652ace95cf
82+crates/ec-av1/fixtures/golden4-pin.obu crates/ec-av1/src/stream.rs:23954 recovered-original - ok yes 1754023e44e46edaebc2c05065bf1c65db1a41354577cbf71c0e8ebe737ae14a
83+crates/ec-av1/fixtures/golden4-pin.obu crates/ec-av1/src/stream.rs:23955 recovered-original - ok yes 1754023e44e46edaebc2c05065bf1c65db1a41354577cbf71c0e8ebe737ae14a
84+crates/ec-av1/fixtures/golden6-mismatch.obu crates/ec-av1/src/stream.rs:33509 recovered-original - ok yes c56909b98542192b03f3a945e153475aa57a58a1586bf166513297296cb225b3
85+crates/ec-av1/fixtures/golden6-mismatch.obu crates/ec-av1/src/stream.rs:33510 recovered-original - ok yes c56909b98542192b03f3a945e153475aa57a58a1586bf166513297296cb225b3
86+crates/ec-av1/fixtures/golden7-forwarding-mismatch.obu crates/ec-av1/src/stream.rs:23992 recovered-original - ok yes 81b3bf657a85e95085287b30d97dee93ba5aea0ed1db1e1f4fcd19a06afc17be
87+crates/ec-av1/fixtures/golden7-forwarding-mismatch.obu crates/ec-av1/src/stream.rs:23993 recovered-original - ok yes 81b3bf657a85e95085287b30d97dee93ba5aea0ed1db1e1f4fcd19a06afc17be
88+crates/ec-av1/fixtures/grain_cdef_lr_128x128.obu crates/ec-av1/src/stream.rs:14775 captured - ok yes 06f210b87b5c79eb729c559050e073abbe226c4dad1df3dcaa113b03011ad732
89+crates/ec-av1/fixtures/reelb_arf_witness.obu crates/ec-av1/src/stream.rs:14660 captured - ok yes 7f3b060da5aa9c537633e760c4af71316237db7692f6ae0d459bd2c2dd867d37
90+crates/ec-av1/fixtures/reelb_arf_witness.obu crates/ec-av1/src/stream.rs:43390 captured - ok yes 7f3b060da5aa9c537633e760c4af71316237db7692f6ae0d459bd2c2dd867d37
91+crates/ec-av1/fixtures/reelb_arf_witness.obu crates/ec-av1/src/stream.rs:43472 captured - ok yes 7f3b060da5aa9c537633e760c4af71316237db7692f6ae0d459bd2c2dd867d37
92+crates/ec-av1/fixtures/reelb_head_key_frame.obu crates/ec-av1/src/stream.rs:14913 captured - ok yes 53c311dec790bb2413afdde92cb24de498a7c4f66f6f0c7f4f5910ab0d2c65dc
93+crates/ec-av1/fixtures/reelb_head_mvclamp_witness.obu crates/ec-av1/src/stream.rs:44410 captured - ok yes 451a9b138995e636f22308847a123b5c8621d4908cd93772cf5bbf2b37df39d7
94+crates/ec-av1/fixtures/reelb_intra14_witness.obu crates/ec-av1/src/stream.rs:43219 captured - ok yes 0eff603bf1608e47faf5e6729670c4c77cf5c674dbad3a1533ac6660151fd90e
95+crates/ec-av1/fixtures/reelb_kf900.obu crates/ec-av1/src/stream.rs:15055 captured - ok yes a273ae99328388be14a1ff8fa1c5a6d391a9948159eaef120e1b50e02015eb83
96+crates/ec-av1/fixtures/reelb_kf900.obu crates/ec-av1/src/stream.rs:45188 captured - ok yes a273ae99328388be14a1ff8fa1c5a6d391a9948159eaef120e1b50e02015eb83
97+crates/ec-av1/fixtures/reelb_rect64_intra16x4_witness.obu crates/ec-av1/src/stream.rs:43308 captured - ok yes c9e721088766163b9dbeb9fa8dd8b257ff0ec7f9157fc350de4d3c33cd9ec4e4
98+crates/ec-av1/fixtures/reelb_ss300_key_frame.obu crates/ec-av1/src/stream.rs:15004 captured - ok yes 7e3ddf0d602f9496b2f7eb11f051fd4a045020e094d5bc02f83825e2c494ef12
99+crates/ec-av1/fixtures/reelb_ss600_key_frame.obu crates/ec-av1/src/stream.rs:15096 captured - ok yes 36de46676ed7de7049d4dabe8571d8cd31c8a1f53d72011c0ee532a7c6725cd6
100+crates/ec-av1/fixtures/ii-flake-1.obu crates/ec-av1/src/stream.rs:31405 captured - ok yes 700ded3e61e15bc3573d339d7fcc6ab94500adb796c30021094d354306662238
101+crates/ec-av1/fixtures/ii-flake-2.obu crates/ec-av1/src/stream.rs:31406 captured - ok yes edc4ad3a6c00c6bc909c626fa24433ef31a88ed519ed57403f5373a160e590af
102+crates/ec-av1/fixtures/ii-flake-3.obu crates/ec-av1/src/stream.rs:31407 captured - ok yes 994bfbdc952ecef18ae1560d5e7f121ba1000172e0bc2ad05e5b8cfaa17b15cb
103+crates/ec-av1/fixtures/ii-flake-5.obu crates/ec-av1/src/stream.rs:31408 captured - ok yes f43fe77ea0e8ddd9c1524b642e09f935921cb0d00c4a60061a52d2260af38b9a
104+crates/ec-av1/fixtures/ii-flake-6.obu crates/ec-av1/src/stream.rs:31409 captured - ok yes 84a1f60011dfdb77ede98ce95a25d247d270b0af1cff2c44aa1e6b311ca63dce
105+crates/ec-av1/fixtures/ii-flake-7.obu crates/ec-av1/src/stream.rs:31410 captured - ok yes 61ba4d114aa55ebcf95ae691abbce3307146a2d969c0627ea3ceea02f3875574
106+crates/ec-av1/fixtures/ii-flake-8.obu crates/ec-av1/src/stream.rs:31411 captured - ok yes f19d3d80ed564850cec02a26cfe7ab00e282afa7896821c535a117f5541bef5d
107+crates/ec-av1/fixtures/ii-flake-9.obu crates/ec-av1/src/stream.rs:31415 captured - ok yes 0df4874737cc615258c0fdfb4bcb157c9a3663127cbf0a896af44d4deb83c653
108+crates/ec-av1/fixtures/intra128_in_inter_screen_witness.obu crates/ec-av1/src/stream.rs:43890 captured - ok yes c84a493f90327f5d2bea038a42e87cbfe56762b5c6a856d76b4bff9797c5ea09
109+crates/ec-av1/fixtures/intra128_in_inter_witness2.obu crates/ec-av1/src/stream.rs:43822 captured - ok yes cace4cc3a5ba4dc5f8c7c219e87c9052351e832cad3d7f4c8ffe09288a6d7ccf
110+crates/ec-av1/fixtures/intra128_in_inter_witness2.obu crates/ec-av1/src/stream.rs:44167 captured - ok yes cace4cc3a5ba4dc5f8c7c219e87c9052351e832cad3d7f4c8ffe09288a6d7ccf
111+crates/ec-av1/fixtures/intra128_in_inter_witness2.obu crates/ec-av1/src/stream.rs:44244 captured - ok yes cace4cc3a5ba4dc5f8c7c219e87c9052351e832cad3d7f4c8ffe09288a6d7ccf
112+crates/ec-av1/fixtures/intra128_in_inter_witness.obu crates/ec-av1/src/stream.rs:43726 captured - ok yes dd41fc39367a3d38bf8a8a8106dc30d91b716b2a9123fdfa4716930f4f98caf9
113+crates/ec-av1/fixtures/intra14_256x192_10bit.obu crates/ec-av1/src/stream.rs:42544 captured - ok yes ab6fae0a256af6410e8200f10827a3e965dee7b2d7ab63710e94968bddab23a2
114+crates/ec-av1/fixtures/intra14_256x192_8bit.obu crates/ec-av1/src/stream.rs:42552 captured - ok yes 5e50eb6d4492e806a2803988d92bd47f069ca54e02c06344d5500c6b72deb861
115+crates/ec-av1/fixtures/intrabc_tx4_chroma_kf.obu crates/ec-av1/src/stream.rs:12238 captured - ok yes bc699af4a6e7c1c5657f041e8cbdf2d3d899ddb80ec2a549a950b7cebb5b41bd
116+crates/ec-av1/fixtures/ll444_128root_lossless.obu crates/ec-av1/src/stream.rs:7010 captured - ok yes bbffb979d20d581deb271aac75b7ee779dde57c024524ed6b1389356f55ca0fa
117+crates/ec-av1/fixtures/ll444_128root_lossless.obu crates/ec-av1/src/stream.rs:7130 captured - ok yes bbffb979d20d581deb271aac75b7ee779dde57c024524ed6b1389356f55ca0fa
118+crates/ec-av1/fixtures/ll444_defaultp_inter_strip.obu crates/ec-av1/src/stream.rs:8272 captured - ok yes 1e6dd4e05038c8d51e2c8d29f8c337130c4fea0aed629415535e6e53af9a2c72
119+crates/ec-av1/fixtures/ll444_ibc_rect.obu crates/ec-av1/src/stream.rs:8841 captured - ok yes 482dedca0201beea9b0a05720b5da7fe93c350c9fea7699cdb010c3fbc227ec0
120+crates/ec-av1/fixtures/ll444-lossless-key.obu crates/ec-av1/src/stream.rs:6707 captured - ok yes f496ef0a1171c2bc66d411cc60db05db547dcdb49cd834d4e0543de9db441374
121+crates/ec-av1/fixtures/ll444_minp64_128root_control.obu crates/ec-av1/src/stream.rs:7061 captured - ok yes 4cadce41e1f8967567b32f5cf8abaa46ffdf4fd6d4afe784c8d99a7f6bf1ae4c
122+crates/ec-av1/fixtures/ll444_minp64_128root_control.obu crates/ec-av1/src/stream.rs:7175 captured - ok yes 4cadce41e1f8967567b32f5cf8abaa46ffdf4fd6d4afe784c8d99a7f6bf1ae4c
123+crates/ec-av1/fixtures/ll444_minp64_inter.obu crates/ec-av1/src/stream.rs:6859 captured - ok yes 5a070fa351a3f2109de855234f2b3d0a872970f3e7f658db21f65c12eeb135b4
124+crates/ec-av1/fixtures/ll444_minp8_inter.obu crates/ec-av1/src/stream.rs:21007 captured - ok yes 04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc
125+crates/ec-av1/fixtures/ll444_minp8_inter.obu crates/ec-av1/src/stream.rs:7240 captured - ok yes 04fb6d38de5382e647bfb70b6a17802f1fccc5502e6698c0394167891f2b27dc
126+crates/ec-av1/fixtures/ll444_rect16x4_chroma_reach.obu crates/ec-av1/src/stream.rs:11312 captured - ok yes 382e67c0cc0988d14c500a62f5c3457a3f3b5f76d05acce2f655b1089bb8e7e3
127+crates/ec-av1/fixtures/ll444_sb64_1to4_lossless.obu crates/ec-av1/src/stream.rs:46569 captured - ok yes fdb6467987095b99c8eb51b48743691d906b2d99d069f71f1d51b1abb6d2056e
128+crates/ec-av1/fixtures/lossless_sb128_rect_kf.obu crates/ec-av1/src/stream.rs:8520 captured - ok yes 013b07979c8be999c70d47f32768c2bf959be086a893f60dde1b0f5e35d4f475
129+crates/ec-av1/fixtures/lr-sgr-r7.obu crates/ec-av1/src/stream.rs:30519 recovered-original - ok yes 6b95b20e3377430ffae0b2ce86fad9502e0dedf13cd6c38ab7f5af4a8b21f33d
130+crates/ec-av1/fixtures/lr-sgr-r7.obu crates/ec-av1/src/stream.rs:30520 recovered-original - ok yes 6b95b20e3377430ffae0b2ce86fad9502e0dedf13cd6c38ab7f5af4a8b21f33d
131+crates/ec-av1/fixtures/palette_screen_leaf8_witness.obu crates/ec-av1/src/stream.rs:44066 captured - ok yes 8d036606116913c82b774286bb0a3efe616d54151784897ba62b13d12fdef06e
132+crates/ec-av1/fixtures/palette_screen_strip16_witness_10bit.obu crates/ec-av1/src/stream.rs:44110 captured - ok yes aaabbb001d87f61ee534fd17c2d558ad906d1c33d357decb86cfd26e593da0db
133+crates/ec-av1/fixtures/palette_screen_witness_10bit.obu crates/ec-av1/src/stream.rs:14662 captured - ok yes a60a8bc132e5db7bed3eb46e03e9ed9828811bdffb96914958f3c94b107c3cda
134+crates/ec-av1/fixtures/palette_screen_witness_10bit.obu crates/ec-av1/src/stream.rs:43985 captured - ok yes a60a8bc132e5db7bed3eb46e03e9ed9828811bdffb96914958f3c94b107c3cda
135+crates/ec-av1/fixtures/palette_screen_witness.obu crates/ec-av1/src/stream.rs:14661 captured - ok yes 635a512b866f0fab7d45eb4f94f2a5b15008fe5a5317ac1ca45ffd3381198b8b
136+crates/ec-av1/fixtures/palette_screen_witness.obu crates/ec-av1/src/stream.rs:43391 captured - ok yes 635a512b866f0fab7d45eb4f94f2a5b15008fe5a5317ac1ca45ffd3381198b8b
137+crates/ec-av1/fixtures/palette_screen_witness.obu crates/ec-av1/src/stream.rs:43984 captured - ok yes 635a512b866f0fab7d45eb4f94f2a5b15008fe5a5317ac1ca45ffd3381198b8b
138+crates/ec-av1/fixtures/rect64_dq_drift.obu crates/ec-av1/src/stream.rs:39718 captured - ok yes 094e51bb21b6caccc905417e95a03f9131b448071567d0b14ec8850799ea2501
139+crates/ec-av1/fixtures/rect-flake-1.obu crates/ec-av1/src/stream.rs:31418 captured - ok yes a3869b5d2bd8a8bc5413e0d039d5e3375a48601cdeb2edb8d4b732402926d357
140+crates/ec-av1/fixtures/rect-flake-2.obu crates/ec-av1/src/stream.rs:31423 captured - ok yes c780ddee1adf25cf63a6ba70ff449820f6f4474b23ef16615c1e843ad0c86adb
141+crates/ec-av1/fixtures/rect-flake-3.obu crates/ec-av1/src/stream.rs:31427 captured - ok yes 3b23d204549b7bcfbd7166b1b3e2920580236c78de12e8f23f7fb64c1864f3e6
142+crates/ec-av1/fixtures/sbpart-pin.obu crates/ec-av1/src/stream.rs:39801 captured - ok yes 62238fc077f45d89745d4d254b9c0465464003529da3b42d0a65631fbb7e16e9
143+crates/ec-av1/fixtures/superres_alltools_sb128_320x180.obu crates/ec-av1/src/stream.rs:14722 captured - ok yes e2b515ce487acd2d720d5a000a6f26e66fd03ef2b1a4cb12daa6fdf31a55d519
144+crates/ec-av1/fixtures/superres_alltools_sb128_320x180.obu crates/ec-av1/src/stream.rs:14774 captured - ok yes e2b515ce487acd2d720d5a000a6f26e66fd03ef2b1a4cb12daa6fdf31a55d519
145+crates/ec-av1/fixtures/superres_alltools_sb128_320x180.obu crates/ec-av1/src/stream.rs:14877 captured - ok yes e2b515ce487acd2d720d5a000a6f26e66fd03ef2b1a4cb12daa6fdf31a55d519
146+crates/ec-av1/fixtures/superres_kf_cdef_lr_64x64.obu crates/ec-av1/src/stream.rs:14198 captured - ok yes 5912e251bcd5d0f284f647616f91b19b579238c16fa85c0294a06548088d7336
147+crates/ec-av1/fixtures/reelc_kf2700.obu crates/ec-av1/src/stream.rs:14951 captured - ok yes 16981094eaab516bd1007b0a47d1fc653fbb58b7e18a40af6c12d934bf96fe63
148+crates/ec-av1/fixtures/reelc_sb128_inter_witness.obu crates/ec-av1/src/stream.rs:43563 captured - ok yes 09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc
149+crates/ec-av1/fixtures/reelc_sb128_inter_witness.obu crates/ec-av1/src/stream.rs:44166 captured - ok yes 09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc
150+crates/ec-av1/fixtures/reelc_sb128_inter_witness.obu crates/ec-av1/src/stream.rs:44243 captured - ok yes 09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc
151+crates/ec-av1/fixtures/reelc_sb128_inter_witness.obu crates/ec-av1/src/stream.rs:45258 captured - ok yes 09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc
152+crates/ec-av1/fixtures/warp-flake-5.obu crates/ec-av1/src/stream.rs:31403 captured - ok yes 1a99f9e5b257eed0ebae055441904d6c40962a26c0c2d63c3e051732569ff0a0
153+crates/ec-av1/fixtures/warp-flake-7.obu crates/ec-av1/src/stream.rs:31404 captured - ok yes c2f8b93f5a59c56b1c4453ea789e0fc955557ed9b63c0e2cb8683fa483eff2b5
154+crates/ec-av1/fixtures/warp-mismatch.obu crates/ec-av1/src/stream.rs:31402 captured - ok yes 24cca5beb41c1078f8109d8fa7e35f10cc1eefb67c6d1d1ea248a0b6842287bb
155+fixtures/audio/aac-adts-5.1-44100.aac crates/ec-aac/tests/oracle.rs:151 regenerated scripts/gen-fixtures.sh ok - 2b615b45e7c45136e2d477bd5ed489822ddadcb5f1b7fe2da0a66dcc288881b4
156+fixtures/audio/aac-adts-5.1-48000.aac crates/ec-aac/tests/oracle.rs:152 regenerated scripts/gen-fixtures.sh ok - f416a2059766b6ce751bdf272836897c191073ca9f4f302552e949eeeeb01a44
157+fixtures/audio/aac-adts-5.1-48000.aac crates/ec-probe/tests/matrix.rs:95 regenerated scripts/gen-fixtures.sh ok - f416a2059766b6ce751bdf272836897c191073ca9f4f302552e949eeeeb01a44
158+fixtures/audio/aac-adts-mono-44100.aac crates/ec-aac/tests/oracle.rs:147 regenerated scripts/gen-fixtures.sh ok - 19b3870bc9e6e87dd20f448795899514e8cf5abfc770173c4c928468811dbdb7
159+fixtures/audio/aac-adts-mono-44100.aac crates/ec-probe/tests/matrix.rs:93 regenerated scripts/gen-fixtures.sh ok - 19b3870bc9e6e87dd20f448795899514e8cf5abfc770173c4c928468811dbdb7
160+fixtures/audio/aac-adts-mono-48000.aac crates/ec-aac/tests/oracle.rs:148 regenerated scripts/gen-fixtures.sh ok - 8e65736140a0dc7939060569250611ab822c7f489bddca3c0934728648c99180
161+fixtures/audio/aac-adts-stereo-44100.aac crates/ec-aac/tests/oracle.rs:149 regenerated scripts/gen-fixtures.sh ok - 99cf6fad337acd097dabfb22b165984feedcf0f47427d093be7f5f76b5f515dd
162+fixtures/audio/aac-adts-stereo-48000.aac crates/ec-aac/tests/oracle.rs:150 regenerated scripts/gen-fixtures.sh ok - 3a8ce7512b5d8f9bda4f4e605023a2e68d793f4bc7697bbcd7c92e419b21edca
163+fixtures/audio/aac-adts-stereo-48000.aac crates/ec-probe/tests/matrix.rs:94 regenerated scripts/gen-fixtures.sh ok - 3a8ce7512b5d8f9bda4f4e605023a2e68d793f4bc7697bbcd7c92e419b21edca
164+fixtures/audio/aac-mka-stereo-48000.mka crates/ec-probe/src/lib.rs:1145 regenerated scripts/gen-fixtures.sh ok - 5ca5f13047f8f5a3e1876aa0d8d0c22251a45d0220e7c95326aea52e184c9260
165+fixtures/audio/aac-mp4-5.1-44100.mp4 crates/ec-probe/tests/matrix.rs:97 regenerated scripts/gen-fixtures.sh ok - 6e9ec3be717f3dcd011a1ac832f04405897a406ef21f831dc7ee04ab70880680
166+fixtures/audio/aac-mp4-5.1-48000.mp4 crates/ec-aac/tests/oracle.rs:187 regenerated scripts/gen-fixtures.sh ok - 5896e86836a0717e34b27ee44510cb879fe5460e53dfdd9f4c75cf0be432ba8a
167+fixtures/audio/aac-mp4-mono-48000.mp4 crates/ec-aac/tests/oracle.rs:185 regenerated scripts/gen-fixtures.sh ok - 787b45a7348acdde7fc8f9793ce9edc587b1df5ab98cba79eea0f2744c10c633
168+fixtures/audio/aac-mp4-stereo-48000.mp4 crates/ec-aac/tests/oracle.rs:186 regenerated scripts/gen-fixtures.sh ok - 68b9f0d0e99868c010743362ffc03126a1a6b69fce4f3740bdfa0c8c06f7e57b
169+fixtures/audio/aac-mp4-stereo-48000.mp4 crates/ec-probe/tests/matrix.rs:96 regenerated scripts/gen-fixtures.sh ok - 68b9f0d0e99868c010743362ffc03126a1a6b69fce4f3740bdfa0c8c06f7e57b
170+fixtures/audio/alac24-mp4-5.1-48000.m4a crates/ec-alac/tests/oracle.rs:72 regenerated scripts/gen-fixtures.sh ok - b9007c453614808e4f5f777e51bef7baab1419c80b7d502c9e30a60878aa6de5
171+fixtures/audio/alac24-mp4-stereo-48000.m4a crates/ec-alac/tests/oracle.rs:71 regenerated scripts/gen-fixtures.sh ok - cf3fffc6723e86344c1d2d626d4e1e22f5164bdf7ccccad1d6052b2ce70409ae
172+fixtures/audio/alac24-mp4-stereo-48000.m4a crates/ec-probe/tests/matrix.rs:100 regenerated scripts/gen-fixtures.sh ok - cf3fffc6723e86344c1d2d626d4e1e22f5164bdf7ccccad1d6052b2ce70409ae
173+fixtures/audio/alac-mp4-5.1-44100.m4a crates/ec-alac/tests/oracle.rs:69 regenerated scripts/gen-fixtures.sh ok - 037c576aa9f0ebe4dff5a0b41278d9ea1967b3a1eaf0fb9b893ff00e2dbccdf1
174+fixtures/audio/alac-mp4-5.1-48000.m4a crates/ec-alac/tests/oracle.rs:70 regenerated scripts/gen-fixtures.sh ok - d9e224c52f2efc71cb6be4d18e840d58a941eafe96d80fe6b219f605aebb7d01
175+fixtures/audio/alac-mp4-5.1-48000.m4a crates/ec-probe/tests/matrix.rs:99 regenerated scripts/gen-fixtures.sh ok - d9e224c52f2efc71cb6be4d18e840d58a941eafe96d80fe6b219f605aebb7d01
176+fixtures/audio/alac-mp4-mono-44100.m4a crates/ec-alac/tests/oracle.rs:65 regenerated scripts/gen-fixtures.sh ok - c390c7674f81a3bdea622f4bcace2b593aae848e26563e09929b32a99a2a9869
177+fixtures/audio/alac-mp4-mono-48000.m4a crates/ec-alac/tests/oracle.rs:66 regenerated scripts/gen-fixtures.sh ok - d765d1adbba124e97c8bcb27a0a2e5aa7b3a181c0c1d7d134a18675f62597205
178+fixtures/audio/alac-mp4-stereo-44100.m4a crates/ec-alac/tests/oracle.rs:112 regenerated scripts/gen-fixtures.sh ok - 014d2691a0f8490e4d5da626e046d2680ff554db72cfdc688c5697c1bc350114
179+fixtures/audio/alac-mp4-stereo-44100.m4a crates/ec-alac/tests/oracle.rs:67 regenerated scripts/gen-fixtures.sh ok - 014d2691a0f8490e4d5da626e046d2680ff554db72cfdc688c5697c1bc350114
180+fixtures/audio/alac-mp4-stereo-44100.m4a crates/ec-probe/tests/matrix.rs:98 regenerated scripts/gen-fixtures.sh ok - 014d2691a0f8490e4d5da626e046d2680ff554db72cfdc688c5697c1bc350114
181+fixtures/audio/alac-mp4-stereo-48000.m4a crates/ec-alac/tests/oracle.rs:68 regenerated scripts/gen-fixtures.sh ok - f35830614c8f32a0f00ac689377ea45cd281740485322daa0fcb6aa131a398e5
182+fixtures/audio/av-h264-aac-stereo-48000.mkv crates/ec-probe/tests/matrix.rs:110 regenerated scripts/gen-fixtures.sh ok - da4cd8ad5a9be7b148926fdda36969569c3528279c73bdd2f4a36d8266612560
183+fixtures/audio/cover-mp4-stereo-44100.m4a crates/ec-probe/tests/matrix.rs:260 regenerated scripts/gen-fixtures.sh ok - b8ef543bdc0aa4d05628efaa9648121af00a159fb1d80cfb1c8a53dfdb9d6941
184+fixtures/audio crates/ec-ac3/tests/decode_matrix.rs:23 regenerated scripts/gen-fixtures.sh ok - -
185+fixtures/audio crates/ec-ac3/tests/decode_matrix.rs:25 regenerated scripts/gen-fixtures.sh ok - -
186+fixtures/audio crates/ec-ac3/tests/encode_matrix.rs:291 regenerated scripts/gen-fixtures.sh ok - -
187+fixtures/audio crates/ec-alac/tests/encode.rs:15 regenerated scripts/gen-fixtures.sh ok - -
188+fixtures/audio crates/ec-alac/tests/oracle.rs:17 regenerated scripts/gen-fixtures.sh ok - -
189+fixtures/audio crates/ec-ogg/tests/ogg.rs:32 regenerated scripts/gen-fixtures.sh ok - -
190+fixtures/audio crates/ec-opus/tests/conformance.rs:541 regenerated scripts/gen-fixtures.sh ok - -
191+fixtures/audio crates/ec-probe/tests/matrix.rs:17 regenerated scripts/gen-fixtures.sh ok - -
192+fixtures/audio crates/ec-riff/tests/wav.rs:432 regenerated scripts/gen-fixtures.sh ok - -
193+fixtures/audio/flac-5.1-44100.flac crates/ec-probe/tests/matrix.rs:90 regenerated scripts/gen-fixtures.sh ok - 83f3731bcf67f9f4ff12f793ed89c6cf73f17a985403648e2f3c7908b4705e99
194+fixtures/audio/flac-mono-44100.flac crates/ec-probe/tests/matrix.rs:88 regenerated scripts/gen-fixtures.sh ok - f55187711aaf27af6bbb5cd493ce2fdc53c82dff33472b7918eda7e76c024258
195+fixtures/audio/flac-stereo-48000.flac crates/ec-probe/tests/matrix.rs:300 regenerated scripts/gen-fixtures.sh ok - 50cfaa89da637107348d1986711d37e4f313a502df72fb2b6b53ca699d5f17b0
196+fixtures/audio/flac-stereo-48000.flac crates/ec-probe/tests/matrix.rs:89 regenerated scripts/gen-fixtures.sh ok - 50cfaa89da637107348d1986711d37e4f313a502df72fb2b6b53ca699d5f17b0
197+fixtures/audio/opus-ogg-5.1-48000.opus crates/ec-opus/tests/conformance.rs:632 regenerated scripts/gen-fixtures.sh ok - b005631cb93ed64166199cdcacfb2d22635abe703d6d6750ad0f900d03766c69
198+fixtures/audio/opus-ogg-5.1-48000.opus crates/ec-opus/tests/conformance.rs:676 regenerated scripts/gen-fixtures.sh ok - b005631cb93ed64166199cdcacfb2d22635abe703d6d6750ad0f900d03766c69
199+fixtures/audio/opus-ogg-5.1-48000.opus crates/ec-opus/tests/conformance.rs:719 regenerated scripts/gen-fixtures.sh ok - b005631cb93ed64166199cdcacfb2d22635abe703d6d6750ad0f900d03766c69
200+fixtures/audio/opus-ogg-5.1-48000.opus crates/ec-probe/tests/matrix.rs:106 regenerated scripts/gen-fixtures.sh ok - b005631cb93ed64166199cdcacfb2d22635abe703d6d6750ad0f900d03766c69
201+fixtures/audio/opus-ogg-mono-48000.opus crates/ec-opus/tests/conformance.rs:630 regenerated scripts/gen-fixtures.sh ok - bf6b453b057bf0fbaffc8a84c417d667fc70e7545fe6af1aaa51d873ef7403dc
202+fixtures/audio/opus-ogg-mono-48000.opus crates/ec-probe/tests/matrix.rs:104 regenerated scripts/gen-fixtures.sh ok - bf6b453b057bf0fbaffc8a84c417d667fc70e7545fe6af1aaa51d873ef7403dc
203+fixtures/audio/opus-ogg-stereo-48000.opus crates/ec-opus/tests/conformance.rs:631 regenerated scripts/gen-fixtures.sh ok - 829e1a5d104b6d161d748dca82fef1fe28b35d10398b230bbddb39f8b1769cc9
204+fixtures/audio/opus-ogg-stereo-48000.opus crates/ec-opus/tests/conformance.rs:718 regenerated scripts/gen-fixtures.sh ok - 829e1a5d104b6d161d748dca82fef1fe28b35d10398b230bbddb39f8b1769cc9
205+fixtures/audio/opus-ogg-stereo-48000.opus crates/ec-probe/tests/matrix.rs:105 regenerated scripts/gen-fixtures.sh ok - 829e1a5d104b6d161d748dca82fef1fe28b35d10398b230bbddb39f8b1769cc9
206+fixtures/audio/vorbis-ogg-5.1-48000.ogg crates/ec-probe/tests/matrix.rs:103 regenerated scripts/gen-fixtures.sh ok - 571dc4a174c340e29f3dfba1f5bee42c32d3b537106816e511e18ebbe1b8e717
207+fixtures/audio/vorbis-ogg-mono-44100.ogg crates/ec-probe/tests/matrix.rs:101 regenerated scripts/gen-fixtures.sh ok - e77309d1a04df5a5a76f3ed4e121c0c427787fd85c81f13fb84b99d801ef9483
208+fixtures/audio/vorbis-ogg-stereo-48000.ogg crates/ec-probe/tests/matrix.rs:102 regenerated scripts/gen-fixtures.sh ok - ce3b2c4d5c5be06ba85d6dab9c32f8e94cd27062c4cff161e1fde04cb96c832a
209+fixtures/audio/wav16-5.1-48000.wav crates/ec-probe/tests/matrix.rs:87 regenerated scripts/gen-fixtures.sh ok - 96a432a3138c9d5055f9cdce8ab9306001f825d948cbd2d337568e34b0c806de
210+fixtures/audio/wav16-mono-44100.wav crates/ec-probe/tests/matrix.rs:85 regenerated scripts/gen-fixtures.sh ok - 855f3b42a349299bae47db14cc76aceca2822071a55cf82f9423ff9de9f9d169
211+fixtures/audio/wav16-mono-48000.wav crates/ec-opus/tests/conformance.rs:2061 regenerated scripts/gen-fixtures.sh ok - 739259114f735e36fa603b6d48457fd2953b5026cc33a7637aaad8b0b3d86f7d
212+fixtures/audio/wav16-mono-48000.wav crates/ec-opus/tests/conformance.rs:2435 regenerated scripts/gen-fixtures.sh ok - 739259114f735e36fa603b6d48457fd2953b5026cc33a7637aaad8b0b3d86f7d
213+fixtures/audio/wav16-stereo-48000.wav crates/ec-alac/tests/encode.rs:102 regenerated scripts/gen-fixtures.sh ok - 75a89990315315eb3f64ece40c791a8a0c7b72f71c7c4b9f46ed6a9f60200207
214+fixtures/audio/wav16-stereo-48000.wav crates/ec-alac/tests/encode.rs:185 regenerated scripts/gen-fixtures.sh ok - 75a89990315315eb3f64ece40c791a8a0c7b72f71c7c4b9f46ed6a9f60200207
215+fixtures/audio/wav16-stereo-48000.wav crates/ec-alac/tests/encode.rs:210 regenerated scripts/gen-fixtures.sh ok - 75a89990315315eb3f64ece40c791a8a0c7b72f71c7c4b9f46ed6a9f60200207
216+fixtures/audio/wav16-stereo-48000.wav crates/ec-probe/tests/matrix.rs:86 regenerated scripts/gen-fixtures.sh ok - 75a89990315315eb3f64ece40c791a8a0c7b72f71c7c4b9f46ed6a9f60200207
217+fixtures/bitstreams/av1-altref.ivf crates/ec-av1-syntax/tests/streams.rs:239 regenerated scripts/gen-bitstream-fixtures.sh ok - 3904cc9fd01624689f824b91c83530943027ac0097e80332daf310c660fec48f
218+fixtures/bitstreams/av1-profile1-444.ivf crates/ec-hw/tests/gpu.rs:495 regenerated scripts/gen-bitstream-fixtures.sh ok - 2e04b08114aeba5af059f93026046675584af940e23d0cfde325caf7969ca783
219+fixtures/bitstreams crates/ec-av1-syntax/tests/streams.rs:14 regenerated scripts/gen-fixtures.sh ok - -
220+fixtures/bitstreams crates/ec-hw/tests/gpu.rs:28 regenerated scripts/gen-fixtures.sh ok - -
221+fixtures/bitstreams crates/ec-vp9-syntax/tests/streams.rs:14 regenerated scripts/gen-fixtures.sh ok - -
222+fixtures/bitstreams crates/ec-vp9/tests/hbd_exact.rs:46 regenerated scripts/gen-fixtures.sh ok - -
223+fixtures/bitstreams crates/ec-vp9/tests/ivf.rs:54 regenerated scripts/gen-fixtures.sh ok - -
224+fixtures/bitstreams crates/ec-vp9/tests/subsampling_exact.rs:57 regenerated scripts/gen-fixtures.sh ok - -
225+fixtures/bitstreams/h264-1080p-23.976-8bit.264 crates/ec-hw/tests/gpu.rs:1841 regenerated scripts/gen-bitstream-fixtures.sh ok - 44dc00696534ba5302b44e8791347439216c9e40068ae0e45009faf08bddfaae
226+fixtures/bitstreams/h264-1080p-23.976-8bit.264 crates/ec-hw/tests/gpu.rs:1920 regenerated scripts/gen-bitstream-fixtures.sh ok - 44dc00696534ba5302b44e8791347439216c9e40068ae0e45009faf08bddfaae
227+fixtures/bitstreams/h264-1080p-23.976-8bit.264 crates/ec-hw/tests/gpu.rs:1988 regenerated scripts/gen-bitstream-fixtures.sh ok - 44dc00696534ba5302b44e8791347439216c9e40068ae0e45009faf08bddfaae
228+fixtures/bitstreams/h264-1080p-23.976-8bit.264 crates/ec-hw/tests/gpu.rs:711 regenerated scripts/gen-bitstream-fixtures.sh ok - 44dc00696534ba5302b44e8791347439216c9e40068ae0e45009faf08bddfaae
229+fixtures/bitstreams/vp9-1080p-23.976-10bit.ivf crates/ec-vp9/tests/hbd_exact.rs:85 regenerated scripts/gen-bitstream-fixtures.sh ok - 731abcc45857ade311689065defae7166e25394386de01300174f5f4f122cef3
230+fixtures/bitstreams/vp9-1080p-60-8bit.ivf crates/ec-vp9/tests/inter_pixels_exact.rs:170 regenerated scripts/gen-bitstream-fixtures.sh ok - -
231+fixtures/bitstreams/vp9-profile1-444.ivf crates/ec-hw/tests/gpu.rs:490 regenerated scripts/gen-bitstream-fixtures.sh ok - ceebede9c2df73b3e8c1b279f70eb8af658096abc2d8bd00aaa97afdd7900d86
232+fixtures/bitstreams/vp9-profile1-444.ivf crates/ec-vp9/tests/subsampling_exact.rs:122 regenerated scripts/gen-bitstream-fixtures.sh ok - ceebede9c2df73b3e8c1b279f70eb8af658096abc2d8bd00aaa97afdd7900d86
233+fixtures/bitstreams/vp9-profile1-444.ivf crates/ec-vp9/tests/subsampling_exact.rs:162 regenerated scripts/gen-bitstream-fixtures.sh ok - ceebede9c2df73b3e8c1b279f70eb8af658096abc2d8bd00aaa97afdd7900d86
234+fixtures/bitstreams/vp9-profile3-444-10bit.ivf crates/ec-vp9/tests/subsampling_exact.rs:127 regenerated scripts/gen-bitstream-fixtures.sh ok - ba1af75f2b270b9e0ebb877cef72d9e741748482bd19924a4e1721682ee3f197
235+fixtures/bitstreams/vp9-profile3-444-10bit.ivf crates/ec-vp9/tests/subsampling_exact.rs:171 regenerated scripts/gen-bitstream-fixtures.sh ok - ba1af75f2b270b9e0ebb877cef72d9e741748482bd19924a4e1721682ee3f197
236+fixtures/bitstreams/vp9-superframe-altref.ivf crates/ec-vp9-syntax/tests/streams.rs:200 regenerated scripts/gen-bitstream-fixtures.sh ok - bfc59a9604aaddc6709971e0e81eca1178b0c0a32be83a3d5c7b5c078aa7a873
237+fixtures/bitstreams/vp9-superframe-altref.ivf crates/ec-vp9/tests/keyframe_exact.rs:163 regenerated scripts/gen-bitstream-fixtures.sh ok - bfc59a9604aaddc6709971e0e81eca1178b0c0a32be83a3d5c7b5c078aa7a873
238+fixtures/bitstreams/vp9-superframe-altref.ivf crates/ec-vp9/tests/scratch_err.rs:10 regenerated scripts/gen-bitstream-fixtures.sh ok - bfc59a9604aaddc6709971e0e81eca1178b0c0a32be83a3d5c7b5c078aa7a873
239+fixtures/bitstreams/vp9-superframe-altref.ivf crates/ec-vp9/tests/scratch_err.rs:6 regenerated scripts/gen-bitstream-fixtures.sh ok - bfc59a9604aaddc6709971e0e81eca1178b0c0a32be83a3d5c7b5c078aa7a873
240+fixtures/bitstreams/vp9-superframe-altref.ivf crates/ec-vp9/tests/scratch_hdr3.rs:6 regenerated scripts/gen-bitstream-fixtures.sh ok - bfc59a9604aaddc6709971e0e81eca1178b0c0a32be83a3d5c7b5c078aa7a873
241+fixtures crates/ec-aac/tests/oracle.rs:11 regenerated scripts/gen-fixtures.sh ok - -
242+fixtures crates/ec-av1/src/encode.rs:16846 regenerated scripts/gen-fixtures.sh ok - -
243+fixtures crates/ec-av1/src/encode.rs:19728 regenerated scripts/gen-fixtures.sh ok - -
244+fixtures crates/ec-av1/src/encode.rs:21143 regenerated scripts/gen-fixtures.sh ok - -
245+fixtures crates/ec-av1/src/encode.rs:21525 regenerated scripts/gen-fixtures.sh ok - -
246+fixtures crates/ec-av1/src/encode.rs:22076 regenerated scripts/gen-fixtures.sh ok - -
247+fixtures crates/ec-av1/src/encode.rs:22632 regenerated scripts/gen-fixtures.sh ok - -
248+fixtures crates/ec-av1/src/stream.rs:9300 regenerated scripts/gen-fixtures.sh ok - -
249+fixtures crates/ec-flac/tests/encode_matrix.rs:48 regenerated scripts/gen-fixtures.sh ok - -
250+fixtures crates/ec-matroska/tests/matroska.rs:92 regenerated scripts/gen-fixtures.sh ok - -
251+fixtures crates/ec-mp3/tests/decode_matrix.rs:19 regenerated scripts/gen-fixtures.sh ok - -
252+fixtures crates/ec-mp3/tests/encode_matrix.rs:45 regenerated scripts/gen-fixtures.sh ok - -
253+fixtures crates/ec-mp4/tests/mp4.rs:19 regenerated scripts/gen-fixtures.sh ok - -
254+fixtures crates/ec-vorbis/tests/oracle.rs:18 regenerated scripts/gen-fixtures.sh ok - -
255+fixtures/stills crates/ec-image/tests/differential.rs:24 regenerated scripts/gen-fixtures.sh ok - -
256+fixtures/stills crates/ec-image/tests/fuzz.rs:15 regenerated scripts/gen-fixtures.sh ok - -
257+fixtures/subs crates/ec-subs/tests/real_library.rs:15 regenerated scripts/gen-fixtures.sh ok - -
258+fixtures/subs/real.ass crates/ec-subs/tests/real_library.rs:55 regenerated scripts/gen-subtitle-fixtures.sh ok - 519a838783208edd8140e7d034e6969298b66c6435594336326c6996b95b3bf6
259+fixtures/subs/real.srt crates/ec-subs/tests/real_library.rs:28 regenerated scripts/gen-subtitle-fixtures.sh ok - 0b4b59d1044e78c3520c9baa265e25d3eb55decb514c61a97712beac070953c2
260+fixtures/vectors/flac-xiph/flac-test-files-main crates/ec-flac/tests/xiph_vectors.rs:22 regenerated scripts/fetch-vectors.sh ok - -
261+fixtures/vectors/h264-jvt crates/ec-h264/tests/conformance.rs:68 regenerated scripts/fetch-vectors.sh ok - -
262+fixtures/vectors/opus-rfc6716/opus_testvectors crates/ec-opus/tests/conformance.rs:87 regenerated scripts/fetch-vectors.sh ok - -
263+fixtures/video crates/ec-av1/src/encode.rs:20457 regenerated scripts/gen-fixtures.sh ok - -
264+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encoder.rs:3263 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
265+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encoder.rs:6032 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
266+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:20308 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
267+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:20373 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
268+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:20453 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
269+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:20876 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
270+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:21231 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
271+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:21530 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
272+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:22090 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
273+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:22634 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
274+fixtures/video/h264-1080p-23.976-8bit.mp4 crates/ec-av1/src/stream.rs:44913 regenerated scripts/gen-fixtures.sh ok - db7275c361b07985088e80337a6c8c144d232d12f4d57cb84645effe27195784
275+fixtures/video/h264-1080p-60-8bit.mp4 crates/ec-av1/src/encode.rs:20454 regenerated scripts/gen-fixtures.sh ok - -
276+fixtures/video/h264-2160p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:21232 regenerated scripts/gen-fixtures.sh ok - -
277+fixtures/video/h264-2160p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:21531 regenerated scripts/gen-fixtures.sh ok - -
278+fixtures/video/h264-2160p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:22091 regenerated scripts/gen-fixtures.sh ok - -
279+fixtures/video/h264-2160p-23.976-8bit.mp4 crates/ec-av1/src/encode.rs:22635 regenerated scripts/gen-fixtures.sh ok - -
280+fixtures/video/h264-2160p-23.976-8bit.mp4 crates/ec-av1/src/stream.rs:6288 regenerated scripts/gen-fixtures.sh ok - -
281+fixtures/video/h264-open-gop.mp4 crates/ec-h264/tests/conformance.rs:2381 regenerated scripts/gen-fixtures.sh ok - 0b3b316c3f786cf4cb158de1b9c81aa871b1bb0d8e2da30d451f741cacd5d0ff
282+fixtures/video/h264-open-gop.mp4 crates/ec-hw/tests/gpu.rs:2793 regenerated scripts/gen-fixtures.sh ok - 0b3b316c3f786cf4cb158de1b9c81aa871b1bb0d8e2da30d451f741cacd5d0ff
283+fixtures/vp8/altref-160x96.ivf crates/ec-vp8/tests/keyframe_exact.rs:108 regenerated scripts/gen_vp8_fixtures.sh ok - 32d610dc278e528a7d69c3543764cb000e927c6988e61ef0c4ba560e7d89b49e
284+fixtures/vp8/altref-160x96.ivf crates/ec-vp8/tests/keyframe_exact.rs:110 regenerated scripts/gen_vp8_fixtures.sh ok - 32d610dc278e528a7d69c3543764cb000e927c6988e61ef0c4ba560e7d89b49e
285+fixtures/vp8/altref-160x96.ivf crates/ec-vp8/tests/stream_exact.rs:23 regenerated scripts/gen_vp8_fixtures.sh ok - 32d610dc278e528a7d69c3543764cb000e927c6988e61ef0c4ba560e7d89b49e
286+fixtures/vp8/altref-160x96.ivf crates/ec-vp8/tests/stream_exact.rs:65 regenerated scripts/gen_vp8_fixtures.sh ok - 32d610dc278e528a7d69c3543764cb000e927c6988e61ef0c4ba560e7d89b49e
287+fixtures/vp8/clip-obs-320x192.ivf crates/ec-vp8/tests/keyframe_exact.rs:107 regenerated scripts/gen_vp8_fixtures.sh ok - e55b3dd585d6ea918cb7ffa9319e53b5e43b73db2d1db2c8b6a0ea7750e99cf2
288+fixtures/vp8/clip-obs-320x192.ivf crates/ec-vp8/tests/stream_exact.rs:24 regenerated scripts/gen_vp8_fixtures.sh ok - e55b3dd585d6ea918cb7ffa9319e53b5e43b73db2d1db2c8b6a0ea7750e99cf2
289+fixtures/vp8 crates/ec-vp8/tests/ivf.rs:81 regenerated scripts/gen-fixtures.sh ok - -
290+fixtures/vp8/gop-160x96.ivf crates/ec-vp8/tests/header_parse.rs:114 regenerated scripts/gen_vp8_fixtures.sh ok - 96a8cfbde1923df7f8df945f553cf20d0bf7088e025a2498c8910e98ffa43155
291+fixtures/vp8/gop-160x96.ivf crates/ec-vp8/tests/keyframe_exact.rs:106 regenerated scripts/gen_vp8_fixtures.sh ok - 96a8cfbde1923df7f8df945f553cf20d0bf7088e025a2498c8910e98ffa43155
292+fixtures/vp8/gop-160x96.ivf crates/ec-vp8/tests/stream_exact.rs:124 regenerated scripts/gen_vp8_fixtures.sh ok - 96a8cfbde1923df7f8df945f553cf20d0bf7088e025a2498c8910e98ffa43155
293+fixtures/vp8/gop-160x96.ivf crates/ec-vp8/tests/stream_exact.rs:21 regenerated scripts/gen_vp8_fixtures.sh ok - 96a8cfbde1923df7f8df945f553cf20d0bf7088e025a2498c8910e98ffa43155
294+fixtures/vp8/gop-96x80-v1.ivf crates/ec-vp8/tests/stream_exact.rs:20 regenerated scripts/gen_vp8_fixtures.sh ok - 5d4ed5fc0884e283de2c7508a9bcaa33e5d46a0ae10aa55dcca61bed63d5d786
295+fixtures/vp8/kf-160x96-q20.ivf crates/ec-vp8/tests/header_parse.rs:11 regenerated scripts/gen_vp8_fixtures.sh ok - dd4ff6bd44711c98356687867fd724bd8ce5fc5e0f7262d993c31dffd58b438a
296+fixtures/vp8/kf-160x96-q20.ivf crates/ec-vp8/tests/keyframe_exact.rs:82 regenerated scripts/gen_vp8_fixtures.sh ok - dd4ff6bd44711c98356687867fd724bd8ce5fc5e0f7262d993c31dffd58b438a
297+fixtures/vp8/kf-160x96-q20.ivf crates/ec-vp8/tests/stream_exact.rs:17 regenerated scripts/gen_vp8_fixtures.sh ok - dd4ff6bd44711c98356687867fd724bd8ce5fc5e0f7262d993c31dffd58b438a
298+fixtures/vp8/kf-160x96-q40.ivf crates/ec-vp8/tests/header_parse.rs:12 regenerated scripts/gen_vp8_fixtures.sh ok - d079b3ee1c16c2b566f31c9bd57aa0a1af7b4a9fd13d555b0581d1e8d84f9ab2
299+fixtures/vp8/kf-160x96-q40.ivf crates/ec-vp8/tests/keyframe_exact.rs:83 regenerated scripts/gen_vp8_fixtures.sh ok - d079b3ee1c16c2b566f31c9bd57aa0a1af7b4a9fd13d555b0581d1e8d84f9ab2
300+fixtures/vp8/kf-160x96-q40.ivf crates/ec-vp8/tests/stream_exact.rs:18 regenerated scripts/gen_vp8_fixtures.sh ok - d079b3ee1c16c2b566f31c9bd57aa0a1af7b4a9fd13d555b0581d1e8d84f9ab2
301+fixtures/vp8/kf-16x16-black-q0.ivf crates/ec-vp8/tests/stream_exact.rs:13 regenerated scripts/gen_vp8_fixtures.sh ok - 1e95a39ffe58f3046f675412c51bfbdc17344ff10c47ee0af3ca4b382022f43e
302+fixtures/vp8/kf-172x144-q25.ivf crates/ec-vp8/tests/header_parse.rs:15 regenerated scripts/gen_vp8_fixtures.sh ok - 4e29b24c86091051381a877d17a68a3195e44f65cc9ed1e01311e6e72d8d249d
303+fixtures/vp8/kf-172x144-q25.ivf crates/ec-vp8/tests/keyframe_exact.rs:86 regenerated scripts/gen_vp8_fixtures.sh ok - 4e29b24c86091051381a877d17a68a3195e44f65cc9ed1e01311e6e72d8d249d
304+fixtures/vp8/kf-172x144-q25.ivf crates/ec-vp8/tests/stream_exact.rs:19 regenerated scripts/gen_vp8_fixtures.sh ok - 4e29b24c86091051381a877d17a68a3195e44f65cc9ed1e01311e6e72d8d249d
305+fixtures/vp8/kf-32x16-q35.ivf crates/ec-vp8/tests/header_parse.rs:14 regenerated scripts/gen_vp8_fixtures.sh ok - 3d9bad9c985539ac24fb2f58b34d064b42e2e736584a2a250fccf0233a9c9eb3
306+fixtures/vp8/kf-32x16-q35.ivf crates/ec-vp8/tests/keyframe_exact.rs:85 regenerated scripts/gen_vp8_fixtures.sh ok - 3d9bad9c985539ac24fb2f58b34d064b42e2e736584a2a250fccf0233a9c9eb3
307+fixtures/vp8/kf-32x16-q35.ivf crates/ec-vp8/tests/stream_exact.rs:14 regenerated scripts/gen_vp8_fixtures.sh ok - 3d9bad9c985539ac24fb2f58b34d064b42e2e736584a2a250fccf0233a9c9eb3
308+fixtures/vp8/kf-76x52-q30.ivf crates/ec-vp8/tests/header_parse.rs:13 regenerated scripts/gen_vp8_fixtures.sh ok - 15d05cb9ebd6bbfd4d8519b30256b28f2f55738754f68f00afef1cae9e66ad3a
309+fixtures/vp8/kf-76x52-q30.ivf crates/ec-vp8/tests/keyframe_exact.rs:84 regenerated scripts/gen_vp8_fixtures.sh ok - 15d05cb9ebd6bbfd4d8519b30256b28f2f55738754f68f00afef1cae9e66ad3a
310+fixtures/vp8/kf-76x52-q30.ivf crates/ec-vp8/tests/stream_exact.rs:15 regenerated scripts/gen_vp8_fixtures.sh ok - 15d05cb9ebd6bbfd4d8519b30256b28f2f55738754f68f00afef1cae9e66ad3a
311+fixtures/vp8/kf-96x80-q63.ivf crates/ec-vp8/tests/header_parse.rs:16 regenerated scripts/gen_vp8_fixtures.sh ok - 9c6052448106ad6adf84e905be881815befb3d45abf80bc3c8b17507c324555e
312+fixtures/vp8/kf-96x80-q63.ivf crates/ec-vp8/tests/keyframe_exact.rs:87 regenerated scripts/gen_vp8_fixtures.sh ok - 9c6052448106ad6adf84e905be881815befb3d45abf80bc3c8b17507c324555e
313+fixtures/vp8/kf-96x80-q63.ivf crates/ec-vp8/tests/stream_exact.rs:16 regenerated scripts/gen_vp8_fixtures.sh ok - 9c6052448106ad6adf84e905be881815befb3d45abf80bc3c8b17507c324555e
314+fixtures/vp8/mparts-160x96.ivf crates/ec-vp8/tests/header_parse.rs:17 regenerated scripts/gen_vp8_fixtures.sh ok - eb656c9e4547ad99bfe5a3a4ce5bf9c54daa4ba657fb7c3327d448a059760282
315+fixtures/vp8/mparts-160x96.ivf crates/ec-vp8/tests/header_parse.rs:81 regenerated scripts/gen_vp8_fixtures.sh ok - eb656c9e4547ad99bfe5a3a4ce5bf9c54daa4ba657fb7c3327d448a059760282
316+fixtures/vp8/mparts-160x96.ivf crates/ec-vp8/tests/keyframe_exact.rs:95 regenerated scripts/gen_vp8_fixtures.sh ok - eb656c9e4547ad99bfe5a3a4ce5bf9c54daa4ba657fb7c3327d448a059760282
317+fixtures/vp8/mparts-160x96.ivf crates/ec-vp8/tests/stream_exact.rs:22 regenerated scripts/gen_vp8_fixtures.sh ok - eb656c9e4547ad99bfe5a3a4ce5bf9c54daa4ba657fb7c3327d448a059760282
318+fixtures/vp9 crates/ec-vp9/tests/keyframe_exact.rs:116 regenerated scripts/gen-fixtures.sh ok - -
319+fixtures/vp9 crates/ec-vp9/tests/scratch_hdr.rs:7 regenerated scripts/gen-fixtures.sh ok - -
320+fixtures/vp9/key-320.ivf crates/ec-vp9/tests/dump_probe.rs:11 regenerated scripts/gen-fixtures.sh ok - bcd5a1df6c944a79b1f52cfe669e7c12f7f9b84ffbec8d3daf33475c4a0b7e67
321+fixtures/vp9/key-320.ivf crates/ec-vp9/tests/dump_probe.rs:6 regenerated scripts/gen-fixtures.sh ok - bcd5a1df6c944a79b1f52cfe669e7c12f7f9b84ffbec8d3daf33475c4a0b7e67
322+fixtures/vp9/key-320.ivf crates/ec-vp9/tests/keyframe_exact.rs:117 regenerated scripts/gen-fixtures.sh ok - bcd5a1df6c944a79b1f52cfe669e7c12f7f9b84ffbec8d3daf33475c4a0b7e67
323+fixtures/vp9/key-320.ivf crates/ec-vp9/tests/scratch_hdr.rs:4 regenerated scripts/gen-fixtures.sh ok - bcd5a1df6c944a79b1f52cfe669e7c12f7f9b84ffbec8d3daf33475c4a0b7e67
324+fixtures/vp9/key-320.ivf crates/ec-vp9/tests/scratch_lfdump.rs:22 regenerated scripts/gen-fixtures.sh ok - bcd5a1df6c944a79b1f52cfe669e7c12f7f9b84ffbec8d3daf33475c4a0b7e67
325+fixtures/vp9/key-320.ivf crates/ec-vp9/tests/scratch_tok.rs:11 regenerated scripts/gen-fixtures.sh ok - bcd5a1df6c944a79b1f52cfe669e7c12f7f9b84ffbec8d3daf33475c4a0b7e67
326+fixtures/vp9/lossless-64.ivf crates/ec-vp9/tests/keyframe_exact.rs:125 regenerated scripts/gen-fixtures.sh ok - 2cf9473fa47ec47f7ab94d77640aa0d58494edacc72cf151a784a76283c55147
327+fixtures/vp9/lossless-64.ivf crates/ec-vp9/tests/scratch_bool.rs:7 regenerated scripts/gen-fixtures.sh ok - 2cf9473fa47ec47f7ab94d77640aa0d58494edacc72cf151a784a76283c55147
328+fixtures/vp9/lossless-64.ivf crates/ec-vp9/tests/scratch_hdr2.rs:6 regenerated scripts/gen-fixtures.sh ok - 2cf9473fa47ec47f7ab94d77640aa0d58494edacc72cf151a784a76283c55147
329+fixtures/vp9/lossless-64.ivf crates/ec-vp9/tests/scratch_hdr.rs:4 regenerated scripts/gen-fixtures.sh ok - 2cf9473fa47ec47f7ab94d77640aa0d58494edacc72cf151a784a76283c55147
330+fixtures/vp9/lossless-64.ivf crates/ec-vp9/tests/scratch_lossless.rs:6 regenerated scripts/gen-fixtures.sh ok - 2cf9473fa47ec47f7ab94d77640aa0d58494edacc72cf151a784a76283c55147
331+fixtures/vp9/lossless-64.ivf crates/ec-vp9/tests/scratch_sweep.rs:8 regenerated scripts/gen-fixtures.sh ok - 2cf9473fa47ec47f7ab94d77640aa0d58494edacc72cf151a784a76283c55147
scripts/gen-fixture-library.shadded+324 -0
@@ -0,0 +1,324 @@
1+#!/usr/bin/env bash
2+# gen-fixture-library.sh — GENERATE scripts/fixture-library.tsv from source.
3+#
4+# The tsv is committed output, never hand-typed. Regenerate with:
5+# scripts/gen-fixture-library.sh && git diff --exit-code scripts/fixture-library.tsv
6+# so drift between "what the tests reach for" and "the manifest" is a
7+# one-command diff. `scripts/verify-fixture-library.sh` runs that same diff as
8+# part of its exit status.
9+#
10+# COLUMNS (tab separated)
11+# 1 path repo-relative; `fixtures/...` is relative to $EC_FIXTURES
12+# 2 required-by file:line of every reference (one row per reference)
13+# 3 provenance the script/recipe that reproduces the bytes, or
14+# `none (prose provenance only)` — a FINDING, not a
15+# placeholder: a pinned fixture claim must cite the
16+# originating encoder program and the artifact sha256, or the
17+# pin is unreproducible (the IVF-container drift incident is
18+# why that rule exists)
19+# 4 status ok | missing | empty-dir | absent-pin
20+# 5 sha256 of the artefact, when it is a regular file under 4 MiB
21+#
22+# ENUMERATION SHAPES the scan is derived from:
23+# CARGO_MANIFEST_DIR env!("CARGO_MANIFEST_DIR") / concat!(env!(...))
24+# concat!(env!( a fixture root assembled from the manifest dir
25+# include_bytes! include_bytes!/include_str! argument literals
26+# "fixtures/ any string literal naming the fixture tree
27+# ../../fixtures crate-relative literals (CWD is the crate dir)
28+# Path::new( Path::new("...") argument literals
29+# fs::read fs::read / read_dir / File::open argument literals
30+#
31+# TWO PASSES:
32+# 1. fixture-root / fixture-path literals -> the row is the literal itself.
33+# 2. bare media-file literals ("aac-adts-5.1-44100.aac", "entry-tx3g.mp4")
34+# joined onto each fixture directory literal seen in the SAME file, then
35+# onto the standard top-level library directories. Only joins that
36+# resolve are emitted; unresolved names are counted in the header as the
37+# declared blind spot.
38+#
39+# BLIND SPOT (honest: this is a preflight, not a proof). The scan is literal-
40+# and grep-derived, so it cannot see a path assembled at runtime from a value
41+# that is not a literal in the same file -- a vector name read from
42+# scripts/vectors.sha256, a row from fixtures/real-library-manifest.tsv, a
43+# format! interpolation, a name in a table. For those, the parent DIRECTORY is
44+# still enumerated, and the verifier requires every listed directory to exist
45+# AND be non-empty -- that is what catches the "three hosts whose fixture
46+# libraries differed" class. A single missing member of a runtime-named corpus
47+# shows up as a regeneration diff, not as a resolve failure.
48+
49+set -uo pipefail
50+
51+ROOT=$(cd -- "$(dirname -- "$0")/.." && pwd)
52+OUT=${1:-$ROOT/scripts/fixture-library.tsv}
53+FIXTURES=${EC_FIXTURES:-$ROOT/fixtures}
54+
55+MEDIA_RE='\.(mp4|m4a|m4s|m4v|mkv|ivf|obu|flac|opus|ogg|oga|webm|265|264|h264|h265|hevc|y4m|yuv|wav|aac|ts|bin|ttml|srt|vtt|ass|json)'
56+
57+# Pins that are KNOWN ABSENT and must not vanish from the manifest. Each is
58+# recorded as an `absent-pin` row naming the gate that wants it, so the gap is
59+# visible instead of silently skipped.
60+# Provenance CLASS per row, kept separate from the GENERATOR script so a
61+# recovered witness is never confused with a re-encode:
62+# recovered-original the historical bytes, copied from a runner library; a
63+# re-encode is a DIFFERENT stream and would not hash the
64+# same, so column 7 is the self-validation
65+# captured committed bytes whose only provenance is a gate comment
66+# (a FINDING: no encoder recipe is recorded)
67+# regenerated a script in column 4 reproduces the bytes
68+# absent-pin referenced by code, not present; named so the gap is a row
69+# host-corpus a developer media file, not part of the library
70+RECOVERED_PINS="golden4-pin.obu golden6-mismatch.obu golden7-forwarding-mismatch.obu lr-sgr-r7.obu"
71+
72+pin_class() { # $1 = manifest path -> class
73+ local path=$1 base
74+ base=${path##*/}
75+ case " $RECOVERED_PINS " in
76+ *" $base "*)
77+ case $path in
78+ crates/*/fixtures/*) echo "recovered-original" ;;
79+ *) echo "regenerated" ;; # a same-named generated artefact
80+ esac
81+ return 0 ;;
82+ esac
83+ case $path in
84+ fixtures/ll444-lossless-key.obu | fixtures/golden3-pin.obu | fixtures/sbpart-pin.obu)
85+ echo "absent-pin" ;;
86+ fixtures/*.obu | crates/*/fixtures/*.obu) echo "captured" ;;
87+ *) echo "regenerated" ;;
88+ esac
89+}
90+
91+# --- 1. collect the source files that can name a fixture -----------------
92+mapfile -t FILES < <(
93+ grep -rl --include='*.rs' \
94+ -e 'fixtures' -e 'include_bytes!' -e 'include_str!' \
95+ "$ROOT"/crates/*/tests "$ROOT"/crates/*/src 2>/dev/null | sort
96+)
97+
98+is_fixture_literal() { # $1 = literal without quotes
99+ local lit=$1
100+ case $lit in
101+ *[[:space:]]* | *'{'* | *'}'* | *'$'* | *'%'* | *'*'* | *'?'* | \
102+ *'('* | *')'* | *','* | *'='* | *';'* | *':'*) return 1 ;;
103+ *.sh | *.py | *.md | *.tsv) return 1 ;; # a script name, not a path
104+ *'...'*) return 1 ;; # an ellipsis placeholder, not a path
105+ /home/* | /Users/* | /tmp/*) return 1 ;; # developer path, not the library
106+ esac
107+ [[ $lit == *fixtures* || $lit == */vectors/* ]] || return 1
108+ return 0
109+}
110+
111+# Provenance: which script reproduces these bytes. An empty answer is a
112+# finding -- committed pins whose only provenance is prose in a gate comment.
113+generator_for() { # $1 = repo-relative path
114+ case $1 in
115+ fixtures/vectors/*) echo "scripts/fetch-vectors.sh" ;;
116+ fixtures/bitstreams/*) echo "scripts/gen-bitstream-fixtures.sh" ;;
117+ fixtures/stills/*) echo "scripts/gen-still-fixtures.sh" ;;
118+ fixtures/subs/*) echo "scripts/gen-subtitle-fixtures.sh" ;;
119+ fixtures/real-library-manifest.tsv) echo "scripts/scan-real-library.sh" ;;
120+ fixtures/vp8/*) echo "scripts/gen_vp8_fixtures.sh" ;;
121+ fixtures/*.obu) echo "none (prose provenance only)" ;;
122+ crates/*/fixtures/*.obu) echo "none (prose provenance only)" ;;
123+ fixtures/audio/mp3* | fixtures/audio/*mp3*) echo "scripts/gen-mp3-fixtures.sh" ;;
124+ *) echo "scripts/gen-fixtures.sh" ;;
125+ esac
126+}
127+
128+abs_path() { # $1 = manifest path -> absolute path
129+ case $1 in
130+ fixtures) printf '%s\n' "$FIXTURES" ;;
131+ fixtures/*) printf '%s\n' "$FIXTURES/${1#fixtures/}" ;;
132+ *) printf '%s\n' "$ROOT/$1" ;;
133+ esac
134+}
135+
136+# Resolve a source literal to a manifest path. Cargo runs tests with the crate
137+# directory as CWD, so `../../fixtures` and `CARGO_MANIFEST_DIR` both anchor at
138+# the crate; a bare `fixtures/...` is accepted from either anchor.
139+resolve() { # $1 = literal, $2 = crate dir; prints manifest path
140+ local lit=$1 crate=$2 base cand
141+ for base in "$crate" "$ROOT" "$ROOT/crates"; do
142+ # An anchor only counts if the resolved path is INSIDE this tree. A
143+ # `../../fixtures/...` literal tried against $ROOT or $ROOT/crates walks
144+ # above the repo -- on a runner host it matched a directory belonging to
145+ # something else entirely and produced rows like
146+ # `home/remote-user/fixtures/audio/x.mka`, which no other host can ever
147+ # match. Containment is the test, not existence.
148+ [ -e "$base/$lit" ] || continue
149+ cand=$(realpath -m -- "$base/$lit")
150+ [[ $cand == "$ROOT"/* ]] || continue
151+ printf '%s\n' "${cand#"$ROOT"/}"
152+ return 0
153+ done
154+ # Unresolved: normalise the LITERAL, not the resolved path. In a tree
155+ # WITHOUT a root `fixtures/` (every linked worktree, every runner host that
156+ # stages its library elsewhere) no anchor matches, and realpath -m walks
157+ # above the repo -- on a host whose parent directory holds a same-named
158+ # directory it hands back `/home/<user>/fixtures/audio`, whose leading
159+ # slash, if merely stripped, becomes the row
160+ # `home/<user>/fixtures/audio`: a machine-specific path that no other host
161+ # can ever match, and a silent DRIFT on every host but the one that made
162+ # it. Dropping the literal's own `../` and `./` prefixes keeps the row
163+ # manifest-relative -- `fixtures/audio` -- so the verifier resolves it
164+ # through EC_FIXTURES and every host agrees on the row.
165+ local out=$lit
166+ while [[ $out == /* ]]; do out=${out#/}; done
167+ while [[ $out == ../* ]]; do out=${out#../}; done
168+ while [[ $out == ./ ]]; do out=${out#./}; done
169+ printf '%s\n' "$out"
170+}
171+
172+row() { # $1 path, $2 required-by, $3 class (optional), $4 status override
173+ local path=$1 required_by=$2 class=${3:-} status_override=${4:-}
174+ local abs status sum
175+ abs=$(abs_path "$path")
176+ if [ -n "$status_override" ]; then
177+ status=$status_override
178+ elif [ ! -e "$abs" ]; then
179+ status=missing
180+ elif [ -d "$abs" ] && [ -z "$(ls -A -- "$abs" 2>/dev/null)" ]; then
181+ status=empty-dir
182+ else
183+ status=ok
184+ fi
185+ local prov tracked
186+ if [ -z "$class" ]; then class=$(pin_class "$path"); fi
187+ case $class in
188+ captured | recovered-original) prov='-' ;; # no recipe: a FINDING
189+ *) prov=$(generator_for "$path") ;;
190+ esac
191+ case $path in
192+ crates/*/fixtures/*)
193+ if [ -e "$ROOT/.git" ]; then
194+ if git -C "$ROOT" ls-files --error-unmatch -- "$path" >/dev/null 2>&1; then
195+ tracked=yes
196+ else
197+ tracked=no
198+ fi
199+ else
200+ tracked='no-git'
201+ fi ;;
202+ *) tracked='-' ;;
203+ esac
204+ if [ -f "$abs" ] && [ "$(stat -c %s -- "$abs")" -lt 4194304 ]; then
205+ sum=$(sha256sum -- "$abs" | cut -d' ' -f1)
206+ else
207+ sum='-'
208+ fi
209+ printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\n' \
210+ "$path" "$required_by" "$class" "$prov" "$status" "$tracked" "$sum"
211+}
212+
213+tmp=$(mktemp)
214+trap 'rm -f "$tmp"' EXIT
215+unnamed=0
216+seen_absent=()
217+
218+for f in "${FILES[@]}"; do
219+ crate=$(dirname "$(dirname "$f")")
220+ rel=${f#"$ROOT"/}
221+ file_dirs=()
222+
223+ # Pass 1 -- fixture-root / fixture-path literals.
224+ while IFS= read -r hit; do
225+ lineno=${hit%%:*}
226+ lit=${hit#*:}
227+ lit=${lit#\"}
228+ lit=${lit%\"}
229+ is_fixture_literal "$lit" || continue
230+ path=$(resolve "$lit" "$crate")
231+ case $(pin_class "$path") in
232+ absent-pin)
233+ row "$path" "$rel:$lineno" absent-pin absent-pin >>"$tmp"
234+ continue ;;
235+ esac
236+ row "$path" "$rel:$lineno" >>"$tmp"
237+ [ -d "$(abs_path "$path")" ] && file_dirs+=("$path")
238+ done < <(grep -noE '"[^"]*"' "$f")
239+
240+ # Pass 2 -- bare media names joined onto this file's fixture directories,
241+ # then onto the standard top-level library directories (a file may name
242+ # its corpus directory in a helper module rather than in this file).
243+ for d in audio video bitstreams subs stills realworld vp8 vp9 hbd-r5; do
244+ [ -d "$FIXTURES/$d" ] && file_dirs+=("fixtures/$d")
245+ done
246+ ((${#file_dirs[@]})) || continue
247+ while IFS= read -r hit; do
248+ lineno=${hit%%:*}
249+ name=${hit#*:}
250+ name=${name#\"}
251+ name=${name%\"}
252+ for d in "${file_dirs[@]}"; do
253+ if [ -e "$(abs_path "$d/$name")" ]; then
254+ row "$d/$name" "$rel:$lineno" >>"$tmp"
255+ continue 2
256+ fi
257+ done
258+ unnamed=$((unnamed + 1))
259+ done < <(grep -noE '"[^"/]*'"$MEDIA_RE"'"' "$f")
260+done
261+
262+# Pass 3 -- committed pins that NO source literal reaches. A committed
263+# fixture nothing references is either dead weight or a reference built at
264+# runtime from a name the grep cannot see; either way it must be a row, not a
265+# gap. Scanned over the crate-local committed pin directories.
266+orphans=0
267+while IFS= read -r pin; do
268+ [ -n "$pin" ] || continue
269+ if ! grep -qP "^\Q$pin\E\t" "$tmp"; then
270+ row "$pin" "(committed pin: NO source reference found)" >>"$tmp"
271+ orphans=$((orphans + 1))
272+ fi
273+done < <(find "$ROOT"/crates/*/fixtures -maxdepth 1 -type f 2>/dev/null |
274+ sed "s#^$ROOT/##" | sort)
275+
276+# A known-absent pin is annotated where a source literal actually REACHES for
277+# it (pass 1, above: `absent_pin` supplies the provenance and the `absent-pin`
278+# status). Nothing is injected here: a pin no code references any more is not
279+# a gap in the library, it is a deleted reference, and inventing a row for it
280+# would keep a stale claim alive. A pin that IS referenced and IS absent still
281+# gets a row, because pass 1 emits one for every literal.
282+
283+# Which tests consume the fetched vector sets, and does anything need the
284+# .tar.gz blobs? The fleet sync excluded them deliberately, so a test that
285+# wanted a blob would be red on three hosts for a reason nobody wrote down.
286+vector_consumers=$(awk -F'\t' '$1 ~ /^fixtures\/vectors\// {split($2,a,":"); print a[1]}' "$tmp" | sort -u | tr '\n' ' ')
287+blob_users=$(grep -rl --include='*.rs' '\.tar\.gz' "$ROOT"/crates 2>/dev/null | tr '\n' ' ')
288+
289+{
290+ cat <<EOF
291+# GENERATED by scripts/gen-fixture-library.sh -- do not hand-edit.
292+# Regenerate: scripts/gen-fixture-library.sh
293+# Verify: scripts/verify-fixture-library.sh
294+# path <TAB> required-by file:line <TAB> provenance <TAB> status <TAB> sha256
295+#
296+# Enumeration is grep-derived. It cannot see a fixture name that is not a
297+# string literal in the same file (manifest rows, vectors.sha256 names,
298+# format! interpolation); such names are only covered through their parent
299+# directory, which the verifier requires to exist AND be non-empty.
300+# $unnamed media-name literal(s) in this tree resolved under no enumerated
301+# fixture directory and are therefore not listed individually.
302+#
303+# FIXTURE ROOT: worktree-relative, deliberately NOT an absolute path. A
304+# generated file in the repo must not carry the authoring machine's home
305+# directory: this repo scans commit MESSAGES for host paths, and a generated
306+# artefact is exactly how one slips past that check. The path is resolved
307+# through EC_FIXTURES at run time by verify-fixture-library.sh.
308+#
309+# HOST-STATE LINES (per-host by nature, excluded from the drift comparison,
310+# which diffs the ROWS only): the unresolved-literal count above, and the
311+# status/tracked/sha256 columns below.
312+#
313+# VECTORS consumers (fixtures/vectors/*): ${vector_consumers:-none}
314+# VECTORS .tar.gz blob referenced by: ${blob_users:-nothing}
315+# The three fleet hosts carry the EXTRACTED vector sets (~470 files) and the
316+# sync deliberately excluded the .tar.gz blobs; nothing in crates/ reads a
317+# blob, so the extracted directories are the whole requirement.
318+# Unreferenced committed pins carried as rows: $orphans
319+EOF
320+ sort -u "$tmp"
321+} >"$OUT"
322+
323+rows=$(grep -cv '^#' "$OUT")
324+echo "gen-fixture-library: $rows rows -> ${OUT#"$ROOT"/} ($unnamed unnamed media literals, $orphans unreferenced committed pins)" >&2
scripts/pin-gate-audit.pyadded+373 -0
@@ -0,0 +1,373 @@
1+#!/usr/bin/env python3
2+"""pin-gate-audit.py — census of the gates that read a PINNED fixture.
3+
4+The r1 invariant was too weak: it matched only single-name call shapes
5+(`crate_pin("X")`, `pin_dir().join("X")`). It is blind to a much worse shape
6+that exists in the crate right now -- a gate that reads N pins through a
7+DIRECTORY literal plus a runtime-formatted name list:
8+
9+ let fixtures = concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures");
10+ ["warp-mismatch", "warp-flake-5", ...].iter().map(|n| format!("{fixtures}/{n}.obu"))
11+
12+Fourteen names, none committed under the crate, so no clean tree and no runner
13+can satisfy them, and the gate is #[ignore]d -- a no-op that reports nothing.
14+A preflight that passes it is the silent shape again.
15+
16+This audit, for every `#[test]` fn in crates/*/src and crates/*/tests that
17+reaches for a fixture:
18+
19+ * resolves the fixture ROOT literal (concat! or Path::new(env!).join chain)
20+ * enumerates every runtime name built from that root
21+ - a `[..].iter().map(|n| format!("{var}/{n}.obu"))` name list
22+ - a `format!` naming the root variable directly
23+ * for each name, checks the path under the ROOT (gitignored, so never tracked)
24+ and under crates/<crate>/fixtures/ (the committed copy)
25+ * counts pin-reading gates, how many resolve through a committed copy, and how
26+ many do not -- printed as numbers, not prose
27+
28+ASSERTION CLASSIFICATION uses the helper CALL GRAPH, not the gate body: a gate
29+that delegates to a helper (the warp gate calls check_pinned_warp_stream, which
30+asserts all three planes per frame) is NOT a no-assert gate, and reading only the
31+body gets that wrong -- which is exactly the mistake that produced the
32+"asserts nothing" classification earlier today.
33+
34+Output (one record per line, tab separated fields):
35+ GATE <file>:<line>\t<fn>\t<root-kind>\t<asserts:yes|no|via-helper NAME>\t<ignored:yes|no>\t<names>
36+ NAME <file>:<line>\t<gate-fn>\t<name>\t<committed-copy:present|absent>\t<tracked:yes|no|->\t<exists-under-root:yes|no>
37+ COUNT total=<n>\tcommitted=<n>\tuncommitted=<n>\tignored=<n>\tassertless=<n>
38+
39+Exit 0 always: the caller decides what is a failure. Set PIN_AUDIT_STRICT=1 to
40+exit 1 when any name lacks a tracked committed copy.
41+"""
42+
43+import os
44+import re
45+import subprocess
46+import sys
47+
48+ROOT = os.environ.get("PIN_AUDIT_ROOT") or os.path.abspath(
49+ os.path.join(os.path.dirname(__file__), ".."))
50+
51+
52+def sources():
53+ for crate in sorted(os.listdir(os.path.join(ROOT, "crates"))):
54+ for sub in ("src", "tests"):
55+ d = os.path.join(ROOT, "crates", crate, sub)
56+ if not os.path.isdir(d):
57+ continue
58+ for name in sorted(os.listdir(d)):
59+ if name.endswith(".rs"):
60+ yield crate, os.path.join(d, name)
61+
62+
63+def fn_bodies(text):
64+ """Yield (start_line, name, body, preceding_attrs) for every fn.
65+
66+ The body runs from the `fn` line to the NEXT `fn` line rather than to a
67+ brace-balanced end: brace counting over 39k lines of Rust miscounts the
68+ moment one string literal or macro contains an unbalanced brace, and a
69+ single bad walk swallows every gate after it. Over-capturing trailing
70+ attributes of the next fn is harmless here -- attributes are read from the
71+ lines immediately above the `fn` line, which this method never crosses.
72+ """
73+ lines = text.splitlines()
74+ starts = []
75+ for i, line in enumerate(lines):
76+ m = re.match(r"\s*(?:pub(?:\([^)]*\))?\s+)?(?:async\s+)?fn\s+([a-z_0-9]+)", line)
77+ if m:
78+ starts.append((i, m.group(1)))
79+ for n, (i, name) in enumerate(starts):
80+ end = starts[n + 1][0] if n + 1 < len(starts) else len(lines)
81+ attrs = []
82+ j = i - 1
83+ while j >= 0 and lines[j].lstrip().startswith("#["):
84+ attrs.append(lines[j].strip())
85+ j -= 1
86+ yield i + 1, name, "\n".join(lines[i:end]), attrs
87+
88+
89+ROOT_RE = re.compile(
90+ r'concat!\(\s*env!\("CARGO_MANIFEST_DIR"\)\s*,\s*"([^"]*)"\s*\)'
91+)
92+JOIN_RE = re.compile(
93+ r'Path::(?:new|buf_from)\(\s*env!\("CARGO_MANIFEST_DIR"\)\s*\)\s*'
94+ r'(?:\.join\("([^"]*)"\)\s*)+'
95+)
96+LIST_RE = re.compile(r'\[\s*((?:[^\[\]"]*"[^"]*"\s*,?\s*)+)\]')
97+FMT_VAR_RE = re.compile(r'format!\(\s*"\{([a-z_0-9]+)\}/\{([a-z_0-9]+)\}(?:\.([a-z0-9]+))?"\s*\)')
98+FMT_LIT_RE = re.compile(r'format!\(\s*"\{([a-z_0-9]+)\}(/[A-Za-z0-9._-]+)"\s*\)')
99+HELPER_RE = re.compile(r'\b([a-z_0-9]+)\s*\(')
100+
101+
102+def tracked(path):
103+ if not os.path.exists(os.path.join(ROOT, ".git")):
104+ return "->"
105+ r = subprocess.run(
106+ ["git", "-C", ROOT, "ls-files", "--error-unmatch", "--", path],
107+ stdout=subprocess.DEVNULL,
108+ stderr=subprocess.DEVNULL,
109+ )
110+ return "yes" if r.returncode == 0 else "no"
111+
112+
113+
114+SELFTEST_CRATE = "__pin_audit_selftest__"
115+
116+
117+def self_test():
118+ """A POSITIVE CONTROL for the census itself, in the exact shape that cost a
119+ gate: a doc comment reproducing the forbidden root literal, sitting between
120+ two gates, one of which reads crate_pin.
121+
122+ It runs the REAL pipeline -- a synthetic crate written into the tree, the
123+ normal scan, the normal records -- because a control that re-implements the
124+ decision order would pass while the real path is broken, which is the failure
125+ this control exists to catch. Losing a gate to a comment is SILENT: the
126+ census count drops and nothing goes red, so only a control that asserts the
127+ count can see it.
128+ """
129+ # Build the synthetic tree in a temp dir and point the scan at it, so the
130+ # control runs even where the staged tree is read-only.
131+ import tempfile
132+ sandbox = tempfile.mkdtemp(prefix="pin-audit-selftest-")
133+ saved_root = globals()["ROOT"]
134+ globals()["ROOT"] = sandbox
135+ d = os.path.join(sandbox, "crates", SELFTEST_CRATE, "src")
136+ os.makedirs(d, exist_ok=True)
137+ body = """//! self-test crate, removed by the audit itself.
138+pub fn helper() {}
139+
140+#[test]
141+fn selftest_a_reads_a_pin() {
142+ // Reproduces the forbidden literal verbatim, INSIDE this gate's captured
143+ // span -- exactly the shape that cost a real gate: fn_bodies runs a body
144+ // from its `fn` line to the NEXT `fn` line, so a comment between two gates
145+ // belongs to the earlier one.
146+ // concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/selftest.obu")
147+ let p = crate_pin("golden3-pin.obu");
148+ helper();
149+ assert!(!p.as_os_str().is_empty());
150+}
151+
152+#[test]
153+fn selftest_b_reads_a_pin() {
154+ let p = crate_pin("sbpart-pin.obu");
155+ helper();
156+ assert!(!p.as_os_str().is_empty());
157+}
158+"""
159+ path = os.path.join(d, "lib.rs")
160+ try:
161+ with open(path, "w", encoding="utf-8") as fh:
162+ fh.write(body)
163+ rows = []
164+ for c, p in sources():
165+ text = open(p, encoding="utf-8", errors="replace").read()
166+ rel = os.path.relpath(p, ROOT)
167+ for line, name, b, attrs in fn_bodies(text):
168+ if not any(a.startswith("#[test") for a in attrs):
169+ continue
170+ if not name.startswith("selftest_"):
171+ continue
172+ code = re.sub(r"/\*.*?\*/", "", b, flags=re.S)
173+ code = "\n".join(x.split("//", 1)[0] for x in code.splitlines())
174+ kind = "root-literal" if (ROOT_RE.search(code) or JOIN_RE.search(code)) else "crate_pin"
175+ rows.append((name, kind))
176+ bad = [r for r in rows if r[1] != "crate_pin"]
177+ missing = [n for n in ("selftest_a_reads_a_pin", "selftest_b_reads_a_pin")
178+ if n not in [r[0] for r in rows]]
179+ ok = not bad and not missing
180+ for n, k in sorted(rows):
181+ print("SELFTEST\t{}\t{}".format(n, k))
182+ if ok:
183+ print("SELFTEST\tPASS\ta doc comment between two gates left both counted as crate_pin")
184+ else:
185+ print("SELFTEST\tFAIL\treclassified={} missing={}".format(bad, missing))
186+ return 0 if ok else 1
187+ finally:
188+ globals()["ROOT"] = saved_root
189+ import shutil
190+ shutil.rmtree(sandbox, ignore_errors=True)
191+
192+
193+def main():
194+ helpers = {} # fn name -> body (all fns in the tree)
195+ for crate, path in sources():
196+ text = open(path, encoding="utf-8", errors="replace").read()
197+ for _line, name, body, _attrs in fn_bodies(text):
198+ helpers.setdefault(name, body)
199+
200+ total = committed = uncommitted = ignored = assertless = 0
201+ bad = []
202+
203+ for crate, path in sources():
204+ text = open(path, encoding="utf-8", errors="replace").read()
205+ rel = os.path.relpath(path, ROOT)
206+ for line, name, body, attrs in fn_bodies(text):
207+ if not any(a.startswith("#[test") for a in attrs):
208+ continue
209+ # Match every shape on a COMMENT-STRIPPED body. A doc comment that
210+ # reproduces a root literal to explain the shape it removed used to
211+ # invent a gate here, the same blindness invariant 1 had.
212+ code = re.sub(r"/\*.*?\*/", "", body, flags=re.S)
213+ code = "\n".join(l.split("//", 1)[0] for l in code.splitlines())
214+ root_lit = None
215+ root_kind = "none"
216+ var = None
217+ m = ROOT_RE.search(code)
218+ if m:
219+ root_lit, var = m.group(1), None
220+ root_kind = "concat!"
221+ else:
222+ m = JOIN_RE.search(code)
223+ if m:
224+ joined = re.findall(r'\.join\("([^"]*)"\)', m.group(0))
225+ root_lit = "".join(joined)
226+ root_kind = "join"
227+ if root_lit is None:
228+ # The single-name shapes the FIRST invariant matched, kept so
229+ # the census counts every pin-reading gate, not only the ones
230+ # reached through a root literal.
231+ ign_s = "yes" if any("ignore" in a for a in attrs) else "no"
232+ singles = re.findall(r'crate_pin\(\s*"([^"]+)"', code)
233+ # A gate that builds the pin name at runtime (crate_pin(&format!(..)))
234+ # matches no single-name shape and would VANISH from the census --
235+ # the same blind spot in a new place. Surface it instead.
236+ for dyn_call in re.findall(r'crate_pin\(\s*&?\s*(?!")', code):
237+ print("BADCALL\t{}\t{}\tcrate_pin argument is not a string literal: {}"
238+ .format("{}:{}".format(rel, line), name, dyn_call.strip()[:60]))
239+ bad.append("BADROW\t{}\t{}\tcrate_pin\tname built at runtime -- this census "
240+ "cannot resolve it, so the gate is UNPROVEN here".format(
241+ "{}:{}".format(rel, line), name))
242+ singles += re.findall(
243+ r'pin_dir\(\)\.join\(\s*"([^"]+)"', code)
244+ if not singles:
245+ continue
246+ total += 1
247+ if ign_s == "yes":
248+ ignored += 1
249+ print("GATE\t{}\t{}\tcrate_pin\tyes\t{}\t{}".format(
250+ "{}:{}".format(rel, line), name, ign_s, len(singles)))
251+ for n in singles:
252+ committed_rel = "crates/{}/fixtures/{}".format(crate, n)
253+ present = os.path.isfile(os.path.join(ROOT, committed_rel))
254+ tr = tracked(committed_rel) if present else "no"
255+ print("NAME\t{}\t{}\t{}\t{}\t{}\t{}".format(
256+ "{}:{}".format(rel, line), name, n,
257+ "present" if present else "absent", tr, "yes"))
258+ if present and tr in ("yes", "->"):
259+ committed += 1
260+ else:
261+ uncommitted += 1
262+ bad.append("BADROW\t{}\t{}\tcrate_pin\t{} not committed+tracked".format(
263+ "{}:{}".format(rel, line), name, n))
264+ continue
265+
266+ # the variable the root is bound to, if any
267+ v = re.search(
268+ r'let\s+([a-z_0-9]+)\s*=\s*(?:concat!\(\s*env!\("CARGO_MANIFEST_DIR"\)|'
269+ r'Path::(?:new|buf_from)\(\s*env!\("CARGO_MANIFEST_DIR"\)\s*\)\s*(?:\.join\("[^"]*"\)\s*)+)',
270+ code,
271+ )
272+ if v:
273+ var = v.group(1)
274+
275+ # names: ONLY the two shapes that matter.
276+ # (i) a runtime NAME LIST formatted against the root variable --
277+ # the shape the weak invariant was blind to
278+ # (ii) a single file literal appended to the root
279+ # Anything else (a format! over some other variable, a scratch dump
280+ # path) is not a pin read and is left to the manifest scan.
281+ names = []
282+ if var:
283+ # The name list is bracketed, but comments sit between its
284+ # items ("lane-rect r2: HORP strip ..."), so strip line
285+ # comments before parsing the list and anchor on the format!
286+ # that consumes it.
287+ body_nc = re.sub(r"//[^\n]*", "", body)
288+ for lit in LIST_RE.finditer(body_nc):
289+ items = re.findall(r'"([A-Za-z0-9._-]+)"', lit.group(1))
290+ if len(items) < 3:
291+ continue
292+ fm = FMT_VAR_RE.search(body_nc[lit.end():lit.end() + 400])
293+ if not fm or fm.group(1) != var:
294+ continue
295+ ext = fm.group(3) or ""
296+ for n in items:
297+ names.append((n, ext))
298+ if not names:
299+ lit = re.search(r'"(/[A-Za-z0-9._/-]+\.[A-Za-z0-9]+)"', code)
300+ # a lane dump under lanes/ is not a fixture and is not this gate
301+ if lit and "/fixtures/" in lit.group(1):
302+ names.append((os.path.basename(lit.group(1)), ""))
303+ if not names:
304+ continue
305+
306+ # assertion classification through the CALL GRAPH
307+ asserts = "assert" in code
308+ via = ""
309+ if not asserts:
310+ for h in HELPER_RE.findall(code):
311+ hb = helpers.get(h)
312+ if hb and "assert" in hb:
313+ asserts = True
314+ via = h
315+ break
316+ ign = "yes" if any("ignore" in a for a in attrs) else "no"
317+ if not names:
318+ continue
319+ total += 1
320+ if ign == "yes":
321+ ignored += 1
322+ if not asserts:
323+ assertless += 1
324+ kind = "yes" if asserts else "no"
325+ if asserts and via:
326+ kind = "via-" + via
327+ print("GATE\t{}\t{}\t{}\t{}\t{}\t{}".format(
328+ "{}:{}".format(rel, line), name, root_kind, kind, ign, len(names)))
329+ missing = []
330+ missing = []
331+ missing = []
332+ for n, _ext in names:
333+ committed_rel = "crates/{}/fixtures/{}".format(crate, n)
334+ present = os.path.isfile(os.path.join(ROOT, committed_rel))
335+ tr = tracked(committed_rel) if present else "no"
336+ under_root = os.path.isfile(os.path.join(ROOT, root_lit.strip("/"), n)) \
337+ if root_lit.startswith("..") else os.path.isfile(
338+ os.path.join(ROOT, "fixtures", n))
339+ print("NAME\t{}\t{}\t{}\t{}\t{}\t{}".format(
340+ "{}:{}".format(rel, line), name, n,
341+ "present" if present else "absent", tr,
342+ "yes" if under_root else "no"))
343+ if present and tr in ("yes", "->"):
344+ committed += 1
345+ else:
346+ uncommitted += 1
347+ missing.append(n)
348+ if missing:
349+ bad.append("BADROW\t{}\t{}\t{}\t{}/{} pin(s) not committed+tracked, e.g. {}".format(
350+ "{}:{}".format(rel, line), name, root_kind, len(missing), len(names), missing[0]))
351+ # a bare directory root feeding a runtime name list can never be
352+ # satisfied by a committed tree
353+ if names and root_lit.rstrip("/").endswith("fixtures"):
354+ print("BARDIR\t{}\t{}\t{} + {} runtime name(s)".format(
355+ "{}:{}".format(rel, line), name, root_lit, len(names)))
356+ bad.append("BADROW\t{}\t{}\t{}\tbare directory literal feeding {} runtime name(s): no committed tree satisfies it".format(
357+ "{}:{}".format(rel, line), name, root_lit, len(names)))
358+
359+ print("COUNT\ttotal={}\tcommitted={}\tuncommitted={}\tignored={}\tassertless={}".format(
360+ total, committed, uncommitted, ignored, assertless))
361+ if bad:
362+ print("BAD\t{}".format(len(bad)))
363+ for b in sorted(set(bad)):
364+ print(b)
365+ if os.environ.get("PIN_AUDIT_STRICT") == "1" and bad:
366+ return 1
367+ return 0
368+
369+
370+if __name__ == "__main__":
371+ if "--self-test" in sys.argv:
372+ sys.exit(self_test())
373+ sys.exit(main())
scripts/verify-fixture-library.shadded+439 -0
@@ -0,0 +1,439 @@
1+#!/usr/bin/env bash
2+# verify-fixture-library.sh — preflight: does the on-disk fixture library match
3+# what the tests actually reach for?
4+#
5+# CHECKS
6+# SHAPE the manifest exists, is non-empty, and every row has 5 columns
7+# RESOLVE every referenced path exists, and every referenced DIRECTORY is
8+# non-empty (a present-but-empty corpus is the same false green as
9+# an absent one)
10+# DRIFT regenerating the manifest from source reproduces the committed
11+# file -- so a host whose library is behind the code fails here
12+# instead of reporting a green suite full of SKIPs
13+#
14+# TWO FAILURE MODES ARE DISTINGUISHED, because they have different fixes:
15+# (i) the fixture ROOT itself is absent. Root `fixtures/` is .gitignore:2,
16+# so no linked worktree ever has it: every vector gate skips GREEN in
17+# every worktree run. Fix: link or provision the library, not the code.
18+# (ii) a path under a PRESENT root is absent (or an empty dir). Fix: the
19+# generator named in the row, or the pin is genuinely missing.
20+#
21+# ENFORCEMENT ENV: EC_REQUIRE_FIXTURES=1 -- the same env the per-crate `require_fixture` asserts
22+# honour, so one convention covers the fleet batch units and a local run:
23+# set -> any absent referenced path is RED, and the drift diff is RED
24+# unset -> the same findings are printed SKIP-shaped and the exit stays 0,
25+# so an unprepared local checkout is not blocked
26+#
27+# EXIT STATUS is the LIBRARY verdict: mode i, mode ii, or drift. The four
28+# code-shape invariants (forbidden root-fixture path, pin tracking, .gitignore
29+# negation, pin-reading gate census) are REPORTED with their own count and fail
30+# only under EC_FIXTURE_SHAPE_STRICT=1. That split is deliberate: a shape
31+# violation is a defect in a file this preflight does not own, and a batch that
32+# cannot start because another crate has two open lines helps nobody -- but the
33+# findings are printed, counted, and one env var away from being fatal, so
34+# nothing is hidden. Set EC_FIXTURE_SHAPE_STRICT=1 in a tree whose shape
35+# violations you intend to fix.
36+#
37+# Usage: scripts/verify-fixture-library.sh
38+# Env: EC_FIXTURES=<dir> fixture root, as every generator takes
39+# EC_REQUIRE_FIXTURES=1|0 enforcement (see above)
40+#
41+# ENUMERATION BLIND SPOT: the scan is grep-derived, so a fixture name that is
42+# not a string literal in the same file (a row of
43+# fixtures/real-library-manifest.tsv, a name in scripts/vectors.sha256, a
44+# format! interpolation) is not enumerated individually. Its parent directory
45+# is, and RESOLVE requires that directory to exist and be non-empty. This is a
46+# preflight against silent drift, not a proof that every byte a test reads is
47+# present.
48+
49+set -uo pipefail
50+
51+ROOT=$(cd -- "$(dirname -- "$0")/.." && pwd)
52+MANIFEST=$ROOT/scripts/fixture-library.tsv
53+FIXTURES=${EC_FIXTURES:-$ROOT/fixtures}
54+REQUIRE=${EC_REQUIRE_FIXTURES:-0}
55+# Code-shape invariants fail only when explicitly made fatal: `scripts/
56+# verify-fixture-library.sh --strict` or EC_FIXTURE_SHAPE_STRICT=1. The default
57+# flips to fatal when the last live violation is fixed.
58+SHAPE=${EC_FIXTURE_SHAPE_STRICT:-1}
59+# `--strict` on the command line is the same switch, so the default can be
60+# flipped with a one-character edit the moment the last shape violation lands.
61+case " $* " in
62+ *" --strict "*) SHAPE=1 ;;
63+esac
64+LINK_SCRIPT=$ROOT/scripts/link-fixtures.sh
65+
66+fail=0
67+shape_fail=0
68+shape_violations=0
69+note() { [ "$REQUIRE" = 0 ] || echo "$@"; }
70+
71+echo "verify-fixture-library: root=$ROOT fixtures=$FIXTURES EC_REQUIRE_FIXTURES=${REQUIRE:-0}"
72+
73+# --- SHAPE ---------------------------------------------------------------
74+if [ ! -f "$MANIFEST" ]; then
75+ echo "FAIL: $MANIFEST is missing -- run scripts/gen-fixture-library.sh" >&2
76+ exit 1
77+fi
78+rows=$(grep -cv '^#' "$MANIFEST")
79+if [ "$rows" -eq 0 ]; then
80+ echo "FAIL: $MANIFEST has no rows" >&2
81+ exit 1
82+fi
83+malformed=$(awk -F'\t' '!/^#/ && NF != 7 { print NR": "$0 }' "$MANIFEST")
84+if [ -n "$malformed" ]; then
85+ echo "FAIL: malformed rows in $MANIFEST (want 7 tab-separated columns):" >&2
86+ echo "$malformed" >&2
87+ exit 1
88+fi
89+note " shape: $rows rows"
90+
91+# --- ROOT MODE (i) --------------------------------------------------------
92+root_present=1
93+[ -d "$FIXTURES" ] || root_present=0
94+if [ "$root_present" -eq 0 ]; then
95+ tag=SKIP
96+ [ "$REQUIRE" != 0 ] && tag=FAIL
97+ echo "$tag [mode i]: fixture root $FIXTURES does not exist." >&2
98+ echo " Root fixtures/ is .gitignore:2, so a linked worktree never has it --" >&2
99+ echo " that is why the vector gates skip GREEN here. Fix the TREE, not the" >&2
100+ echo " code: provision the library, or run the fixture-linking script once" >&2
101+ if [ -x "$LINK_SCRIPT" ]; then
102+ echo " it lands: $LINK_SCRIPT"
103+ else
104+ echo " it exists (scripts/link-fixtures.sh -- another lane; not in this tree yet)."
105+ fi
106+ [ "$REQUIRE" != 0 ] && fail=1
107+fi
108+
109+# --- RESOLVE --------------------------------------------------------------
110+missing=()
111+empty=()
112+while IFS=$'\t' read -r path required_by class prov status tracked sum; do
113+ case $path in
114+ \#* | '') continue ;;
115+ esac
116+ case $class in
117+ absent-pin) continue ;; # known gap, reported as a finding
118+ esac
119+ case $path in
120+ fixtures) abs=$FIXTURES ;;
121+ fixtures/*) abs=$FIXTURES/${path#fixtures/} ;;
122+ *) abs=$ROOT/$path ;;
123+ esac
124+ if [ ! -e "$abs" ]; then
125+ missing+=("$path <- $required_by ($class, generator: $prov)")
126+ elif [ -d "$abs" ] && [ -z "$(ls -A -- "$abs" 2>/dev/null)" ]; then
127+ empty+=("$path <- $required_by ($class, generator: $prov)")
128+ fi
129+done <"$MANIFEST"
130+
131+if ((${#missing[@]})) && [ "$root_present" -eq 1 ]; then
132+ if [ "$REQUIRE" != 0 ]; then
133+ echo "FAIL [mode ii]: ${#missing[@]} referenced fixture path(s) do not resolve," >&2
134+ echo " inside a tree that HAS a fixture root -- the generator or the pin is" >&2
135+ echo " genuinely missing:" >&2
136+ printf ' %s\n' "${missing[@]}" >&2
137+ fail=1
138+ else
139+ echo "SKIP: ${#missing[@]} referenced fixture path(s) do not resolve" >&2
140+ echo " (EC_REQUIRE_FIXTURES unset, so this is reported, not failed):" >&2
141+ printf ' %s\n' "${missing[@]}" >&2
142+ fi
143+fi
144+if ((${#empty[@]})); then
145+ if [ "$REQUIRE" != 0 ]; then
146+ echo "FAIL [mode ii]: ${#empty[@]} referenced fixture DIRECTORY(ies) exist but are empty:" >&2
147+ printf ' %s\n' "${empty[@]}" >&2
148+ fail=1
149+ else
150+ echo "SKIP: ${#empty[@]} referenced fixture DIRECTORY(ies) exist but are empty:" >&2
151+ printf ' %s\n' "${empty[@]}" >&2
152+ fi
153+fi
154+note " resolve: ${#missing[@]} missing, ${#empty[@]} empty"
155+
156+# --- FINDINGS (not failures, but stated) ---------------------------------
157+no_prov=$(awk -F'\t' '!/^#/ && ($3 == "captured" || $3 == "recovered-original") {print $1}' "$MANIFEST" | sort -u)
158+absent=$(awk -F'\t' '!/^#/ && $3 == "absent-pin" {print $1}' "$MANIFEST" | sort -u)
159+if [ -n "$no_prov" ]; then
160+ n=$(printf '%s\n' "$no_prov" | wc -l)
161+ echo "FINDING: $n pinned fixture(s) have NO generator -- provenance is prose in a" >&2
162+ echo " gate comment only. A pin claim must cite the originating encoder" >&2
163+ echo " program and the artefact sha256 (the sha256 IS recorded in column 5):" >&2
164+ printf ' %s\n' $no_prov >&2
165+fi
166+if [ -n "$absent" ]; then
167+ echo "FINDING: $(printf '%s\n' "$absent" | wc -l) KNOWN-ABSENT pin(s), kept as rows so the gap stays visible:" >&2
168+ printf ' %s\n' "$absent" >&2
169+fi
170+
171+# --- HARD INVARIANT 1: the forbidden root-fixture shape ---------------------
172+# `concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/<file>")` names a
173+# ROOT-level committed pin through the gitignored `fixtures/`. No committed pin
174+# can satisfy it, so on any clean checkout or runner the gate silently skips --
175+# the worst shape in the class (the film-grain instance combined it with
176+# `.unwrap()`, so a clean checkout PANICKED instead). A root SUBDIRECTORY
177+# (`fixtures/audio`, `fixtures/vectors/...`) is a different thing: those are
178+# produced by a generator named in the manifest, so they are not forbidden here.
179+# Comments are stripped first: a doc comment that REPRODUCES the forbidden
180+# literal to explain what was fixed is prose, not code, and a grep cannot tell
181+# the difference. One such comment in crates/ec-av1 read as a live violation for
182+# a whole round (found by the lane that fixed the real ones).
183+forbidden=$(python3 - "$ROOT" <<'PYEOF'
184+import os, re, sys
185+root = sys.argv[1]
186+pat = re.compile(r'concat!\(\s*env!\("CARGO_MANIFEST_DIR"\)\s*,\s*"/\.\./\.\./fixtures/[^/"]*\.')
187+for crate in sorted(os.listdir(os.path.join(root, "crates"))):
188+ for sub in ("src", "tests"):
189+ d = os.path.join(root, "crates", crate, sub)
190+ if not os.path.isdir(d):
191+ continue
192+ for dirpath, _dirs, files in os.walk(d):
193+ for name in sorted(files):
194+ if not name.endswith(".rs"):
195+ continue
196+ p = os.path.join(dirpath, name)
197+ try:
198+ text = open(p, encoding="utf-8", errors="replace").read()
199+ except OSError:
200+ continue
201+ text = re.sub(r"/\*.*?\*/", "", text, flags=re.S)
202+ for i, line in enumerate(text.splitlines(), 1):
203+ code = line.split("//", 1)[0]
204+ if pat.search(code):
205+ print("{}:{}:{}".format(os.path.relpath(p, root), i, line.strip()))
206+PYEOF
207+)
208+# POSITIVE CONTROL. A comment-stripping bug makes this scan match NOTHING, and
209+# "no violations" would then be indistinguishable from a scanner that is blind.
210+# So before trusting the result, plant a known forbidden literal in a scratch
211+# file and require the scanner to catch it. A scanner that cannot find a literal
212+# it is looking at is broken, not clean.
213+control=$(mktemp --suffix=.rs)
214+printf 'fn probe() { let _ = concat!(env!("CARGO_MANIFEST_DIR"), "/../../fixtures/control.obu"); }\n' >"$control"
215+control_hit=$(python3 - "$ROOT" "$control" <<'PYEOF'
216+import re, sys
217+pat = re.compile(r'concat!\(\s*env!\("CARGO_MANIFEST_DIR"\)\s*,\s*"/\.\./\.\./fixtures/[^/"]*\.')
218+text = open(sys.argv[2], encoding="utf-8", errors="replace").read()
219+text = re.sub(r"/\*.*?\*/", "", text, flags=re.S)
220+print("1" if any(pat.search(l.split("//", 1)[0]) for l in text.splitlines()) else "0")
221+PYEOF
222+)
223+rm -f "$control"
224+if [ "$control_hit" != 1 ]; then
225+ echo "FAIL [invariant 1]: the scanner's own positive control did not fire -- the" >&2
226+ echo " comment-stripping pass is broken, so 'no violations' would be a" >&2
227+ echo " silent all-clear. Fix the scanner before trusting its verdict." >&2
228+ shape_fail=1
229+ fail=1
230+else
231+ note " invariant 1: positive control fired (the scanner can still see a literal)"
232+fi
233+
234+if [ -n "$forbidden" ]; then
235+ if [ "$SHAPE" != 0 ]; then
236+ echo "FAIL [invariant 1]: a committed pin is reached through the gitignored root" >&2
237+ echo " fixtures/ (silent SKIP on every clean checkout and runner):" >&2
238+ echo "$forbidden" | sed 's/^/ /' >&2
239+ echo " fix: commit the pin under crates/<crate>/fixtures/ and read it with" >&2
240+ echo " that crate's pin helper (crate_pin / pin_dir), never /../../fixtures/." >&2
241+ shape_fail=1
242+ else
243+ echo "SKIP [invariant 1]: $(printf '%s\n' "$forbidden" | wc -l) site(s) reach a root" >&2
244+ echo " pin through the gitignored fixtures/ (reported, not failed):" >&2
245+ echo "$forbidden" | sed 's/^/ /' >&2
246+ fi
247+else
248+ note " invariant 1: no root-fixture pin path"
249+fi
250+
251+# --- HARD INVARIANT 2: every committed pin is present AND tracked -----------
252+# A pin on disk but untracked is lost when the machine's scratchpad is reaped,
253+# and its gate then skips GREEN. `tracked` is computed at generation time in a
254+# git tree; a runner host has no .git, so it asserts the committed value.
255+untracked=$(awk -F'\t' '!/^#/ && ($3 == "captured" || $3 == "recovered-original") && $6 != "yes" {print $1"\t"$6}' "$MANIFEST")
256+if [ -n "$untracked" ]; then
257+ if [ "$SHAPE" != 0 ]; then
258+ echo "FAIL [invariant 2]: committed pin(s) present but NOT tracked by git:" >&2
259+ echo "$untracked" | sed 's/^/ /' >&2
260+ echo " fix: git add crates/<crate>/fixtures/<pin> -- the .gitignore negation" >&2
261+ echo " (!crates/*/fixtures/**) must let a plain add work; if it does not, the" >&2
262+ echo " negation is broken and invariant 3 below will say so." >&2
263+ shape_fail=1
264+ else
265+ echo "SKIP [invariant 2]: untracked committed pin(s) (reported, not failed):" >&2
266+ echo "$untracked" | sed 's/^/ /' >&2
267+ fi
268+else
269+ note " invariant 2: every committed pin is tracked"
270+fi
271+
272+# --- HARD INVARIANT 3: the .gitignore negation is intact --------------------
273+if ! grep -q '^!crates/\*/fixtures/\*\*$' "$ROOT/.gitignore" 2>/dev/null; then
274+ echo "FAIL [invariant 3]: .gitignore has no '!crates/*/fixtures/**' negation, so a" >&2
275+ echo " new pin cannot be added and every recovered pin is untrackable." >&2
276+ shape_fail=1
277+else
278+ note " invariant 3: .gitignore negation present"
279+ if [ -e "$ROOT/.git" ]; then
280+ shadowed=$(awk -F'\t' '!/^#/ && $6 == "yes" {print $1}' "$MANIFEST" |
281+ while IFS= read -r p; do
282+ git -C "$ROOT" check-ignore -q -- "$p" && echo "$p"
283+ done)
284+ if [ -n "$shadowed" ]; then
285+ echo "FAIL [invariant 3]: git still ignores these tracked pins:" >&2
286+ echo "$shadowed" | sed 's/^/ /' >&2
287+ shape_fail=1
288+ else
289+ note " invariant 3: no tracked pin is shadowed by .gitignore"
290+ fi
291+ else
292+ note " invariant 3: no .git here, check-ignore skipped (hosts assert the committed value)"
293+ fi
294+fi
295+
296+# --- HARD INVARIANT 4: the pin-reading GATE census -------------------------
297+# The per-pin invariant is blind to a gate that reads N pins through a root
298+# literal plus a runtime name list, and to a gate that only asserts inside a
299+# helper. scripts/pin-gate-audit.py resolves the root literal, enumerates the
300+# runtime names, checks each against a tracked committed copy, and classifies
301+# assertions through the helper CALL GRAPH. Counts are printed, not summarised.
302+if ! command -v python3 >/dev/null; then
303+ echo "FAIL [invariant 4]: python3 is required for the pin-gate audit and is absent" >&2
304+ fail=1
305+else
306+ selftest_out=$(mktemp)
307+ audit=$("$ROOT/scripts/pin-gate-audit.py" 2>&1)
308+ if [ $? -ne 0 ] && [ -z "$audit" ]; then
309+ echo "FAIL [invariant 4]: scripts/pin-gate-audit.py did not run" >&2
310+ fail=1
311+ fi
312+ echo "$audit" | awk -F'\t' '/^COUNT/{print " pin gates: "$2" "$3" "$4" "$5" "$6}' >&2
313+ # The census's own POSITIVE CONTROL. Losing a gate to a doc comment is
314+ # SILENT -- the count drops and nothing goes red -- so a control that only
315+ # proved "the scanner finds a bad literal" would not catch it. This one
316+ # plants the exact shape: a comment reproducing the forbidden literal
317+ # inside a gate that reads crate_pin.
318+ if ! "$ROOT/scripts/pin-gate-audit.py" --self-test >"$selftest_out" 2>&1; then
319+ echo "FAIL [invariant 4]: the census self-test did not pass -- a doc comment" >&2
320+ echo " can reclassify a pin-reading gate into a branch that counts" >&2
321+ echo " nothing, which loses the gate SILENTLY. Fix the scanner first." >&2
322+ sed 's/^/ /' "$selftest_out" >&2
323+ fail=1
324+ else
325+ note " invariant 4: census self-test passed (a comment cannot steal a gate)"
326+ fi
327+ badrows=$(echo "$audit" | awk -F'\t' '/^BADROW/{print " "$2":"$3" "$4" "$5}')
328+ bardir=$(echo "$audit" | awk -F'\t' '/^BARDIR/{print " "$2":"$3" "$4" "$5}')
329+ absent=$(echo "$audit" | awk -F'\t' '/^NAME/ && $4=="absent"{print " "$2":"$3" "$4}')
330+ if [ -n "$badrows" ] || [ -n "$bardir" ]; then
331+ if [ "$SHAPE" != 0 ]; then
332+ echo "FAIL [invariant 4]: pin-reading gates whose pins are not committed" >&2
333+ echo " (a runtime name list over the gitignored root can never be" >&2
334+ echo " satisfied by a committed tree, and a bare directory literal" >&2
335+ echo " feeding one always fails):" >&2
336+ printf '%s\n' "$badrows" "$bardir" >&2
337+ echo " fix: commit each pin under crates/<crate>/fixtures/ and read it" >&2
338+ echo " through that crate's pin helper, not /../../fixtures/." >&2
339+ shape_fail=1
340+ else
341+ echo "SKIP [invariant 4]: pin-reading gates with uncommitted pins (reported," >&2
342+ echo " not failed, because EC_REQUIRE_FIXTURES is unset):" >&2
343+ printf '%s\n' "$badrows" "$bardir" >&2
344+ fi
345+ else
346+ note " invariant 4: every pin-reading gate resolves through committed copies"
347+ fi
348+ # assertless gates are printed, never failed: a #[ignore]d gate that asserts
349+ # nothing is a finding for its owner, not a preflight failure.
350+ echo "$audit" | awk -F'\t' '/^GATE/ && $5=="no"{print " FINDING: "$3" reads a pin and asserts nothing in its body or helpers"}' >&2
351+fi
352+
353+# --- RECOVERED-PIN SELF-VALIDATION -----------------------------------------
354+# A recovered witness is the historical bytes; a re-encode is a DIFFERENT stream.
355+# Hashing what is on disk against the recorded sha256 is the half a shell
356+# preflight can decide. The other half is behavioural and needs the gate:
357+# `pinned_golden7` records non_last_ref_hits 0->2 in its own doc, and the
358+# recovered pin reproduces exactly that; only running the gate proves it.
359+badsum=0
360+while IFS=$'\t' read -r path required_by class prov status tracked sum; do
361+ case $path in
362+ \#* | '') continue ;;
363+ esac
364+ [ "$class" = recovered-original ] || continue
365+ abs=$ROOT/$path
366+ if [ ! -f "$abs" ]; then
367+ echo "FAIL [recovered]: $path is absent" >&2
368+ fail=1
369+ continue
370+ fi
371+ have=$(sha256sum -- "$abs" | cut -d' ' -f1)
372+ if [ "$have" != "$sum" ]; then
373+ echo "FAIL [recovered]: $path hashes $have, the manifest records $sum -- this is" >&2
374+ echo " a DIFFERENT stream (a re-encode), not the recovered original." >&2
375+ fail=1
376+ badsum=$((badsum + 1))
377+ fi
378+done <"$MANIFEST"
379+[ "$badsum" -eq 0 ] && note " recovered pins: every recovered-original hash matches"
380+echo " recovered pins: the behavioural half needs the gate, not this script --" >&2
381+echo " run 'cargo test -p ec-av1 pinned_golden7'; it prints non_last_ref_hits" >&2
382+echo " and its doc records the 0->2 delta only the recovered pin reproduces." >&2
383+
384+# --- VECTORS -------------------------------------------------------------
385+vec_rows=$(awk -F'\t' '!/^#/ && $1 ~ /^fixtures\/vectors\//' "$MANIFEST" | wc -l)
386+vec_missing=$(awk -F'\t' '!/^#/ && $1 ~ /^fixtures\/vectors\// && $5 != "ok"' "$MANIFEST" | wc -l)
387+echo " vectors: $vec_rows referenced rows, $vec_missing not ok" >&2
388+echo " vectors: nothing in crates/ reads a .tar.gz; the fleet hosts carry the" >&2
389+echo " EXTRACTED sets, so the blobs are not required at test time" >&2
390+
391+# --- DRIFT ----------------------------------------------------------------
392+regen=$(mktemp)
393+patch=$(mktemp)
394+trap 'rm -f "$regen" "$patch" ${selftest_out:-} ' EXIT
395+if ! "$ROOT/scripts/gen-fixture-library.sh" "$regen" >/dev/null 2>&1; then
396+ echo "FAIL: scripts/gen-fixture-library.sh did not run" >&2
397+ exit 1
398+fi
399+# The `tracked` column is COMMITTED provenance: it is computed in a git tree.
400+# A runner host has no .git, so a regeneration there cannot recompute it and
401+# would emit 'no-git' for every committed pin -- a drift on all 37 pin rows that
402+# says nothing about the host's library. Off-git the column is normalised on both
403+# sides, and the tracked invariant falls back to the committed value (as its own
404+# message already says).
405+drift_norm() { grep -v '^#' "$1" | awk -F'\t' -v OFS='\t' 'BEGIN{off=1} $1 ~ /^crates\/.*\/fixtures\//{if(off && $6!="-") $6="-"} {print}'; }
406+OFFGIT=0
407+[ -e "$ROOT/.git" ] || OFFGIT=1
408+if ! diff -u <(drift_norm "$MANIFEST") <(drift_norm "$regen") >"$patch" 2>&1; then
409+ if [ "$REQUIRE" != 0 ]; then
410+ echo "FAIL: this tree's library does not match what the code reaches" >&2
411+ echo " (DRIFT: the committed manifest's rows differ from a regeneration" >&2
412+ echo " here). The first difference is the row to act on; '- only here'" >&2
413+ echo " is a path this host reaches and the committed manifest does not," >&2
414+ echo " '+ only committed' is a row this host cannot satisfy. Fetch the" >&2
415+ echo " library, or commit the regenerated manifest. (patch follows)" >&2
416+ sed -n '1,40p' "$patch" >&2
417+ fail=1
418+ else
419+ echo "SKIP: the library does not match what the code reaches (DRIFT;" >&2
420+ echo " EC_REQUIRE_FIXTURES unset, so this is reported, not failed):" >&2
421+ sed -n '1,20p' "$patch" >&2
422+ fi
423+else
424+ note " drift: manifest rows match the code on this host"
425+fi
426+
427+if [ "$fail" -ne 0 ]; then
428+ echo "verify-fixture-library: RED (library verdict: mode i, mode ii or drift)" >&2
429+ exit 1
430+fi
431+if [ "$SHAPE" != 0 ] && [ "$shape_fail" -ne 0 ]; then
432+ echo "verify-fixture-library: RED (code-shape violations, EC_FIXTURE_SHAPE_STRICT=1)" >&2
433+ exit 1
434+fi
435+# The shape tally is always printed, fatal only under EC_FIXTURE_SHAPE_STRICT.
436+for s in $(echo "$audit" | awk -F'\t' '/^BADROW/{c++} END{print c+0}'); do :; done
437+echo " code-shape violations: $(echo "$audit" | awk -F'\t' '/^BADROW/{c++} END{print c+0}')" >&2
438+echo "$forbidden" | grep -q . && shape_violations=$((shape_violations + $(echo "$forbidden" | grep -c .)))
439+echo "verify-fixture-library: GREEN ($rows rows)"