lanes/av1bookkeep: the lane report for the inventory rows and the seventh 4:2:2 cell
Browse files at this commit2af0609b3612a2f89d7e10ca50edff4de65fd7d1Parent: d6ceb791 changed file +225 -0
- lanes/av1bookkeep.report.md +225 -0
lanes/av1bookkeep.report.mdadded+225 -0
| @@ -0,0 +1,225 @@ | ||
| 1 | +# lane-av1bookkeep — two bookkeeping items in `refusal_inventory.rs` and the 4:2:2 corpus gate | |
| 2 | + | |
| 3 | +**Outcome in one line:** the refusal inventory listed 33 strings and `PROVEN` carried 31 | |
| 4 | +rows — both missing rows are now registered, red-proven by deletion, and a new test holds | |
| 5 | +the two sets one to one; and the seventh measured-diverging 4:2:2 cell is pinned in | |
| 6 | +`the_pinned_422_corpus_cells_decode_pixel_exact`, re-measured byte-exact **on this tree** | |
| 7 | +(0/0/0), with the corpus re-measured 51/51 on the same tree. | |
| 8 | + | |
| 9 | +Branch `lane/av1bookkeep`, base `b8385c93`, two commits, no push, no merge. | |
| 10 | +Worktree `/home/user/.cache/wt/av1bookkeep`, `CARGO_TARGET_DIR=/home/user/.cache/tgt/av1bookkeep`. | |
| 11 | + | |
| 12 | +--- | |
| 13 | + | |
| 14 | +## 1. W1-4 — the inventory listed 33 strings and PROVEN carried 31 rows | |
| 15 | + | |
| 16 | +### 1.1 The gap, measured before any edit | |
| 17 | + | |
| 18 | +A textual pass over the two tables at `b8385c93` (`REFUSALS` 32 entries + | |
| 19 | +`CAPABILITY_CLAIMS` 1 = **33 listed**; `PROVEN` = **31 rows**) gives exactly two listed | |
| 20 | +strings with no row: | |
| 21 | + | |
| 22 | +| listed string | why it had no row | | |
| 23 | +|---|---| | |
| 24 | +| `a block size 4x8, 8x16 or 16x4 (or 8x4 at 4:4:0) has no chroma plane block at this frame's subsampling mode (libaom: …decodeframe.c:1456…)` | the BLOCK_INVALID subsize guard `refuse_invalid_plane_block` (`decode.rs`), added by lane-av1unwritten / lane-av1subsizesweep | | |
| 25 | +| `filter intra on a superblock-level HORZ/VERT strip (never expected -- av1_filter_intra_allowed_bsize caps at 32x32)` | the single `CAPABILITY_CLAIMS` entry, lane-hdrlossless | | |
| 26 | + | |
| 27 | +No row pointed at a string that is not listed (checked both directions), and the module | |
| 28 | +printed both numbers seventeen lines apart: | |
| 29 | + | |
| 30 | +``` | |
| 31 | +refusal inventory: 32 refusals + 1 capability claims, 31 proven | |
| 32 | +``` | |
| 33 | + | |
| 34 | +`every_proven_refusal_names_a_test_that_exists` walks **row → live refusal**, so a string | |
| 35 | +added to `REFUSALS` with no proving gate is invisible to it. Nothing walked the other | |
| 36 | +direction. That is why two rows could sit missing while the suite stayed green. | |
| 37 | + | |
| 38 | +### 1.2 The two rows | |
| 39 | + | |
| 40 | +**(a) BLOCK_INVALID subsize refusal → `a_422_header_over_a_420_tile_refuses_the_subsize_libaom_calls_corrupt`, `NegativeGate`.** | |
| 41 | + | |
| 42 | +The charter named this gate, and the anchor rule is the reason it needed an edit first: | |
| 43 | +`gate_body` extracts the gate's own braces and the row must be *quoted inside that body* | |
| 44 | +(whole string, or its leading clause up to the first `(`). The gate quoted neither — its | |
| 45 | +assertion matched only the libaom citation **embedded in** the refusal | |
| 46 | +(`"invalid with this subsampling mode"`). So the row, as the gate stood, would have failed | |
| 47 | +its own checker for the wrong reason. | |
| 48 | + | |
| 49 | +The gate now carries a `REFUSAL` const with the whole string and asserts it on the error. | |
| 50 | +This is also a strictly stronger gate, not bookkeeping: | |
| 51 | + | |
| 52 | +| mutation | old assertion | new assertion | | |
| 53 | +|---|---|---| | |
| 54 | +| `decode.rs` guard reworded `no chroma plane block` → `no CHROMA plane block` | **green** (the `decodeframe.c:1456` citation survives) | **red**: `…the refusal must be this decoder's OWN string, whole… got: unsupported: AV1 tile (a block size 4x8, 8x16 or 16x4 … has no CHROMA plane block …)` | | |
| 55 | + | |
| 56 | +Error path verified: `ec_core::Error::Display` is `unsupported: {what} ({why})`, so the | |
| 57 | +whole `why` reaches `err.to_string()`; the assertion passes unmutated. | |
| 58 | + | |
| 59 | +**(b) filter-intra capability claim → `a_sb_level_horz_vert_strip_admits_no_filter_intra_symbol`, `Enumeration`.** | |
| 60 | + | |
| 61 | +No edit needed: the gate's body already contains | |
| 62 | +`src.contains("\"filter intra on a superblock-level HORZ/VERT strip")`, which is the | |
| 63 | +claim's **leading clause** — the second form the checker accepts. The gate walks every | |
| 64 | +explicit arm of `filter_intra_size_class_rect` (none admits a 64 axis), drives the | |
| 65 | +square-delegate callee `filter_intra_size_class` at 32/64 directly, and asserts | |
| 66 | +`(64,32)`/`(32,64)` have no arm. | |
| 67 | + | |
| 68 | +### 1.3 The invariant that makes the next one impossible | |
| 69 | + | |
| 70 | +New test `every_listed_refusal_and_capability_claim_has_a_proven_row`: every string in | |
| 71 | +`REFUSALS` + `CAPABILITY_CLAIMS` has a row, and `listed == PROVEN.len()` (one to one). | |
| 72 | + | |
| 73 | +**Red proofs** (delete the row, run the test — file restored after each): | |
| 74 | + | |
| 75 | +| deleted row | result | | |
| 76 | +|---|---| | |
| 77 | +| `…refuses_the_subsize_libaom_calls_corrupt` | `FAILED` — `…listed as refusals / capability claims but no PROVEN row names a gate that proves them` | | |
| 78 | +| `…admits_no_filter_intra_symbol` | `FAILED` — same assertion, same panic site (`refusal_inventory.rs:2736`) | | |
| 79 | + | |
| 80 | +Both red on the test's **own** assertion (rc 101 with a compiled binary — an earlier | |
| 81 | +attempt at this proof spliced the wrong line range and produced a compile error instead; | |
| 82 | +that is not a red proof and was discarded). | |
| 83 | + | |
| 84 | +### 1.4 After | |
| 85 | + | |
| 86 | +``` | |
| 87 | +refusal inventory: 32 refusals + 1 capability claims, 33 proven | |
| 88 | +anchor strength: 26 rows quote the WHOLE refusal string, 7 quote its LEADING CLAUSE, 0 match neither | |
| 89 | +``` | |
| 90 | + | |
| 91 | +Anchor strength was 25 WHOLE / 6 CLAUSE / 0 neither before this lane: row (a) is a whole | |
| 92 | +match (the new `REFUSAL` const), row (b) a clause match. All 22 tests in the module pass. | |
| 93 | + | |
| 94 | +--- | |
| 95 | + | |
| 96 | +## 2. The seventh cell — `s422_384x240` | |
| 97 | + | |
| 98 | +### 2.1 What the gate's doc said, and what was true | |
| 99 | + | |
| 100 | +`lanes/av1422lift.report.md` §7 pinned six of the seven cells | |
| 101 | +`lanes/av1422ffmpegbase.report.md` §2.1 measured as diverging, and held the rest of the | |
| 102 | +branch with: | |
| 103 | + | |
| 104 | +> THIS BRANCH MUST NOT LAND UNTIL `s422_384x240` CLOSES AND THE CORPUS RE-MEASURES 51/51. | |
| 105 | + | |
| 106 | +Two things had to be settled before the row could be added, and neither was taken on | |
| 107 | +trust from the charter: | |
| 108 | + | |
| 109 | +1. **Is the cell closed?** `lanes/av1422tailskip.report.md` §1 says it is — byte-exact on | |
| 110 | + 16 displayed and 17 decode-order frames — and says the cause was **not** the reserved | |
| 111 | + group-tail chroma SKIP arm the risk study's R4 blamed. | |
| 112 | +2. **Does it decode exact on THIS tree?** Measured, not quoted — §2.3. | |
| 113 | + | |
| 114 | +The charter's "94-cell census on the merged tree" is **not** reproduced here and is not | |
| 115 | +cited: no such artifact exists under `lanes/` or `~/.cache/census422*/`. What this lane | |
| 116 | +measured is in §2.3 and §2.4, from this tree. | |
| 117 | + | |
| 118 | +### 2.2 The row, and why no second copy of the stream | |
| 119 | + | |
| 120 | +The seventh cell's bytes are already in the repository: lane-av1422tailskip committed the | |
| 121 | +sweep artifact as `crates/ec-av1/fixtures/422_palette_intra_in_inter_384x240_17f.obu`. | |
| 122 | +Verified identical to the sweep file before pinning: | |
| 123 | + | |
| 124 | +| | | | |
| 125 | +|---|---| | |
| 126 | +| `~/.cache/census422/sweep/s422_384x240.obu` | 19 344 B, sha256 `bf1c658e…a4b815b`, fnv1a64 `0x923ccabfcb933e90` | | |
| 127 | +| `~/.cache/census422b/sweep/s422_384x240.obu` | same sha256 | | |
| 128 | +| `fixtures/422_palette_intra_in_inter_384x240_17f.obu` | same sha256, same fnv1a64 | | |
| 129 | + | |
| 130 | +So the row pins the existing name rather than committing a second 19 KB copy of one | |
| 131 | +stream under a second name; the doc says so and names both hashes. (A copy was staged | |
| 132 | +while checking, then removed — the tree carries no new fixture.) | |
| 133 | + | |
| 134 | +The doc's "Why these six" paragraph was **corrected, not extended**: 384x240 is 8- *and* | |
| 135 | +16-aligned, so the seventh cell is not in the `round_ss` / non-8-aligned-geometry class the | |
| 136 | +other six are in. It is the late-starting frame-1 alt-ref chroma residual | |
| 137 | +(`lanes/av1422late.report.md`) and is now described as its own class. | |
| 138 | + | |
| 139 | +### 2.3 Exactness re-measured on this tree | |
| 140 | + | |
| 141 | +`EC_AV1_REQUIRE_FFMPEG=1 cargo test -p ec-av1 --lib the_pinned_422_corpus_cells_decode_pixel_exact` | |
| 142 | +— ffmpeg as the oracle, display order, all seven rows: | |
| 143 | + | |
| 144 | +``` | |
| 145 | +[422_palette_intra_in_inter_384x240_17f.obu]: sha256 bf1c658e…a4b815b | |
| 146 | +[422_palette_intra_in_inter_384x240_17f.obu]: byte-exact vs ffmpeg (yuv422p, 16 frames); | |
| 147 | + census delta units=[1992, 1254, 1256] coded=[955, 742, 854] | |
| 148 | +test result: ok. 1 passed; 0 failed | |
| 149 | +``` | |
| 150 | + | |
| 151 | +* **0 wrong samples in Y/U/V on all 16 frames** — every plane and frame is compared, and | |
| 152 | + `assert_422_stream_pixel_exact` panics on the first differing sample. | |
| 153 | +* **Non-vacuous**: the per-plane coefficient-unit census reads 1992/1254/1256 units and | |
| 154 | + 955/742/854 units that coded at least one coefficient, so the compare is not vacuous | |
| 155 | + with respect to 4:2:2. | |
| 156 | +* Prior measurement of the same bytes on earlier trees: `0/1780/1871`, first bad display | |
| 157 | + frame 6, U row 174 col 32 (`lanes/av1422ffmpegbase.report.md` §3, | |
| 158 | + `lanes/av1422luma.report.md` §6) — the same comparator family, so the movement from | |
| 159 | + 1780/1871 to 0/0/0 is a real change and not a different instrument. | |
| 160 | +* Sibling gate on the same bytes, also run here: | |
| 161 | + `the_pinned_422_palette_intra_in_inter_cell_window_is_byte_exact` → **ok**, | |
| 162 | + "17 decode-order frame(s) byte-exact against aomdec (1 hidden), 16 chroma palette unit | |
| 163 | + window(s)". | |
| 164 | + | |
| 165 | +**Row non-vacuity.** Mutating that row's fnv1a64 by one turns the gate red on its own | |
| 166 | +assertion: `…[422_palette_intra_in_inter_384x240_17f.obu]: bytes drifted`. Mutating the | |
| 167 | +**sha256** column stays green *by design* — it is the corpus's identity column for a | |
| 168 | +re-capture, not an in-process assertion (the code says so at the column); recording it so | |
| 169 | +the green is not mistaken for a weak gate. | |
| 170 | + | |
| 171 | +### 2.4 The corpus re-measures 51/51 — also on this tree | |
| 172 | + | |
| 173 | +The second half of the landing condition, run here rather than assumed: | |
| 174 | + | |
| 175 | +* driver `~/.cache/census422b/ffcensus.py` (display order, shown frames, geometry from | |
| 176 | + `ffprobe`, a count over zero frames is a hard error, `probe` recorded per row), | |
| 177 | +* oracle binary = `dump_yuv` built from **this lane's tree** | |
| 178 | + (`CARGO_TARGET_DIR=/home/user/.cache/tgt/av1bookkeep`, recorded in every result row), | |
| 179 | +* cell list = the census's own `cells_ff.json`, 4:2:2 subset selected by probing each | |
| 180 | + stream's own sequence header. | |
| 181 | + | |
| 182 | +| run | cells | result | | |
| 183 | +|---|---|---| | |
| 184 | +| 4:2:2 subset | 51 | **51 BYTE-EXACT**, incl. `s422_384x240` 0/0/0 | | |
| 185 | +| whole corpus | 95 | **95 BYTE-EXACT** (51 4:2:2 + 44 4:2:0 / 4:4:4 controls) | | |
| 186 | + | |
| 187 | +All 95 stream paths were resolved and every remapped path's sha256 checked against the | |
| 188 | +census's recorded `sha` before use; 0 unresolved. Two honest limits on this instrument: | |
| 189 | +it is the **ffmpeg** oracle in **display** order (the aomdec decode-order census is a | |
| 190 | +different instrument and was not re-run), and the census's `probe_split_control` | |
| 191 | +("the clean build must refuse 4:2:2") is obsolete now that the lift has landed — it is not | |
| 192 | +part of this measurement. | |
| 193 | + | |
| 194 | +--- | |
| 195 | + | |
| 196 | +## 3. Verification actually run on this tree | |
| 197 | + | |
| 198 | +| check | result | | |
| 199 | +|---|---| | |
| 200 | +| `cargo check --tests -p ec-av1` | clean (one pre-existing `dead_code` warning, `dumpio.rs::pin_reporting`, untouched by this lane) | | |
| 201 | +| `cargo test -p ec-av1 --lib refusal_inventory` (22 tests) | 22 passed, 0 failed | | |
| 202 | +| `every_proven_refusal_names_a_test_that_exists`, `--nocapture` | ok; anchor strength 26/7/0, inventory 33 rows | | |
| 203 | +| `a_422_header_over_a_420_tile_refuses_the_subsize_libaom_calls_corrupt` | ok (also the guard-wording mutation: red) | | |
| 204 | +| `the_pinned_422_corpus_cells_decode_pixel_exact`, `EC_AV1_REQUIRE_FFMPEG=1` | ok, 7/7 rows (also the fnv mutation: red) | | |
| 205 | +| `the_pinned_422_palette_intra_in_inter_cell_window_is_byte_exact` | ok (sibling gate, same bytes) | | |
| 206 | +| 51-cell / 95-cell ffmpeg census, this tree's `dump_yuv` | 51/51 and 95/95 BYTE-EXACT | | |
| 207 | + | |
| 208 | +The two full `ec-av1` suite runs this wave live on the server fleet; the scoped runs above are | |
| 209 | +what this lane executed locally. | |
| 210 | + | |
| 211 | +## 4. Commits | |
| 212 | + | |
| 213 | +1. `44afb448` — ec-av1: the inventory listed 33 strings and PROVEN carried 31 rows | |
| 214 | + (`refusal_inventory.rs` +2 rows +1 test, `stream.rs` gate quote) | |
| 215 | +2. `1dd17d55` — ec-av1: the seventh 4:2:2 corpus cell is pinned, and re-measured exact here | |
| 216 | + (`stream.rs` row + doc) | |
| 217 | + | |
| 218 | +## 5. Not established here | |
| 219 | + | |
| 220 | +* The charter's "94-cell census on the merged tree" figure — no artifact for it exists in | |
| 221 | + `lanes/` or `~/.cache/census422*/`, so it is neither reproduced nor cited. What is | |
| 222 | + measured is §2.4 (95/95 on this tree, ffmpeg/display-order instrument). | |
| 223 | +* The aomdec decode-order 51-cell census was not re-run. | |
| 224 | +* No new fixture was committed, by design (§2.2); if a later lane wants the cell pinned | |
| 225 | + under its census name, that is a rename, not a new pin. | |
| \ No newline at end of file |