edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-av1skipfix — convert skip-on-decode-error gates; audit fixture provenance
Branch lane-av1skipfix off a21f3680. Tests only: no file under
crates/ec-av1/src/decode.rs was touched, and no decoder logic changed anywhere.
Defect 1 — four ..._decodes_pixel_exact gates turned a decode error into a printed SKIP
Pinned as a set in refusal_inventory.rs (GATES_THAT_SKIP_ON_A_DECODE_ERROR).
Each one ran a single recipe and, on Err, printed SKIP <name>: {e} and returned
green. Converted to the attempt-loop shape already used elsewhere in stream.rs:
sweep several recipes, count a named refusal per attempt (never swallow it), ALWAYS
pixel-compare an attempt that decoded, and hard-assert the feature counter on a
pixel-compared attempt. Exhausting every attempt is a hard failure, not a skip.
| gate | counter | recipes | decoded+fired (green run) |
|---|---|---|---|
a_real_aomenc_filter_intra_stream_decodes_pixel_exact |
filter_intra_hits |
2 seeds × 3 cq | 2 |
a_real_aomenc_intra_stream_with_deblocking_decodes_pixel_exact |
deblock_hits |
2 seeds × 4 cq | 2 |
a_real_aomenc_inter_sequence_with_deblocking_decodes_pixel_exact |
deblock_hits |
2 seeds × 4 cq | 2 |
a_real_libaom_gradients_stream_with_cdef_decodes_pixel_exact |
cdef_idx_hits |
8 × (size, cpu-used, crf) | 2 |
All four run under lock_gate_counters() and report the three-bucket
gate_buckets summary, so the buckets sum to the attempts made.
Measurements (this box, 2026-09-29, base a21f3680)
- filter intra — seed 42 cq 40 and seed 43 cq 40 read
use_filter_intra3× each, pixel-exact. seed 44 cq 45 and seed 45 cq 30 decode without it (delta 0), so the one fixed recipe was carrying the whole gate. - intra deblock — cq 55/45/35/63 all decode pixel-exact with 48/64/64/64 deblock edges.
- inter deblock — cq 55/45/35/63 all decode 4 frames pixel-exact with 208/224/160/208 deblock edges.
- CDEF — the old recipe was a single 64×64 frame, which gives libaom's cdef
search exactly one superblock, so it can never write
cdef_bits > 0and the gate never read acdef_idxat ANY crf / cpu-used (0, 2, 4, 8 × crf 10–60, sizes 64×64…256×128: delta 0 everywhere).EC_AV1_CDEF_DBGshowsapply_cdefdoes filter there (nonzerot,pri=11/pri=2), but the gate's own firing proof iscdef_idx_hits, so its premise was unfalsifiable on the recipe it shipped. The recipe list is now multi-SB and multi-frame: 128×64/128×128 at 24 frames read 2–8cdef_idxand are pixel-exact against ffmpeg.
No recipe in any of the four families failed to decode for a capability reason, so no entry had to be kept; the inventory list is now empty and stays an exact pin.
Red-before (each mutation reverted after the run)
| mutation | result |
|---|---|
--enable-filter-intra=0 in the filter-intra recipe |
none of 6 attempts decoded a stream that read use_filter_intra — FAILED |
--loopfilter-control=0 in the intra-deblock recipe |
buckets counted-exact=0 uncounted-exact=8; none of 8 attempts … with a deblocking edge — FAILED |
--loopfilter-control=0 in the inter-deblock recipe |
same, FAILED |
| original 64×64/1-frame CDEF recipe restored | buckets counted-exact=0 uncounted-exact=8; no attempt of 8 read a cdef_idx literal — FAILED |
one SKIP <name>: {e} arm re-added to a converted gate |
gates_that_swallow_a_decode_error_are_declared FAILED, naming that gate |
Note the mutation runs report uncounted-exact=8: the eight attempts still ran real
pixel compares, so the compare is load-bearing and the counter assert is what bites.
Defect 2 — a_real_aomenc_lossless_444_key_frame_decodes_sample_exact reported green on a missing pin
Its pinned fixture fixtures/ll444-lossless-key.obu does not exist: not in git, not
in the root fixtures/ directory on this box, and no script under scripts/ produces
it. The Err arm was a bare SKIP, so the test finished in 0.05 s (its siblings take
seconds — it had decoded nothing) and the suite reported green.
The root fixtures/ directory is listed in .gitignore:2, so a pin that lands there
can never be committed and a fresh clone can never have it; every ~/.cache/wt/*
worktree lacks it for the same reason. Committing a fixture is therefore not available
as a fix, and the gate is not deleted. The arm keeps its skip but EC_AV1_REQUIRE_AOMENC=1
now turns it into a hard failure naming the missing path, the exact regeneration recipe
and the EC_AV1_PIN_DIR override; the skip line itself says the gate decoded nothing
and proves nothing. Smallest possible hunk: the arm only, no gate body below it.
Fixture-generator audit (this lane's manifest)
| referenced path | on disk | generator |
|---|---|---|
fixtures/video/*.mp4/.mkv |
present | scripts/gen-fixtures.sh (deterministic ffmpeg) — OK |
crates/ec-av1/fixtures/*.obu (48, committed) |
present | NONE — provenance lives only in gate doc comments / lane reports |
root fixtures/*.obu pins: golden6-mismatch, golden7-forwarding-mismatch, lr-sgr-r7, golden4-pin |
present | NONE, and gitignored so not committable |
root fixtures/*.obu pins: ll444-lossless-key, golden3-pin, sbpart-pin |
missing on this box | NONE (golden3-pin and sbpart-pin gates are #[ignore]d — the honest shape) |
So of the ~55 distinct AV1 fixtures these tests name, every .obu/.av1 pin has no
generator script; only the container fixtures do. The pin directory is also split
across two homes (crates/ec-av1/fixtures/, committed, 48 files) and the root
fixtures/, gitignored — and pin_dir() resolves to the gitignored one, so any pin
written there is un-reproducible on a fresh clone by construction.
Defect 3 — the root cause: a worktree has no fixtures/ at all
fixtures/ is .gitignore:2, so git worktree add hands every lane worktree a tree
without it. Not one gate in ec-av1/ec-h264/ec-flac/ec-opus checks that before skipping,
so a worktree run measures nothing while looking clean. Fixed on both halves:
- (b) root cause —
scripts/link-fixtures.shresolves the primary checkout throughgit rev-parse --git-common-dir(works from any linked worktree), symlinks itsfixtures/in, no-ops with a message when the directory already exists, and refuses loudly (exit 2) when the primary has none.--checkis the preflight. Verified in a synthetic repo+worktree: links, is idempotent, and refuses with the generator names. Documented inlanes/COMMON-20260901.mdbeside the batch env line. - (a) the assert —
EC_REQUIRE_FIXTURES=1(default off, set in every batch unit by the parent) turns each missing-fixture skip into a hard failure naming the path, the generator when one exists, andscripts/link-fixtures.shwhen the real cause is the missing root directory.
Per-crate assert sites
| file:line | shape before | shape after | red proof | green proof |
|---|---|---|---|---|
crates/ec-h264/tests/conformance.rs:299 (jvt_cavlc_first_idr_bit_exact) |
!base.is_dir() → SKIP: … missing — run scripts/fetch-vectors.sh |
require_fixtures(&base, "the JVT conformance vectors", "scripts/fetch-vectors.sh") |
EC_REQUIRE_FIXTURES=1, fixtures/ unlinked → panics "the JVT conformance vectors missing at …/vectors/h264-jvt — this gate would prove nothing" |
linked: 1 passed (1.58s) |
crates/ec-h264/tests/conformance.rs:406 (steady_state_decode_loop_zero_alloc) |
!base.is_dir() → SKIP: fixtures missing |
same helper | same env/path | linked: 1 passed (0.73s) |
crates/ec-h264/tests/conformance.rs:490 (ns_per_macroblock_measurement) |
!base.is_dir() → SKIP: fixtures missing |
same helper | same env/path | linked: 1 passed (9.94s) |
crates/ec-h264/tests/conformance.rs:574 (corrupt_streams_never_panic) |
!base.is_dir() → SKIP: fixtures missing |
same helper | same env/path | linked: 1 passed (20.85s) |
crates/ec-h264/tests/conformance.rs:1080 (jvt_full_sequence_bit_exact) |
!base.is_dir() → SKIP: … missing |
same helper | same env/path | linked: 1 passed (5.59s) |
crates/ec-h264/tests/conformance.rs:2323 (h264_seek_matches_linear_open_gop) |
!src.is_file() → SKIP: no fixtures/video/h264-open-gop.mp4 (run scripts/gen-fixtures.sh) |
same helper, generator scripts/gen-fixtures.sh |
EC_REQUIRE_FIXTURES=1 → panics "the open-GOP fixture missing at …/video/h264-open-gop.mp4" |
linked: 1 passed (0.75s) |
crates/ec-flac/tests/xiph_vectors.rs:24 (corpus(), all 4 gates) |
read_dir().ok()? → None → each gate eprintln!("skipped: …") + return |
assert in corpus() itself — the one place that knows the path — so 4 gates, 1 hunk |
EC_REQUIRE_FIXTURES=1 → panics "the FLAC xiph subset corpus is missing at …/subset" |
linked: 4 passed (32.0s) |
crates/ec-opus/tests/conformance.rs:425 (rfc6716_test_vectors) |
!path.exists() → eprintln!("{name}: missing, skipped") + continue (no env at all) |
per-vector assert naming path + scripts/link-fixtures.sh + scripts/fetch-vectors.sh |
EC_REQUIRE_FIXTURES=1 → panics "RFC 6716 test vector testvector01 missing at …/opus_testvectors/testvector01.bit" |
linked: 1 passed (179.2s) |
crates/ec-av1/src/stream.rs:6500 (a_real_aomenc_lossless_444_key_frame_decodes_sample_exact) |
Err → SKIP … -- regenerate with … (gate ran 0.05s, decoded nothing) |
assert naming path + scripts/link-fixtures.sh + regeneration recipe + EC_AV1_PIN_DIR; fires on EC_REQUIRE_FIXTURES or EC_AV1_REQUIRE_AOMENC |
EC_REQUIRE_FIXTURES=1 → panics "the pinned 4:4:4 lossless key frame is missing at …/ll444-lossless-key.obu" |
default: SKIP with the recipe; both envs: FAILED |
Deliberately not converted: the if path.exists() arms in ec-opus at 740/1852
(optional-input blocks inside tests that assert nothing on them) and the
~/Music/… skips at 4985/5378/5607 (personal media, not a fixture manifest — failing
those on every box would be its own lie).
Provenance hand-off
The enumeration above is Agent18-2's input for scripts/fixture-library.tsv; this lane did
not build the manifest. What the assert messages now guarantee is that every gate that
reads a fixture names the path it wanted, the generator when one exists, and
scripts/link-fixtures.sh when the cause is the missing root directory.
Commits
cd81750b— stream: convert the four skip-on-decode-error gates to attempt loops0b92c6da— refusal_inventory: empty GATES_THAT_SKIP_ON_A_DECODE_ERROR3c302798— stream: a_real_aomenc_lossless_444_key_frame stops reporting green on a missing pin62c04b70— scripts: link-fixtures.sh — give a worktree the gitignored root fixtures/423ce6be— stream: the 444 pin arm also honours the repo-wide EC_REQUIRE_FIXTURESae94ee6a— ec-h264: a missing conformance vector FAILS under EC_REQUIRE_FIXTURESd853d31a— ec-flac: a missing xiph corpus FAILS under EC_REQUIRE_FIXTURES3f94c60d— ec-opus: a missing RFC 6716 vector FAILS under EC_REQUIRE_FIXTURES