forge
Explore
Log in

Don't you dare go Hollow

Lane-palette r4 charter -- no SKIP on a known-wrong result

Browse files at this commit

97e8e948f863e39c6e81732686685960c27958d2Ahmet Kaan GümüşParent: 7e82cbf
  • docs
    • lane-palette r4 charter -- no SKIP on a known-wrong result
    • ladder the desync
Show full message
docs(av1): lane-palette r4 charter -- no SKIP on a known-wrong result; ladder the desync
lanes/palette-r4.charter.mdadded+68 -0
@@ -0,0 +1,68 @@
1+# lane-palette r4 — locate the desync; the gate must FAIL, not SKIP
2+
3+At e7e16ab. Read `lanes/palette-r3.report.md`.
4+
5+## State
6+r2's two milestones are verified green (234/0). r3 wrote a real-aomenc palette-Y
7+gate: `palette_hits` is hard-asserted and fires, so the reconstruction path is
8+non-vacuous — but the reconstructed pixels MISMATCH ffmpeg's decode of the same
9+bytes. r3 checked `read_palette_colors_y`, `read_uniform`,
10+`palette_color_index_context` and the `PALETTE_Y_COLOR_INDEX` table
11+line-for-line against the oracle source; all match. The desync site is unlocated.
12+
13+## Job 1 — this is the priority, before any debugging
14+The refusal was removed and the pixels are wrong, so a real palette stream now
15+decodes to WRONG PIXELS instead of refusing. That is the one outcome this
16+project does not accept, and the gate currently SKIPs on the mismatch rather
17+than failing, which hides it. Fix the shape first, in its own commit:
18+- Either restore an accurate refusal in front of palette reconstruction ("a
19+ block that actually uses a palette -- the index map decodes but the
20+ reconstructed pixels do not match libaom yet"), keeping all the landed code
21+ behind it, and let the gate assert THAT refusal;
22+- or make the gate FAIL on the mismatch, so the defect is visible in the suite.
23+Pick the first if you cannot close the pixel gap this round. A SKIP on a known
24+wrong result is not an acceptable resting state, and neither is silent
25+wrongness. COMMIT this before anything else.
26+
27+Note that removing `enable-palette` from `gate_coverage.rs`'s `NEVER_EXERCISED`
28+was right — a real block does reconstruct from a palette now — and stays right
29+either way.
30+
31+## Job 2 — locate the desync with the ladder, not by re-reading tables
32+r3 already proved the tables and context functions match the oracle
33+line-for-line. Re-reading them again is the [[worker-cap-spent-reading]] trap.
34+Use the instrument instead:
35+- CLASS `compare-range-not-tell`: compare the msac RANGE against the oracle
36+ after each element, never `tell()`.
37+- CLASS `equal-range-means-unread`: if the reference's range is UNCHANGED where
38+ ours moves, we read a symbol it never wrote; if theirs moves and ours does
39+ not, we skipped one. Only when both move by different amounts is a table
40+ implicated — and r3 has already cleared the tables.
41+- Oracle rungs, all env-gated: `EC_TRACE=1` (partitions), `EC_TRACE_COEFF=1`,
42+ `EC_TRACE_MODE=1` (inter + intra mode info), `EC_AV1_PREFILT_DUMP=<prefix>`
43+ (per-frame PRE-filter recon — the right one for separating a prediction bug
44+ from a loop-filter one). If you need a palette-specific rung, add it to
45+ `scripts/instrument-aom-oracle.sh` in the existing shape (env-gated, silent
46+ when unset, idempotent, wrapper-around-impl) and rebuild with
47+ `scripts/build-aom-oracle.sh`. Building the rung is a first-class subtask.
48+- A prediction-only mismatch with a CORRECT symbol stream shows up as identical
49+ ranges and different pixels — check that first: if the range ladder matches
50+ to the end of the block, the index map and colours are right and the bug is
51+ in how the palette is applied (per-TU slicing, the `PALETTE_PRED`
52+ thread-local's lifetime, or chroma/luma plane mixing), not in the reads.
53+
54+## Then
55+Palette UV, the rect-strip `palette_bsize_ctx` refusal (decode.rs ~1940), and
56+intrabc — one commit each, each with its own hard-asserted firing count.
57+
58+Merge note: main is at 53b319b with `gate_coverage.rs` and
59+`refusal_inventory.rs`, which pin the never-exercised tools and every
60+decode-path refusal string. Report every refusal string you add or remove,
61+verbatim.
62+
63+Hard rules: `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-palette`; foreground
64+`nice -n 19 cargo ... -j4`; every `cargo test` a timeout >= 600000 ms. Sibling
65+worktrees (edith_codecs, -realworld, -lr, -superres, -tiles) have live agents —
66+never build in or edit them, and do NOT create additional worktrees. Never push,
67+never merge, never touch `main`. 75-turn cap, does not reset: COMMIT AT EVERY
68+GREEN STEP. End with `lanes/palette-r4.report.md`, VERDICT on line 1.