forge
Explore
Log in

Don't you dare go Hollow

lanes/av1pins: recovered pins, per-gate before/after, and the mandelbrot measurement

Browse files at this commit

3fcf42fc1d4c61f2d7cff46f7b9ce4ef7ce0eca9Ahmet Kaan GümüşParent: 1cd1686
The report's section 3 records a self-correction: the r2 blocker comment on the
two 1:4 gates was the stale artefact, not their `#[ignore]` strings. Re-running
the r2 recipe set in release on a21f3680 measures 40/40 streams pixel-exact at
both bit depths with zero divergence lines in either full log, so the mandelbrot
inter-frame defect is cleared; the recipe now fires zero 1:4 strips, which is
what the ignore strings always said.
lanes/av1pins.report.mdadded+204 -0
@@ -0,0 +1,204 @@
1+# lane-av1pins — recover three lost pins, correct a stale blocker comment, measure the mandelbrot claim
2+
3+Branch `lane-av1pins`, worktree `~/.cache/wt/av1pins`, base `a21f3680` (the merged
4+seven-lane main). Comment, fixture and test changes only — **no decoder logic**.
5+Commits: `78c805bd` (pins + gate rewiring + comment correction), plus this report.
6+
7+The headline is that the third of those reversed my own prior conclusion: the
8+mandelbrot blocker is measurably **cleared**, and the comment that recorded it as
9+the live blocker was the stale artefact, not the `#[ignore]` string.
10+
11+---
12+
13+## 0. The root cause, which is structural and not per-pin
14+
15+`.gitignore:2` is a bare `fixtures`, which git matches at **any depth** — so it
16+covers `crates/ec-av1/fixtures/` too, not just the root. The 48 pins already
17+tracked there were force-added. Any *new* pin therefore has to be `git add -f`'d
18+or it is silently uncommittable, and any pin written to the root `fixtures/` is
19+uncommittable by construction.
20+
21+`pin_dir()` resolves to the root (`../../fixtures`, gitignored), which is where
22+all three dead pins were written. `lanes/av1skipfix.report.md` had already
23+recorded this and had listed exactly these three as "missing on this box". So the
24+diagnosis predates this lane; what was missing was the recovery.
25+
26+The fix is `crate_pin(name)` (`crates/ec-av1/src/stream.rs:8670`): prefer the
27+committed `crates/ec-av1/fixtures/<name>`, fall back to `pin_dir()` so a locally
28+re-captured stream still overrides. The committed copy is what runs by default.
29+
30+---
31+
32+## 1. Recovered pins
33+
34+| path | sha256 | size |
35+|---|---|---|
36+| `crates/ec-av1/fixtures/golden3-pin.obu` | `11c9d5331cffa6614c8265ad5fa685d5ce9155db8439949b48ec4a652ace95cf` | 159 B |
37+| `crates/ec-av1/fixtures/sbpart-pin.obu` | `62238fc077f45d89745d4d254b9c0465464003529da3b42d0a65631fbb7e16e9` | 238 B |
38+| `crates/ec-av1/fixtures/ll444-lossless-key.obu` | `f496ef0a1171c2bc66d411cc60db05db547dcdb49cd834d4e0543de9db441374` | 7845 B |
39+
40+All three from `aomenc` (`~/.cache/aom-oracle/build/aomenc`), all `--threads=1 --row-mt=0`.
41+
42+### golden3-pin.obu — FRESH capture, with a numeric tie to its source gate
43+
44+Source: `gradients_source(42, 64, 64, "duration=0.16:rate=25")` (c0..c3 from the
45+crate's `hash_color`, `seed=42` passed through) via ffmpeg `-pix_fmt yuv420p -f
46+yuv4mpegpipe`; then aomenc:
47+
48+ --codec=av1 --passes=1 --end-usage=q --cq-level=55 --cpu-used=0
49+ --lag-in-frames=0 --auto-alt-ref=0 --kf-max-dist=1000 --threads=1 --row-mt=0
50+ --enable-order-hint=0 --enable-warped-motion=0 --enable-obmc=0
51+ --enable-masked-comp=0 --enable-interintra-comp=0 --enable-dist-wtd-comp=0
52+ --enable-diff-wtd-comp=0 --enable-onesided-comp=0 --enable-interintra-wedge=0
53+ --enable-smooth-interintra=0 --enable-rect-partitions=0 --enable-ab-partitions=0
54+ --enable-1to4-partitions=0 --enable-filter-intra=0 --enable-smooth-intra=0
55+ --enable-paeth-intra=0 --enable-directional-intra=0 --enable-angle-delta=0
56+ --enable-tx-size-search=0 --enable-cdef=0 --enable-restoration=0
57+ --max-partition-size=32 --enable-palette=0 --enable-intrabc=0
58+ --enable-cfl-intra=0 --enable-ref-frame-mvs=0 --obu
59+
60+The tie to the source gate is a number, not a claim. The live
61+`a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact` prints
62+`cdfflake attempt seed=42: ... stream_hash=89c4089148d51c04 ...`. This re-encode's
63+FNV-1a-64 is **`89c4089148d51c04`** — identical, same 159 bytes.
64+
65+**Fresh capture, not a replay; the original is unrecoverable.** The original was
66+taken at `bec27414` (2026-08-28); `gradients_source` only became byte-reproducible
67+at `5ae053d3` (2026-08-30). `git merge-base --is-ancestor bec27414 5ae053d3` is
68+true, so at capture time the source left `c4..c7` to ffmpeg's `random` default —
69+those bytes cannot be regenerated by any re-encode. What is recovered is a
70+same-family stream the gate decodes and compares exact. The gate's doc comment
71+says so, so nobody later reads it as a replay.
72+
73+### sbpart-pin.obu — FRESH capture from the source gate's recipe
74+
75+`smptebars=size=192x128:rate=25`, `-t 0.04 -pix_fmt yuv420p -f yuv4mpegpipe`, then
76+
77+ aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=55 --cpu-used=4
78+ --threads=1 --row-mt=0 --sb-size=64 --enable-palette=1
79+ --min-partition-size=16 --max-partition-size=64 --obu
80+
81+The source gate's size list is `[(64,128),(128,64),(128,128),(128,192),(192,192)]`
82+— it has **no 192x128 cell**, while `pinned_sbpart_stream_decodes_pixel_exact`
83+compares at 192x128. So this is a 192x128 re-run of that recipe, not a cell of it;
84+recorded in the gate's doc comment. cq 55 chosen from a 7-cq sweep (15, 25, 63
85+also pass).
86+
87+### ll444-lossless-key.obu — replay of the recipe the gate's own SKIP line records
88+
89+`testsrc2=s=128x96:r=25`, `-frames:v 6 -pix_fmt yuv444p -f yuv4mpegpipe`, then
90+
91+ aomenc --codec=av1 --profile=1 --lossless=1 --enable-palette=0
92+ --enable-intrabc=0 --bit-depth=8 --input-bit-depth=8 --passes=1
93+ --end-usage=q --cq-level=20 --cpu-used=0 --threads=1 --row-mt=0
94+ --lag-in-frames=0 --kf-max-dist=100 --limit=1 --obu
95+
96+The recorded remedy was "6 frames ... cut to the key frame's OBUs". `--limit=1`
97+gives the same result without OBU surgery: aomenc emits the key frame and stops,
98+and the gate asserts `ours.len() == 1` anyway. `testsrc2` is deterministic, so
99+this one is a genuine replay.
100+
101+---
102+
103+## 2. Before / after, per gate
104+
105+All runs `--release`, `--test-threads=1`, oracle present.
106+
107+| gate | before | after |
108+|---|---|---|
109+| `pinned_golden3_stream_decodes_pixel_exact` | `SKIP ... no pinned bytes`, **0.00s**, `rc=0` | `1 passed`, **0.15s**, prints `4 frame(s) byte-exact vs ffmpeg from .../crates/ec-av1/fixtures/golden3-pin.obu` |
110+| `pinned_sbpart_stream_decodes_pixel_exact` | `SKIP ... no pinned bytes`, **0.00s**, `rc=0` | `1 passed`, **0.15s**; `EC_SBPART_DIAG=1`: `DIAG frame 0: 0 luma mismatches, bbox ... of 192x128` + per-SB-column counts for cols 0..64, 64..128, 128..192 |
111+| `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` | `SKIP ... no pinned bytes`, **0.05s**, `rc=0` | `1 passed`, **0.11s** |
112+
113+**Real work, not a stop-skipping — three independent proofs.**
114+
115+1. *Self-evidencing output.* sbpart's `EC_SBPART_DIAG` walks all `192*128 =
116+ 24576` luma samples and reports per-superblock-column mismatch counts.
117+ golden3 prints its frame count and the path it read. A skip prints none of it.
118+2. *Non-vacuity assertions that had to hold.* ll444 passes `assert!(lossless)` on
119+ the parsed frame header **and** `assert!(rect_split_lossless_chroma444_hits() >
120+ before)` — the 4:4:4 chroma rect-split walk provably ran, or the gate would be
121+ red. That is what makes it a verdict rather than a decode.
122+3. *Mutation.* One byte flipped mid-pin turns all three RED: golden3
123+ `stream.rs:5106` (`left: 12288, right: 24576`), sbpart `stream.rs:5099`, ll444
124+ `stream.rs:6537`. **Stated precisely:** these die in the *ffmpeg decode* step,
125+ not the pixel compare — a bit-flipped arithmetic-coded stream does not decode.
126+ So the mutation proves the bytes are READ and PROCESSED (a skip returns `ok` at
127+ 0.00s and never reaches any of it); it does **not** prove the pixel compare is
128+ what catches a bit flip. Proof 1 covers the compare.
129+
130+**One assertion added per gate on the way.** Each of the three compared
131+`frames.iter().zip(&ffmpeg_frames)` with no length check — the exact `cmpaudit`
132+class, where a short side truncates the walk silently. Each now asserts
133+`frames.len() == ffmpeg_frames.len()` first, naming the mis-pairing in the message.
134+
135+The `#[ignore]` reasons changed from "reads a pinned fixture path outside the
136+repo; run manually" to "bisect aid, not a suite gate; run it with `--ignored`" —
137+still ignored, but the old text claimed a property (outside the repo) that is no
138+longer true.
139+
140+---
141+
142+## 3. The stale comment, and the measurement that reversed my own call
143+
144+Last turn I reported to Main that the two 1:4 gates' `#[ignore]` strings were wrong
145+and the 22-line comment above them was right. **That was backwards**, and the
146+re-run says so.
147+
148+The r2 comment recorded, as these gates' blocker, an unowned mandelbrot
149+inter-frame defect: "decode-order frame 3/4 luma ~3.7-4.5k samples, max |d| 6..17,
150+then frames 5-7 drift to ~24k samples, max |d| ~220", plus "seeds 46 and 54 fire
151+ZERO 1:4 strips ... and mismatch ffmpeg the same way as the firing seed 52".
152+
153+**Measured on `a21f3680`, release, the r2 recipe set re-run in full** — 40 attempts
154+per bit depth, from the gate's own parameters (mandelbrot 192x128, `start_scale =
155+5.0 - attempt*0.06`, `end_pts=8`, `hue=s=0`, `-t 0.32`,
156+`--enable-rect-partitions=1 --enable-1to4-partitions=1 --min-partition-size=32
157+--max-partition-size=64 --enable-tx-size-search=0 --enable-filter-intra=1
158+--enable-intra-edge-filter=1 --kf-min-dist=1000 --kf-max-dist=1000` plus the
159+standard disable set, `--cpu-used = 1 + attempt%4`, `--cq-level =
160+[63,55,45,35][(attempt/4)%4]`):
161+
162+| | 8-bit | 10-bit |
163+|---|---|---|
164+| attempts decoded + pixel-compared | **40** | **40** |
165+| gate's own tally | `counted-exact=0 uncounted-exact=40 named-refusals=0` | identical |
166+| `first diff at` / `samples differ` / `max \|d\|` lines in the full log | **0** | **0** |
167+| 1:4 strips in inter frames | `64x16=0 16x64=0 32x8=0 8x32=0` | identical |
168+
169+Both the frame range and the byte counts r2 named are simply absent: no frame 3/4
170+counts, no `max |d|`, no drift. **The mandelbrot inter-frame defect is cleared on
171+this tree** — 80 streams compared, 80 exact. A positive measurement, not the
172+absence-of-evidence I flagged last turn.
173+
174+And the recipe moved the other way: **zero** 1:4 strips fire now across all 42
175+counted attempts per arm, where r2 had one attempt firing `64x16=4 16x64=3`. The
176+gates went from "fires sometimes, compare fails" to "never fires", and now trip
177+their own non-vacuity precondition at `stream.rs:40653` rather than any pixel.
178+
179+**Therefore:** the `#[ignore]` strings are correct for this tree and the comment
180+was the stale artefact. Both gates stay ignored — a source that is baseline-exact
181+*and* fires a 32-level intra 1:4 strip in an inter frame still does not exist —
182+and the comment now records the cleared blocker and the zero-strip recipe
183+regression, dated, with the reason for the correction.
184+
185+What I did **not** claim: I did not identify which commit cleared the mandelbrot
186+defect. The 7-lane wave is the obvious suspect and the measurement is consistent
187+with it, but "the wave fixed it" is a correlation across a merge, not an
188+attribution. Closing that needs an ablation, which is a bisect, not a comment fix.
189+
190+---
191+
192+## 4. State
193+
194+Two commits on `lane-av1pins`, base `a21f3680`. `cargo check -p ec-av1
195+--all-targets` clean, no warnings. Not pushed, not merged; main untouched.
196+
197+Verified here: the three gates pass from the committed pins with real-work output
198+and mutation proof; the mandelbrot sweep measures 80/80 exact at both bit depths.
199+Not verified: a full `cargo test -p ec-av1` run (out of scope for a
200+fixture/comment lane; project-wide validation is Main's), and the 35
201+probes/benchmarks excluded from the earlier release triage.
202+
203+Procedure saved as managed skills `stale-ignore-reason-vs-stale-comment` and
204+`fixture-absent-silent-skip-class`.