diff --git a/lanes/av1pins.report.md b/lanes/av1pins.report.md new file mode 100644 index 00000000..453ec1d4 --- /dev/null +++ b/lanes/av1pins.report.md @@ -0,0 +1,204 @@ +# lane-av1pins — recover three lost pins, correct a stale blocker comment, measure the mandelbrot claim + +Branch `lane-av1pins`, worktree `~/.cache/wt/av1pins`, base `a21f3680` (the merged +seven-lane main). Comment, fixture and test changes only — **no decoder logic**. +Commits: `78c805bd` (pins + gate rewiring + comment correction), plus this report. + +The headline is that the third of those reversed my own prior conclusion: the +mandelbrot blocker is measurably **cleared**, and the comment that recorded it as +the live blocker was the stale artefact, not the `#[ignore]` string. + +--- + +## 0. The root cause, which is structural and not per-pin + +`.gitignore:2` is a bare `fixtures`, which git matches at **any depth** — so it +covers `crates/ec-av1/fixtures/` too, not just the root. The 48 pins already +tracked there were force-added. Any *new* pin therefore has to be `git add -f`'d +or it is silently uncommittable, and any pin written to the root `fixtures/` is +uncommittable by construction. + +`pin_dir()` resolves to the root (`../../fixtures`, gitignored), which is where +all three dead pins were written. `lanes/av1skipfix.report.md` had already +recorded this and had listed exactly these three as "missing on this box". So the +diagnosis predates this lane; what was missing was the recovery. + +The fix is `crate_pin(name)` (`crates/ec-av1/src/stream.rs:8670`): prefer the +committed `crates/ec-av1/fixtures/`, fall back to `pin_dir()` so a locally +re-captured stream still overrides. The committed copy is what runs by default. + +--- + +## 1. Recovered pins + +| path | sha256 | size | +|---|---|---| +| `crates/ec-av1/fixtures/golden3-pin.obu` | `11c9d5331cffa6614c8265ad5fa685d5ce9155db8439949b48ec4a652ace95cf` | 159 B | +| `crates/ec-av1/fixtures/sbpart-pin.obu` | `62238fc077f45d89745d4d254b9c0465464003529da3b42d0a65631fbb7e16e9` | 238 B | +| `crates/ec-av1/fixtures/ll444-lossless-key.obu` | `f496ef0a1171c2bc66d411cc60db05db547dcdb49cd834d4e0543de9db441374` | 7845 B | + +All three from `aomenc` (`~/.cache/aom-oracle/build/aomenc`), all `--threads=1 --row-mt=0`. + +### golden3-pin.obu — FRESH capture, with a numeric tie to its source gate + +Source: `gradients_source(42, 64, 64, "duration=0.16:rate=25")` (c0..c3 from the +crate's `hash_color`, `seed=42` passed through) via ffmpeg `-pix_fmt yuv420p -f +yuv4mpegpipe`; then aomenc: + + --codec=av1 --passes=1 --end-usage=q --cq-level=55 --cpu-used=0 + --lag-in-frames=0 --auto-alt-ref=0 --kf-max-dist=1000 --threads=1 --row-mt=0 + --enable-order-hint=0 --enable-warped-motion=0 --enable-obmc=0 + --enable-masked-comp=0 --enable-interintra-comp=0 --enable-dist-wtd-comp=0 + --enable-diff-wtd-comp=0 --enable-onesided-comp=0 --enable-interintra-wedge=0 + --enable-smooth-interintra=0 --enable-rect-partitions=0 --enable-ab-partitions=0 + --enable-1to4-partitions=0 --enable-filter-intra=0 --enable-smooth-intra=0 + --enable-paeth-intra=0 --enable-directional-intra=0 --enable-angle-delta=0 + --enable-tx-size-search=0 --enable-cdef=0 --enable-restoration=0 + --max-partition-size=32 --enable-palette=0 --enable-intrabc=0 + --enable-cfl-intra=0 --enable-ref-frame-mvs=0 --obu + +The tie to the source gate is a number, not a claim. The live +`a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact` prints +`cdfflake attempt seed=42: ... stream_hash=89c4089148d51c04 ...`. This re-encode's +FNV-1a-64 is **`89c4089148d51c04`** — identical, same 159 bytes. + +**Fresh capture, not a replay; the original is unrecoverable.** The original was +taken at `bec27414` (2026-08-28); `gradients_source` only became byte-reproducible +at `5ae053d3` (2026-08-30). `git merge-base --is-ancestor bec27414 5ae053d3` is +true, so at capture time the source left `c4..c7` to ffmpeg's `random` default — +those bytes cannot be regenerated by any re-encode. What is recovered is a +same-family stream the gate decodes and compares exact. The gate's doc comment +says so, so nobody later reads it as a replay. + +### sbpart-pin.obu — FRESH capture from the source gate's recipe + +`smptebars=size=192x128:rate=25`, `-t 0.04 -pix_fmt yuv420p -f yuv4mpegpipe`, then + + aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=55 --cpu-used=4 + --threads=1 --row-mt=0 --sb-size=64 --enable-palette=1 + --min-partition-size=16 --max-partition-size=64 --obu + +The source gate's size list is `[(64,128),(128,64),(128,128),(128,192),(192,192)]` +— it has **no 192x128 cell**, while `pinned_sbpart_stream_decodes_pixel_exact` +compares at 192x128. So this is a 192x128 re-run of that recipe, not a cell of it; +recorded in the gate's doc comment. cq 55 chosen from a 7-cq sweep (15, 25, 63 +also pass). + +### ll444-lossless-key.obu — replay of the recipe the gate's own SKIP line records + +`testsrc2=s=128x96:r=25`, `-frames:v 6 -pix_fmt yuv444p -f yuv4mpegpipe`, then + + aomenc --codec=av1 --profile=1 --lossless=1 --enable-palette=0 + --enable-intrabc=0 --bit-depth=8 --input-bit-depth=8 --passes=1 + --end-usage=q --cq-level=20 --cpu-used=0 --threads=1 --row-mt=0 + --lag-in-frames=0 --kf-max-dist=100 --limit=1 --obu + +The recorded remedy was "6 frames ... cut to the key frame's OBUs". `--limit=1` +gives the same result without OBU surgery: aomenc emits the key frame and stops, +and the gate asserts `ours.len() == 1` anyway. `testsrc2` is deterministic, so +this one is a genuine replay. + +--- + +## 2. Before / after, per gate + +All runs `--release`, `--test-threads=1`, oracle present. + +| gate | before | after | +|---|---|---| +| `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` | +| `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 | +| `a_real_aomenc_lossless_444_key_frame_decodes_sample_exact` | `SKIP ... no pinned bytes`, **0.05s**, `rc=0` | `1 passed`, **0.11s** | + +**Real work, not a stop-skipping — three independent proofs.** + +1. *Self-evidencing output.* sbpart's `EC_SBPART_DIAG` walks all `192*128 = + 24576` luma samples and reports per-superblock-column mismatch counts. + golden3 prints its frame count and the path it read. A skip prints none of it. +2. *Non-vacuity assertions that had to hold.* ll444 passes `assert!(lossless)` on + the parsed frame header **and** `assert!(rect_split_lossless_chroma444_hits() > + before)` — the 4:4:4 chroma rect-split walk provably ran, or the gate would be + red. That is what makes it a verdict rather than a decode. +3. *Mutation.* One byte flipped mid-pin turns all three RED: golden3 + `stream.rs:5106` (`left: 12288, right: 24576`), sbpart `stream.rs:5099`, ll444 + `stream.rs:6537`. **Stated precisely:** these die in the *ffmpeg decode* step, + not the pixel compare — a bit-flipped arithmetic-coded stream does not decode. + So the mutation proves the bytes are READ and PROCESSED (a skip returns `ok` at + 0.00s and never reaches any of it); it does **not** prove the pixel compare is + what catches a bit flip. Proof 1 covers the compare. + +**One assertion added per gate on the way.** Each of the three compared +`frames.iter().zip(&ffmpeg_frames)` with no length check — the exact `cmpaudit` +class, where a short side truncates the walk silently. Each now asserts +`frames.len() == ffmpeg_frames.len()` first, naming the mis-pairing in the message. + +The `#[ignore]` reasons changed from "reads a pinned fixture path outside the +repo; run manually" to "bisect aid, not a suite gate; run it with `--ignored`" — +still ignored, but the old text claimed a property (outside the repo) that is no +longer true. + +--- + +## 3. The stale comment, and the measurement that reversed my own call + +Last turn I reported to Main that the two 1:4 gates' `#[ignore]` strings were wrong +and the 22-line comment above them was right. **That was backwards**, and the +re-run says so. + +The r2 comment recorded, as these gates' blocker, an unowned mandelbrot +inter-frame defect: "decode-order frame 3/4 luma ~3.7-4.5k samples, max |d| 6..17, +then frames 5-7 drift to ~24k samples, max |d| ~220", plus "seeds 46 and 54 fire +ZERO 1:4 strips ... and mismatch ffmpeg the same way as the firing seed 52". + +**Measured on `a21f3680`, release, the r2 recipe set re-run in full** — 40 attempts +per bit depth, from the gate's own parameters (mandelbrot 192x128, `start_scale = +5.0 - attempt*0.06`, `end_pts=8`, `hue=s=0`, `-t 0.32`, +`--enable-rect-partitions=1 --enable-1to4-partitions=1 --min-partition-size=32 +--max-partition-size=64 --enable-tx-size-search=0 --enable-filter-intra=1 +--enable-intra-edge-filter=1 --kf-min-dist=1000 --kf-max-dist=1000` plus the +standard disable set, `--cpu-used = 1 + attempt%4`, `--cq-level = +[63,55,45,35][(attempt/4)%4]`): + +| | 8-bit | 10-bit | +|---|---|---| +| attempts decoded + pixel-compared | **40** | **40** | +| gate's own tally | `counted-exact=0 uncounted-exact=40 named-refusals=0` | identical | +| `first diff at` / `samples differ` / `max \|d\|` lines in the full log | **0** | **0** | +| 1:4 strips in inter frames | `64x16=0 16x64=0 32x8=0 8x32=0` | identical | + +Both the frame range and the byte counts r2 named are simply absent: no frame 3/4 +counts, no `max |d|`, no drift. **The mandelbrot inter-frame defect is cleared on +this tree** — 80 streams compared, 80 exact. A positive measurement, not the +absence-of-evidence I flagged last turn. + +And the recipe moved the other way: **zero** 1:4 strips fire now across all 42 +counted attempts per arm, where r2 had one attempt firing `64x16=4 16x64=3`. The +gates went from "fires sometimes, compare fails" to "never fires", and now trip +their own non-vacuity precondition at `stream.rs:40653` rather than any pixel. + +**Therefore:** the `#[ignore]` strings are correct for this tree and the comment +was the stale artefact. Both gates stay ignored — a source that is baseline-exact +*and* fires a 32-level intra 1:4 strip in an inter frame still does not exist — +and the comment now records the cleared blocker and the zero-strip recipe +regression, dated, with the reason for the correction. + +What I did **not** claim: I did not identify which commit cleared the mandelbrot +defect. The 7-lane wave is the obvious suspect and the measurement is consistent +with it, but "the wave fixed it" is a correlation across a merge, not an +attribution. Closing that needs an ablation, which is a bisect, not a comment fix. + +--- + +## 4. State + +Two commits on `lane-av1pins`, base `a21f3680`. `cargo check -p ec-av1 +--all-targets` clean, no warnings. Not pushed, not merged; main untouched. + +Verified here: the three gates pass from the committed pins with real-work output +and mutation proof; the mandelbrot sweep measures 80/80 exact at both bit depths. +Not verified: a full `cargo test -p ec-av1` run (out of scope for a +fixture/comment lane; project-wide validation is Main's), and the 35 +probes/benchmarks excluded from the earlier release triage. + +Procedure saved as managed skills `stale-ignore-reason-vs-stale-comment` and +`fixture-absent-silent-skip-class`.