forge
Explore
Log in

Don't you dare go Hollow

lanes: av1skipfix report — four gates converted, 444 pin require-env, fixture generator audit

Browse files at this commit

218393635bafc3989c26eea94dc620f7c219f2d6Ahmet Kaan GümüşParent: 60459a5
lanes/av1skipfix.report.mdadded+92 -0
@@ -0,0 +1,92 @@
1+# lane-av1skipfix — convert skip-on-decode-error gates; audit fixture provenance
2+
3+Branch `lane-av1skipfix` off `a21f3680`. Tests only: no file under
4+`crates/ec-av1/src/decode.rs` was touched, and no decoder logic changed anywhere.
5+
6+## Defect 1 — four `..._decodes_pixel_exact` gates turned a decode error into a printed SKIP
7+
8+Pinned as a set in `refusal_inventory.rs` (`GATES_THAT_SKIP_ON_A_DECODE_ERROR`).
9+Each one ran a single recipe and, on `Err`, printed `SKIP <name>: {e}` and returned
10+green. Converted to the attempt-loop shape already used elsewhere in `stream.rs`:
11+sweep several recipes, count a named refusal per attempt (never swallow it), ALWAYS
12+pixel-compare an attempt that decoded, and hard-assert the feature counter on a
13+pixel-compared attempt. Exhausting every attempt is a hard failure, not a skip.
14+
15+| gate | counter | recipes | decoded+fired (green run) |
16+|---|---|---|---|
17+| `a_real_aomenc_filter_intra_stream_decodes_pixel_exact` | `filter_intra_hits` | 2 seeds × 3 cq | 2 |
18+| `a_real_aomenc_intra_stream_with_deblocking_decodes_pixel_exact` | `deblock_hits` | 2 seeds × 4 cq | 2 |
19+| `a_real_aomenc_inter_sequence_with_deblocking_decodes_pixel_exact` | `deblock_hits` | 2 seeds × 4 cq | 2 |
20+| `a_real_libaom_gradients_stream_with_cdef_decodes_pixel_exact` | `cdef_idx_hits` | 8 × (size, cpu-used, crf) | 2 |
21+
22+All four run under `lock_gate_counters()` and report the three-bucket
23+`gate_buckets` summary, so the buckets sum to the attempts made.
24+
25+### Measurements (this box, 2026-09-29, base `a21f3680`)
26+
27+- **filter intra** — seed 42 cq 40 and seed 43 cq 40 read `use_filter_intra` 3× each,
28+ pixel-exact. seed 44 cq 45 and seed 45 cq 30 **decode without it** (delta 0), so the
29+ one fixed recipe was carrying the whole gate.
30+- **intra deblock** — cq 55/45/35/63 all decode pixel-exact with 48/64/64/64 deblock edges.
31+- **inter deblock** — cq 55/45/35/63 all decode 4 frames pixel-exact with
32+ 208/224/160/208 deblock edges.
33+- **CDEF** — the old recipe was a **single 64×64 frame**, which gives libaom's cdef
34+ search exactly one superblock, so it can never write `cdef_bits > 0` and the gate
35+ never read a `cdef_idx` at ANY crf / cpu-used (0, 2, 4, 8 × crf 10–60, sizes
36+ 64×64…256×128: delta 0 everywhere). `EC_AV1_CDEF_DBG` shows `apply_cdef` *does* filter
37+ there (nonzero `t`, `pri=11`/`pri=2`), but the gate's own firing proof is
38+ `cdef_idx_hits`, so its premise was unfalsifiable on the recipe it shipped. The
39+ recipe list is now multi-SB and multi-frame: 128×64/128×128 at 24 frames read
40+ 2–8 `cdef_idx` and are pixel-exact against ffmpeg.
41+
42+No recipe in any of the four families failed to decode for a capability reason, so
43+**no entry had to be kept**; the inventory list is now empty and stays an exact pin.
44+
45+### Red-before (each mutation reverted after the run)
46+
47+| mutation | result |
48+|---|---|
49+| `--enable-filter-intra=0` in the filter-intra recipe | `none of 6 attempts decoded a stream that read use_filter_intra` — FAILED |
50+| `--loopfilter-control=0` in the intra-deblock recipe | `buckets counted-exact=0 uncounted-exact=8`; `none of 8 attempts … with a deblocking edge` — FAILED |
51+| `--loopfilter-control=0` in the inter-deblock recipe | same, FAILED |
52+| 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 |
53+| one `SKIP <name>: {e}` arm re-added to a converted gate | `gates_that_swallow_a_decode_error_are_declared` FAILED, naming that gate |
54+
55+Note the mutation runs report `uncounted-exact=8`: the eight attempts still ran real
56+pixel compares, so the compare is load-bearing and the counter assert is what bites.
57+
58+## Defect 2 — `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` reported green on a missing pin
59+
60+Its pinned fixture `fixtures/ll444-lossless-key.obu` does not exist: not in git, not
61+in the root `fixtures/` directory on this box, and no script under `scripts/` produces
62+it. The `Err` arm was a bare SKIP, so the test finished in 0.05 s (its siblings take
63+seconds — it had decoded nothing) and the suite reported green.
64+
65+The root `fixtures/` directory is listed in `.gitignore:2`, so a pin that lands there
66+can never be committed and a fresh clone can never have it; every `~/.cache/wt/*`
67+worktree lacks it for the same reason. Committing a fixture is therefore not available
68+as a fix, and the gate is not deleted. The arm keeps its skip but `EC_AV1_REQUIRE_AOMENC=1`
69+now turns it into a hard failure naming the missing path, the exact regeneration recipe
70+and the `EC_AV1_PIN_DIR` override; the skip line itself says the gate decoded nothing
71+and proves nothing. Smallest possible hunk: the arm only, no gate body below it.
72+
73+## Fixture-generator audit (this lane's manifest)
74+
75+| referenced path | on disk | generator |
76+|---|---|---|
77+| `fixtures/video/*.mp4/.mkv` | present | `scripts/gen-fixtures.sh` (deterministic ffmpeg) — OK |
78+| `crates/ec-av1/fixtures/*.obu` (48, committed) | present | **NONE** — provenance lives only in gate doc comments / lane reports |
79+| root `fixtures/*.obu` pins: `golden6-mismatch`, `golden7-forwarding-mismatch`, `lr-sgr-r7`, `golden4-pin` | present | **NONE**, and gitignored so not committable |
80+| 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) |
81+
82+So of the ~55 distinct AV1 fixtures these tests name, **every `.obu`/`.av1` pin has no
83+generator script**; only the container fixtures do. The pin directory is also split
84+across two homes (`crates/ec-av1/fixtures/`, committed, 48 files) and the root
85+`fixtures/`, gitignored — and `pin_dir()` resolves to the gitignored one, so any pin
86+written there is un-reproducible on a fresh clone by construction.
87+
88+## Commits
89+
90+- `cd81750b` — stream: convert the four skip-on-decode-error gates to attempt loops
91+- `0b92c6da` — refusal_inventory: empty GATES_THAT_SKIP_ON_A_DECODE_ERROR
92+- `3c302798` — stream: a_real_aomenc_lossless_444_key_frame stops reporting green on a missing pin