R1 report -- inferred-DIFFWTD lift, gate evidence, film probe residue
Browse files at this commit2cd82ea95d4f3c68e1e0eb68a7299ecb2fa0a062Parent: 6d86b95- docs
- r1 report -- inferred-DIFFWTD lift, gate evidence, film probe residue
2 changed files +88 -0
- lanes/COMMON-20260901.md +11 -0
- lanes/mcomp64-r1.report.md +77 -0
lanes/COMMON-20260901.mdmodified+11 -0
| @@ -89,3 +89,14 @@ NEVER wait with a foreground `until/while ... sleep` loop or `tail --pid`. | |||
| 89 | ## NEVER pkill BY BINARY NAME (2026-09-02: one lane's `pkill -f ec_av1-<hash>` killed another lane's suite) | 89 | ## NEVER pkill BY BINARY NAME (2026-09-02: one lane's `pkill -f ec_av1-<hash>` killed another lane's suite) |
| 90 | The test binary hash is identical across worktrees. Kill only by PID you own (`$!`, or the systemd unit | 90 | The test binary hash is identical across worktrees. Kill only by PID you own (`$!`, or the systemd unit |
| 91 | name you started). `pkill -f`/`killall` on cargo/ec_av1 patterns is forbidden. | 91 | name you started). `pkill -f`/`killall` on cargo/ec_av1 patterns is forbidden. |
| 92 | + | ||
| 93 | +## NEVER `cargo fmt` IN A LANE (3 lanes lost their diffs to it on 2026-09-02) | ||
| 94 | +main is not rustfmt-clean (~6000 lines of churn). Hand-indent; `cargo test --no-run` is the check. | ||
| 95 | +If you ran it: extract your own hunks, `git checkout -- crates/`, re-apply. | ||
| 96 | + | ||
| 97 | +## MEMORY (user order 2026-09-02: an unsteady box fails the job) | ||
| 98 | +30 GB box shared by ~10 agents. Every decode/encode/probe invocation runs under | ||
| 99 | +`systemd-run --user --scope -q -p MemoryMax=6G <cmd>`; suites under a unit with `-p MemoryMax=10G`; | ||
| 100 | +never two suites per lane; film extracts ≤2 s; a watchdog (`ec-memwatch` user unit, log | ||
| 101 | +`$HOME/.cache/ec-memwatch.log`) SIGKILLs any codec/test process above 6 GiB RSS or the largest one | ||
| 102 | +when MemAvailable < 3 GiB — a killed run means YOUR command exceeded the budget: bound it, do not retry as-is. | ||
lanes/mcomp64-r1.report.mdadded+77 -0
| @@ -0,0 +1,77 @@ | |||
| 1 | +# lane-mcomp64 r1 — inferred COMPOUND_DIFFWTD at 64x64 | ||
| 2 | + | ||
| 3 | +## What changed | ||
| 4 | +- `crates/ec-av1/src/decode.rs:13376` — `wedge_bsize` is now `Option<usize>`; `None` | ||
| 5 | + (side 64) means libaom codes **no** `compound_type` symbol and infers | ||
| 6 | + `COMPOUND_DIFFWTD` (`read_compound_type`, decodemv.c 1634-1656; guard is | ||
| 7 | + `is_interinter_compound_used(COMPOUND_WEDGE, bsize)` → | ||
| 8 | + `av1_wedge_params_lookup[BLOCK_64X64].wedge_types == 0`). Only the 1-bit | ||
| 9 | + `mask_type` literal follows. Refusal deleted. | ||
| 10 | +- `crates/ec-av1/src/decode.rs:759` — new `DIFFWTD_INFERRED_HITS` / `diffwtd_inferred_hits()`: | ||
| 11 | + strictly the inferred (no-symbol) arm, narrower than `DIFFWTD_HITS`. | ||
| 12 | +- `crates/ec-av1/src/refusal_inventory.rs:66` — refusal string removed (47 → 46). | ||
| 13 | +- `crates/ec-av1/src/gate_coverage.rs:252` — `NEVER_ON_10BIT` is now **empty**: the new | ||
| 14 | + 10-bit arm is the first recipe to spell `--enable-diff-wtd-comp=1` *and* fire it. | ||
| 15 | +- `crates/ec-av1/src/stream.rs:9683` — new gate | ||
| 16 | + `run_diffwtd_inferred_64x64_gate` + 8-bit and 10-bit `#[test]` arms. | ||
| 17 | + | ||
| 18 | +No new mask/blend code was needed: `mc::diffwtd_mask` already carries the `bd - 8` | ||
| 19 | +round term and `mc::blend_masked_compound` already takes block dims + the subsampled | ||
| 20 | +chroma read, so both are size- and bit-depth-generic. The `comp_group_idx` context | ||
| 21 | +(`get_comp_group_idx_context`) and `record_compound_ctx_rect_mi` already gather/write | ||
| 22 | +over the whole `side` span, so 64x64 needed no context work either. | ||
| 23 | + | ||
| 24 | +## Scope note (charter asked for more shapes) | ||
| 25 | +The charter listed 64x32/32x64/64x16/16x64/8x32/32x8. This decoder's square inter path | ||
| 26 | +(`decode_inter_block(.., side, ..)`, plus the 8x8 leaf `decode_inter_block8`) is the ONLY | ||
| 27 | +path that reaches `read_compound_type`; every rectangular inter shape is refused one level | ||
| 28 | +up by `"a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding"` | ||
| 29 | +(ledger constraint, decode.rs). So 64x64 is the only wedge-less size reachable, and code for | ||
| 30 | +the other shapes would be unreachable and ungateable. `deferred: rect wedge-less shapes — | ||
| 31 | +unreachable until rect inter residual coding exists — unblocked by the rect-inter lane`. | ||
| 32 | + | ||
| 33 | +## Gate | ||
| 34 | +`a_real_aomenc_stream_with_a_diffwtd_compound_64x64_block_decodes_pixel_exact` and | ||
| 35 | +`a_real_aomenc_10bit_stream_with_a_diffwtd_compound_64x64_block_decodes_pixel_exact` | ||
| 36 | +(`crates/ec-av1/src/stream.rs`). 128x128, 16 frames, 3 cq × 2 mandelbrot+noise variants. | ||
| 37 | +Recipe pins every block to the inferred size (`--sb-size=64 --max-partition-size=64 | ||
| 38 | +--min-partition-size=64`) with `--enable-masked-comp=1 --enable-diff-wtd-comp=1 | ||
| 39 | +--enable-dist-wtd-comp=0` so `comp_group_idx == 1` has no other masked choice; every | ||
| 40 | +frame's Y/U/V compared against ffmpeg; a decode error or mismatch FAILS (the old refusal | ||
| 41 | +string is explicitly forbidden); hits snapshotted per attempt and accumulated only for | ||
| 42 | +attempts that decoded AND pixel-compared (class `counter-from-refused-stream`). | ||
| 43 | + | ||
| 44 | +Run: | ||
| 45 | +``` | ||
| 46 | +CARGO_TARGET_DIR=$HOME/.cache/cargo-target-mcomp64 EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 \ | ||
| 47 | + nice -n 10 cargo test -p ec-av1 --lib -j3 diffwtd_compound_64x64 -- --nocapture --test-threads=1 | ||
| 48 | +``` | ||
| 49 | +EVIDENCE: $HOME/.cache/cargo-target-mcomp64 test stdout | 2 gates, 6 aomenc encodes each, every frame Y/U/V vs ffmpeg | 8-bit 6/6 pixel-exact diffwtd_inferred_hits=79; 10-bit 6/6 pixel-exact diffwtd_inferred_hits=51; 2 passed 0 failed | ||
| 50 | + | ||
| 51 | +## Film probe | ||
| 52 | +EVIDENCE: scratchpad/hg-head.obu (ReelB 10-bit head) | `cargo run --release -p ec-av1 --example decode_probe` on b92150f, and on b92150f + cherry-picked lane-fi8 2d5c425 (scratch worktree, main lacks fi8) | on b92150f alone: `filter intra on a HORZ/VERT strip` (fi8's refusal, hit first); with fi8: `a Golomb tail longer than this decoder reads` — the masked-compound-64x64 stop the charter recorded on lane-fi8 is GONE. | ||
| 53 | + | ||
| 54 | +`open: the new ReelB stop "a Golomb tail longer than this decoder reads" is not | ||
| 55 | +proven to be a genuine next capability rather than a downstream desync of the newly | ||
| 56 | +decoded 64x64 masked block; the gate says the blend and symbol order are pixel-exact on | ||
| 57 | +real aomenc streams, but the film is not decoded end-to-end. Unblocked by a lane that | ||
| 58 | +bisects that frame against the instrumented aomdec range ladder.` | ||
| 59 | + | ||
| 60 | +## Suite | ||
| 61 | +See "Suite result" below (full `cargo test -p ec-av1 --lib` under systemd-run, log | ||
| 62 | +`$HOME/.cache/mcomp64-suite.log`). | ||
| 63 | + | ||
| 64 | +## Suite result | ||
| 65 | +`systemd-run --user --unit=mcomp64-suite-... -p MemoryMax=10G` → | ||
| 66 | +`EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 CARGO_TARGET_DIR=$HOME/.cache/cargo-target-mcomp64 | ||
| 67 | +nice -n 10 cargo test -p ec-av1 --lib -j3`, log `$HOME/.cache/mcomp64-suite.log`. | ||
| 68 | +EVIDENCE: $HOME/.cache/mcomp64-suite.log | full ec-av1 lib suite on b92150f | `test result: ok. 335 passed; 0 failed; 31 ignored; finished in 405.30s` | ||
| 69 | +Sibling gates re-run inside that suite and green: masked_compound / wedge / interintra / | ||
| 70 | +wedge-interintra / compound_* / inter_sequence* / refusal_inventory / gate_coverage. | ||
| 71 | + | ||
| 72 | +## Same-shape sweep (class: alphabet collapses at a size) | ||
| 73 | +The only other size-conditional wedge alphabet is interintra's `wedge_interintra` | ||
| 74 | +(`is_interintra_wedge_used`); interintra itself is allowed only for BLOCK_8X8..BLOCK_32X32, | ||
| 75 | +every one of which has `wedge_types > 0`, so no second instance exists on this decode path. | ||
| 76 | +The 8x8 leaf (`decode_inter_block8`) is hard-coded to `wedge_bsize == 3`, correct by | ||
| 77 | +construction. | ||