forge
Explore
Log in

Don't you dare go Hollow

docs(av1444edge) r2: the mi(13,32) ref0 fork does NOT survive the H1 fix -- dropped, no separate lane; plus the per-arm commands

Browse files at this commit

ac21620d8ba0f2b4e707001da1f2ae2f8fc173d9Ahmet Kaan GümüşParent: d2d46d5
Re-measured on a clean two-arm pair one commit apart, 4e151813 provably
absent from both by patch-id: semantic ladder diffs (mi, ref0, ref1, mv0)
are 0/51/40 on base and 0/0/0 with f92776ba, and the ladder entry counts
go from 279/226/40 against the oracle's 279/299/361 to 279/299/361.

That confirms the report's own causality argument instead of merely
asserting it: a wrong pixel cannot cause a mode fork, so one
bsize/footprint error had to feed both, and if that is right one fix must
remove both. A surviving fork would have refuted it and pointed at a
second defect.

The one residual ladder difference is a print asymmetry: 2 entries in
frame 2 and 12 in frame 3 where the 'stack' field differs, every one a
compound block whose OUR line omits the field entirely.

Also corrects a guard I had wrong. 'git merge-base --is-ancestor
f92776ba HEAD' returns False on an arm that HAS the fix, because a
cherry-pick mints a new sha -- trusted as a presence check it would have
reported the fixed arm as fix-absent. Patch-id equivalence is the right
guard; is-ancestor stays valid as an EXCLUDE check.
lanes/av1444edge.report.mdmodified+121 -0
@@ -360,3 +360,124 @@ after all subagents land.
360360 - **Main** — `dc35d607` is standalone, measurement-only, and mergeable
361361 now. The matrix row `4:4:4 / superres / 8-bit` should read exact (§6).
362362 Open item: the real 4:4:4 superres cell is exact but ungated.
363+
364+---
365+
366+## 10. Appendix — the mode fork re-verified, and the per-arm commands
367+
368+### 10a. The `mi(13,32)` ref0 fork does NOT survive the H1 fix
369+
370+§3 reported a mode fork at `mi(13,32)` — the oracle reads
371+`ref0 = LAST (1)`, we read `GOLDEN (4)` — landing on the block right
372+after the first wrong pixel, and flagged it as residue worth a lane of
373+its own if it survived. Re-measured on a clean two-arm pair, one commit
374+apart, with `4e151813` provably absent from both:
375+
376+| decode-order frame | oracle entries | arm A (base + rung) | arm B (base + rung + `f92776ba`) |
377+|---|---|---|---|
378+| 1 | 279 | 279 | 279 |
379+| 2 | 299 | **226** | **299** |
380+| 3 | 361 | **40** | **361** |
381+
382+| arm | semantic ladder diffs (mi, ref0, ref1, mv0), frames 1 / 2 / 3 | `mi(13,32)` idx175 |
383+|---|---|---|
384+| A — base + rung | 0 / **51** / **40** | AOM `ref0=1 mv0=(-32,0)` vs OUR `ref0=4 mv0=(-32,0)` — DIFF |
385+| B — base + rung + `f92776ba` | 0 / **0** / **0** | AOM `ref0=1 mv0=(-32,0)` vs OUR `ref0=1 mv0=(-32,0)` — **SAME** |
386+
387+**The fork is gone, and it is the same defect.** Zero semantic ladder
388+diffs in all three frames, and the entry counts now equal the oracle's
389+exactly (arm A lost 73 entries in frame 2 and 321 in frame 3; arm B
390+loses none). This is §3's causality argument confirmed rather than
391+asserted: a wrong pixel cannot cause a mode fork, so one bsize/footprint
392+error had to feed both symptoms — and if that is right, one fix must
393+remove both. It does. A residual fork here would have refuted the
394+argument and pointed at a second defect; there is none. **Dropped, no
395+separate lane.**
396+
397+**The one residual ladder difference is a print asymmetry, not a fork.**
398+Arm B still shows 2 (frame 2) and 12 (frame 3) entries where the
399+`stack` field differs. Every one is a compound block (`ref1` set, e.g.
400+`ref0=1 ref1=4`, `ref0=4 ref1=7`) whose OUR line prints no `stack=`
401+field at all — the compound arm's `EC_MODE_VAL` format omits it. All
402+semantic fields, and on most entries `rng`, match. Same family as
403+`compare-range-not-tell`: a field that is not a cross-decoder invariant
404+must not be compared as one.
405+
406+### 10b. The ancestry guard is wrong for a cherry-picked commit
407+
408+The guard I ran in 10a, `git merge-base --is-ancestor f92776ba HEAD`,
409+returns **False on an arm that has the fix**, because a cherry-pick
410+mints a new sha. Had I trusted it as a presence check it would have
411+reported arm B as "fix absent" — a third check in this session that
412+returns a plausible number instead of the fact, and the second inside
413+this lane alone. The correct guard over cherry-picks is **patch-id
414+equivalence**:
415+
416+```text
417+f92776ba: is-ancestor=False patch-id=bcead47eb734ca4f local equivalent: 38b34494 PRESENT
418+4e151813: is-ancestor=False patch-id=5c19bac8add27bbb local equivalent: None absent
419+dc35d607: is-ancestor=False patch-id=285286bb3506199b local equivalent: e362bfda PRESENT
420+```
421+
422+`is-ancestor` remains a valid EXCLUDE check for a commit that is a true
423+ancestor; it is not a valid INCLUDE check after a cherry-pick. The
424+`rust-oracle-gate-verification` entry was corrected.
425+
426+### 10c. The per-arm commands, verbatim
427+
428+Throw-away worktree, one `CARGO_TARGET_DIR` per arm, arms exactly one
429+commit apart. A reviewer can paste this and get the same numbers.
430+
431+```bash
432+WT=~/.cache/wt/av1444fork
433+cd /home/user/Documents/Code/Rust/edith_codecs
434+git worktree add -f --detach "$WT" 4155c7c7
435+
436+arm () { # arm <label> <tag> <commit>...
437+ tag=$1; shift
438+ git -C "$WT" reset --hard 4155c7c7 # per-arm reset, never `checkout --`
439+ git -C "$WT" clean -fdq
440+ for c in "$@"; do git -C "$WT" cherry-pick -x "$c"; done
441+ git -C "$WT" log --oneline -1
442+ for c in f92776ba 4e151813; do # presence/absence by PATCH-ID
443+ p=$(git -C "$WT" show "$c" | git patch-id --stable | cut -d' ' -f1)
444+ hit=$(git -C "$WT" log --format=%H | while read -r h; do
445+ q=$(git -C "$WT" show "$h" | git patch-id --stable | cut -d' ' -f1)
446+ [ "$q" = "$p" ] && { echo "$h"; break; }; done)
447+ echo "$c present=${hit:-no}"
448+ done
449+ td=~/.cache/cargo-target-$tag
450+ ( cd "$WT" && CARGO_TARGET_DIR="$td" \
451+ cargo build -p ec-av1 --example decode_probe --features gate-counters )
452+ stat -c '%y' "$td/debug/examples/decode_probe" # the 0.0s-build tell
453+ ( cd "$WT" && EC_TRACE_MODE=1 EC_AV1_FINAL_DUMP=/tmp/$tag \
454+ "$td/debug/examples/decode_probe" ~/.cache/av1444edge/sr444.obu 2>/tmp/$tag.our )
455+ for k in 1 2 3 4; do # oracle, per frame
456+ EC_TRACE_MODE=1 ~/.cache/aom-oracle/build/aomdec --codec=av1 --limit=$k -o /dev/null ~/.cache/av1444edge/sr444.obu 2>/tmp/$tag.aom$k
457+ done
458+}
459+
460+arm A_base_plus_rung A dc35d607
461+arm B_base_plus_rung_plus_f92776ba B dc35d607 f92776ba
462+```
463+
464+Compare by splitting OUR's `EC_MODE_VAL` lines on the `EC_PICT idx=`
465+markers (one per decode-order frame, printed before that frame's dump),
466+the ORACLE's on cumulative `aomdec --limit=k` counts, then field by
467+field per entry. Observed:
468+
469+```text
470+arm A entries oracle/ours 1,2,3: 279/279 299/226 361/40
471+arm A SEMANTIC diffs (mi/ref0/ref1/mv0) frame 2 = 51, frame 3 = 40
472+arm B entries oracle/ours 1,2,3: 279/279 299/299 361/361
473+arm B SEMANTIC diffs frame 2 = 0, frame 3 = 0
474+arm B residual stack-field diffs: frame 2 = 2, frame 3 = 12; every one a
475+ compound block whose OUR line omits the field
476+```
477+
478+Pixel cross-check on the same two arms, so the ladder verdict is not
479+taken on trust: arm B is 4/4 decode-order frames byte-exact vs aomdec on
480+both fixtures (§7); arm A is 11521 and 76404 samples off (§1).
481+
482+Cleanup: `git worktree remove --force ~/.cache/wt/av1444fork` and
483+`rm -rf ~/.cache/cargo-target-forkA ~/.cache/cargo-target-forkB`.