forge
Explore
Log in

Don't you dare go Hollow

lanes/breconciliation: the census's ranked residue, landed or refuted

Browse files at this commit

bf814a05a2033d383707c72f7e16fb5e026ee590Ahmet Kaan GümüşParent: 1684e95
One line per census rank with the evidence, behaviour-freeness per source
commit with counts, the final-tree regression, the deliberate non-landings
with reasons, and a branch-containment table for a later prune.

The headline: six of eight census branches were landed, two were refuted or
partly refuted. `Proof::TablePin` is REFUTED -- its one row's gate on main
measures the reach domain the tag's premise calls unestablished, so the census
quoted the BRANCH's comment as main's. `census_plane()` is dropped as dead on
its own branch's tip. Everything else landed, and every one of the eight
branches is now source-complete in this work.
lanes/breconciliation.report.mdadded+367 -0
@@ -0,0 +1,367 @@
1+# Branch reconciliation — landing (or refuting) the census's ranked residue
2+
3+**Branch:** `lane-breconcile`, worktree `~/.cache/wt/breconcile`, forked from
4+`main`@`7538a841`.
5+**Nothing pushed, nothing merged to `main`, no rustfmt, no lane branch edited or
6+deleted.** The primary checkout was never written to (§6).
7+
8+**Inputs.** `lanes/branchcensus2.report.md` §2, ranked 1-9. Its §1 snapshot was
9+`main`@`52c62c15`; rank #1 had already landed as `7538a841` before this lane
10+started, so this pass covers ranks #2-#9.
11+
12+**The governing fact.** The census's §2 ranking is a snapshot of *what was
13+missing*, and it was measured, not argued: every classification in it survives.
14+What does NOT always survive is the *reason* it gave. Two of the nine items rest
15+on a rationale written against a weaker artifact that main has since replaced —
16+#2's `Proof::TablePin` and #4/#3's premise about which gate a row names. Those
17+were re-checked against main's current code and one is refuted (§1.3, §1.5).
18+
19+---
20+
21+## 1. One line per rank
22+
23+| # | census item | branch | verdict | commit | evidence |
24+|---|---|---|---|---|---|
25+| 1 | `e55ad654` four mislabelled partition rungs | `lane-av1tilerows2` | **ALREADY LANDED** | `7538a841` (base) | out of scope for this pass |
26+| 2 | `Proof` enum + `Proof::TablePin` | `lane-av1refusal` | **LANDED, `TablePin` REFUTED** | `29951312` | 21/0; 3 red-before mutations; §1.3 |
27+| 3 | `6dfd827e` + `7586358f` + `c8ed05f3` | `lane-av1loss444mm` | **LANDED** (one helper dropped as dead) | `2be41696` | check 0/0; 248/0 pixel-exact; §1.5 |
28+| 4 | `bf88d5e1` two `set_symr_cdf` tags | `lane-av1tilerows2` | **LANDED** | `d100dc47` | check 0/0; 248/0; §1.4 |
29+| 5 | `571b4090` round-9 retraction | `lane-av1leafsize` | **LANDED** | `47bcb11e` | §1.5a — cherry-picked clean |
30+| 6 | `0beaf6c5` round-6 caller | `lane-av1444rect` | **LANDED** | `d3226c2e` | blob byte-identical; §1.5b |
31+| 7 | `f0ae03c8` + `f61ebe79` test-count census | `lane-av1testcount` | **LANDED, re-measured** | `13b752ff` | 712/742/802 re-derived; §1.7 |
32+| 8 | `5a1388f2` plane-tagged `OUR_MODE` | `lane-av1444chr` | **LANDED** | `b307aaeb` | check 0/0; 248/0; §1.8 |
33+| 9 | `6cc9ea6f` report header | `lane-av1chrtx` | **LANDED** (cosmetic) | `b307aaeb` | text-only; §1.9 |
34+
35+Six source commits, two report-only, one report-only-plus-source. Diffstat of
36+the whole pass: **488 insertions, 19 deletions, 7 files** — 46 of the
37+insertions are report text.
38+
39+### 1.2 What each landed commit actually is
40+
41+Seven commits on `lane-breconcile`, oldest first:
42+
43+```
44+13b752ff lanes/av1testcount: the 13-branch wave reconciled exactly, re-measured
45+b307aaeb ec-av1: the plane-tagged OUR_MODE per-TU mode trace; fix the readcensus header
46+2be41696 ec-av1: the lossless OUR_DQW twin, plane-tagged, with the raw levels beside dq
47+d100dc47 ec-av1: tag the EC_SYMR reads in read_eob and read_coeffs' tx_type
48+29951312 refusal_inventory: say WHICH kind of proof each PROVEN row carries
49+d3226c2e docs(av1444rect): round 6 -- the fork's caller is NAMED
50+47bcb11e lanes/av1tilerows: round 9 -- the 4:4:4 128-root leaf-size fork is gone on main
51+```
52+
53+Every commit message states what was NOT landed with it and why. No open defect
54+was fixed: this lane lands instruments and records.
55+
56+### 1.3 #2 `Proof` — the enum landed, `TablePin` is REFUTED
57+
58+**What landed** (`29951312`): `enum Proof { NegativeGate, Enumeration }` with a
59+`label()`, a third tuple element on **all 32** `PROVEN` rows, both consumer
60+loops updated, and one new test.
61+
62+The census's premise was that main's `PROVEN` is a 2-tuple so every row "looks
63+equally proven". That is true and it is worth fixing: 7 rows carry a gate that
64+drives a stream into the guard (`NEGATIVE`, red on removal), 25 carry a gate
65+that sweeps a domain and shows nothing reaches it (`ENUMERATION`, green on
66+removal). Those are different standards and the table said so nowhere.
67+
68+**What is refuted** is `Proof::TablePin`. The census wrote, of the `(4,8)`
69+chroma-table row: *"its gate pins a table's arms exactly but the domain the
70+table is REACHED OVER is unestablished, so an `Enumeration` tag there would
71+claim unreachability the gate's own comment admits it has not shown."* That
72+comment is the BRANCH's, not main's. `lanes/branchcensus2.report.md:108-112`
73+quotes it as if it were main's — the census read the branch file.
74+
75+On main that row names a different, stronger gate:
76+`every_chroma_unit_decode_block_rect_can_present_has_a_coefficient_table`
77+(`refusal_inventory.rs:1666`), which
78+
79+1. reads all eight `decode_block_rect` call sites' own literal `bw`/`bh`
80+ (`assert_eq!(sites, 8, "the number of decode_block_rect call sites changed")`),
81+2. walks them through `bw >> ss_x` / `bh >> ss_y` for all three codable
82+ subsamplings and asserts each has a table row,
83+3. pins the table exactly (six arms), and
84+4. asserts the residual is UNPRODUCIBLE: `!produces.contains(&(4, 8)) &&
85+ !produces.contains(&(8, 4))`, "the caller set can now produce a 4x8/8x4
86+ chroma shape but the table has no such row -- the chroma refusal is LIVE".
87+
88+The reach domain r3 called unestablished is measured. `Enumeration` is the
89+honest tag, and a third variant with zero rows is dead weight. The enum's doc
90+comment records exactly when to re-add it. (The census was right that the row
91+is *representable*; it was wrong about which way.)
92+
93+**Non-vacuity — three mutations, each reverted, each RED:**
94+
95+| mutation | result |
96+|---|---|
97+| flip the `(4,8)` row's tag to `NegativeGate` | RED — *"is tagged NEGATIVE …, but its gate enumerates the caller domain"* |
98+| turn all 7 `NegativeGate` rows into `Enumeration` | RED — *"no row is tagged NEGATIVE, so the NegativeGate variant is dead weight"* |
99+| **weaken the GATE**: replace `assert_eq!(sites, 8, "…call sites changed")` with `let _ = sites;` (the gate itself still passes) | RED — *"…no longer carries \"the number of decode_block_rect call sites changed\", so the Enumeration tag … claims a reach domain the gate has stopped measuring"* |
100+
101+The third is the one that matters and the one a weaker test would miss: the tag
102+is pinned to evidence inside the gate's **body**, so a future edit that guts the
103+gate's caller-domain measurement reds the taxonomy rather than leaving the row
104+quietly overclaiming. Mutating the test's own expectation list instead would
105+have proved nothing, and did not.
106+
107+**Suite:** `every_proven_refusal_names_a_test_that_exists`,
108+`every_named_gate_body_is_bounded_in_these_files`, and the new test —
109+**21 passed, 0 failed** (20 pre-existing + 1 new). Measured distribution printed
110+by the new test: **7 NEGATIVE, 25 ENUMERATION of 32 PROVEN rows**.
111+
112+### 1.4 #4 — the two `set_symr_cdf` tags (`d100dc47`)
113+
114+Two lines, `crates/ec-av1/src/decode.rs`. `set_symr_cdf` existed with 24 call
115+sites; nothing tagged the two reads the 4:4:4 partition-walk work pairs against
116+the oracle's per-read `site=`. `SYMR_CDF` is a `Cell<&'static str>` thread-local
117+reset after each symbol (`msac.rs:491`) and read only by the `EC_SYMR` eprintln,
118+so the tag is a trace label and nothing else; placement matches the 24 existing
119+`y_mode`/`uv_mode` tags.
120+
121+### 1.5 #3 — the lossless `OUR_DQW` twin (`2be41696`)
122+
123+Re-derived onto current main, and it did **not** cherry-pick: main has since
124+generalised `dequant_and_inverse_wht4x4` to any shape (lane-whtshape's 4x4
125+raster), so `TxParams::run` no longer calls the 4x4 entry. `plane` is threaded
126+through **both** functions so the raster path's tiles carry it too.
127+
128+- `TxParams.plane`, set by the reader that OWNS the unit (`plane_idx` at the
129+ three multi-plane sites, `0` at `decode_leaf_rect8`, which is luma-only —
130+ `plane_q_delta(0, …)` and `push_intra(0, …)` at that arm).
131+- `OUR_DQW`, the LOSSLESS half of the oracle's `EC_DQCOEFF` rung, under the same
132+ env var, with `plane=` and `lv=` (the RAW level grid the dequant consumed, so
133+ "dequant produced nothing" is distinguishable from "the reader produced
134+ nothing").
135+
136+**The open defect it instruments:** item (a) of `lanes/av1loss444mm.report.md`
137+r10 — 4:4:4 lossless **key frame**, reconstruction-only, 21 U + 28 V samples off
138+by up to ±63, luma exact, entropy bit-identical. Named there with a three-file
139+search space. Note the census's own caveat is kept: r9 already exonerated
140+dequant ("0 of 2053 units have non-zero levels with an empty `dq`"), so this rung
141+buys **diagnosis, not a fix**.
142+
143+**One artifact dropped:** `census_plane()`, added by `7586358f`. On the branch's
144+own tip (`87d1518d`) it is defined and **never called** — `6dfd827e` replaced its
145+one use with the field. Not landed.
146+
147+### 1.5a #5 — the round-9 retraction (`47bcb11e`)
148+
149+`git cherry-pick -x 571b4090` **applied clean** (the census expected drift).
150+Verification is text, by blob:
151+
152+- main's `lanes/av1tilerows.report.md` and the branch's differ — expected, and
153+ not a problem: main carries two RETRACTION blocks in §8
154+ (`RETRACTED by lanes/av1txsizeaudit.report.md §3.1` and *"a subsampling-
155+ parameterised expression can only be certified by the measured value at every
156+ subsampling"*) that the branch predates. Landing must ADD round 9 on top of
157+ those, not overwrite them.
158+- The round-9 section itself — the 45 lines from `## 17. Round 9` to EOF — is
159+ **byte-identical** to the branch's (`diff` of the `sed -n '/Round 9/,$p'` window
160+ of both blobs: no output).
161+
162+This is the commit that changes what the record says: main ended at §8's claim
163+that one site is "proven reachable and documented", and round 9 measures 0
164+divergence over 36 frames and 217570 reads in entropy lockstep on merged main,
165+and explicitly refuses to attribute it to its own fix.
166+
167+### 1.5b #6 — the round-6 caller (`d3226c2e`)
168+
169+Also cherry-picked clean. Strongest verification available:
170+
171+```
172+git rev-parse lane-breconcile:lanes/av1444rect.report.md
173+ = 69c428477984ea530d1fed94807c1876febd7820
174+git rev-parse lane-av1444rect:lanes/av1444rect.report.md
175+ = 69c428477984ea530d1fed94807c1876febd7820
176+```
177+
178+Byte-identical blobs. Main's §7 said the 4:4:4 intra-BC chroma fork "needs a
179+fresh start, not a continuation"; round 6 names it:
180+`decode_intrabc_rect`'s non-lossless whole-block rect arm, one
181+`around_mi_rect((mi_r, mi_c), bw, bh)` gather taken at the **luma** footprint and
182+reused for a 4x8 chroma unit under a 4x16 luma plane block — coincident at 4:2:0
183+after subsampling, not at 4:4:4. That defect is still open; this records its call
184+site and does not fix it.
185+
186+### 1.7 #7 — the test-count census, re-measured (`13b752ff`)
187+
188+The census called this stale and said to land it only with a fresh count. Both
189+anchors were re-derived from scratch — fresh `git archive` extracts, private
190+target dirs, `cargo test -p ec-av1 --lib -- --list`:
191+
192+```
193+298f75c4 (pre-merge base) 712 raw --list lines, 712 unique
194+9623bcab (merged main) 742 raw, 742 unique
195+b307aaeb (this tree) 802 raw, 802 unique
196+```
197+
198+**The reconciliation stands**: 712 + 30 distinct = 742, delta 0, and zero
199+duplicate registrations at both anchors. Those are immutable facts about
200+immutable commits. But the tree this report would now be compared against is
201+**802**, and the report says so in a header paragraph so no reader mistakes it
202+for a count of the present.
203+
204+The 13 per-branch tip counts were **not** re-taken (13 more throwaway builds) and
205+the report states which figures are re-verified and which are the lane's own.
206+
207+### 1.8 / 1.9 #8 and #9 (`b307aaeb`)
208+
209+`5a1388f2` cherry-picked clean — the only source commit in the census's set that
210+did. 13 lines, env-gated print only, at `read_plane`, where `plane_idx` is a
211+parameter and therefore nameable. The census notes its motivating gap closed on
212+main by `RECON_PLANE`/`recon_plane()`; that is true and is not a reason to skip
213+it. `RECON_PLANE` stamps the plane at RECONSTRUCTION (which does not know its
214+plane); this rung names it at the READER. Its reason to exist is the class
215+`rung-mislabels-plane`, which has already produced two wrong claims this session
216+— `read_coeffs_rect` labelling its unit `plane=0`, then a sweep reading a
217+phantom second luma unit out of that label. The H3 defect the lane chased is
218+still open and unowned.
219+
220+`6cc9ea6f` is the 4-line header correction only. The census is right that the
221+gate name it was blamed for is already correct on main
222+(`a_pixel_exact_444_stream_walks_the_same_coefficient_units_the_oracle_does`),
223+so nothing else moved.
224+
225+---
226+
227+## 2. Behaviour-freeness
228+
229+Claim per landed commit, and the proof each one got.
230+
231+| commit | claim | proof | result |
232+|---|---|---|---|
233+| `d100dc47` | env-gated trace tag only | `cargo check --all-targets` + pixel-exact | 0 err 0 warn; **248/0** |
234+| `2be41696` | `TxParams.plane` reaches nothing but an `eprintln` | same | 0 err 0 warn; **248/0** |
235+| `b307aaeb` | env-gated `eprintln` in `read_plane` | same | 0 err 0 warn; **248/0** |
236+| `29951312` | `#[cfg(test)]` taxonomy + a test | 21/0 + 3 mutations | **21 passed, 0 failed** |
237+| `13b752ff`, `47bcb11e`, `d3226c2e` | report text only | blob / text comparison | §1.5a, §1.5b, §1.7 |
238+
239+Common run, on the final tree:
240+
241+```
242+$ CARGO_TARGET_DIR=$HOME/.cache/tgt/breconcile EC_NOMEMGUARD=1 \
243+ cargo test -p ec-av1 --lib -- pixel_exact
244+test result: ok. 248 passed; 0 failed; 0 ignored; 0 measured; 554 filtered out
245+```
246+
247+248 includes `real_superres_streams_with_sub8_leaf8_and_warp_decode_pixel_exact`,
248+`the_chroma_rect_gates_excluded_seed_46_decodes_pixel_exact`,
249+`an_sb128_rect_strip_with_intrabc_decodes_pixel_exact`,
250+`an_sb128_screen_stream_with_intrabc_decodes_pixel_exact` and the pinned 4:2:0
251+odd-height and 4:4:4 quadrant witnesses — i.e. exactly the cells the new
252+`plane` field and the two new tags touch.
253+
254+```
255+$ cargo test -p ec-av1 --lib -- every_proven_refusal refusal_inventory \
256+ every_named_gate_body every_proven_row which_kind_of_proof
257+test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 781 filtered out
258+```
259+
260+---
261+
262+## 3. Regression on the final tree
263+
264+```
265+$ cargo test -p ec-av1 --lib -- 420 422 444 lossless warp intra \
266+ --skip bitrate_target_lands_within_5_percent_over_48_frames
267+test result: ok. 181 passed; 0 failed; 2 ignored; 0 measured; 619 filtered out
268+ (271.45s)
269+
270+$ cargo check -p ec-av1 --all-targets
271+ Finished `dev` profile — 0 errors, 0 warnings
272+```
273+
274+The 2 ignored are pre-existing `#[ignore]` attributes in the crate, not
275+anything this pass added; nothing in this lane changed an ignore.
276+
277+`main` advanced `7538a841 -> 0f9ea788` during this run.
278+`git diff --stat 7538a841..main -- crates/` is **one new fixture**
279+(`420_lossless_tallinter_8x16.obu`) and zero source lines, so every
280+classification above is unaltered against `0f9ea788` as well.
281+
282+---
283+
284+## 4. Deliberately NOT landed
285+
286+| artifact | why |
287+|---|---|
288+| `Proof::TablePin` (rank #2) | **REFUTED.** Its one row's gate on main measures the reach domain the tag's premise says is unestablished, so the tag would overclaim and the variant would carry no rows. §1.3. |
289+| `census_plane()` (`7586358f`) | **DEAD on the branch's own tip** — defined, never called; `6dfd827e` replaced its use with `TxParams.plane`. |
290+| `lane-av1tilerows.report.md` §9-§16 (`fdaec88c`…`d5ffc0c9`, `bf88d5e1`'s report half) | rounds 2-7 are measurements on an OLD main, and round 9 (landed, #5) measures the fork GONE on merged main — 0/36 divergence, entropy lockstep over 217570 reads. Landing §16 would re-record a fork that no longer exists. |
291+| `lane-av1loss444mm`'s 8 report commits | report-only history of an open defect; the defect is still open and its owner has not started. |
292+| `lane-av1refusal`'s `lanes/av1refusalclaim.report.md` (r1-r7) | report-only; r7's third-weak-anchor finding was closed on main by `797fa52b`, which took a LATER, stronger version of r3-r7's boundary and **dropped** `body_of`. Merging the branch report would document as open what main closed. |
293+| `lane-av1444chr`'s 3 report commits (H3 rounds 2-4) | report-only; they record a narrowing whose conclusion is "the owner of the remaining line has not been identified", which is still true and belongs with whoever picks it up, not with an instrument landing. |
294+| `lane-av1lm444loss` | **Author-declared DO-NOT-MERGE** (`lanes/av1lm444loss-corr.report.md:16-17`). Not touched. Census §3 names what merging it would break. |
295+| rank #1 `e55ad654` | already on this branch's base as `7538a841`. |
296+
297+---
298+
299+## 5. Branch containment, for a later prune
300+
301+`git cherry` is patch-id and **cannot see a re-derivation**, so the column below
302+is by CONTENT (distinctive literals grepped in this tree), which is the only
303+decisive detector.
304+
305+| branch | unlanded commits | touches `crates/` | source residue left | report residue left | prune? |
306+|---|---|---|---|---|---|
307+| `lane-av1leafsize` | **0** | — | none | none | **YES** — fully contained (`git cherry` says so too) |
308+| `lane-av1444rect` | **0** | — | none | none | **YES** — blob-identical report |
309+| `lane-av1chrtx` | 1 | none (report only) | none | none | **YES** — `6cc9ea6f`'s content is in `b307aaeb` |
310+| `lane-av1testcount` | 2 | none (report only) | none | none | **YES** — report imported at its corrected revision |
311+| `lane-av1444chr` | 4 | `5a1388f2` | **none** — `OUR_MODE plane=` present | 3 H3 report commits (§4) | source-complete; prune only if the reports are abandoned |
312+| `lane-av1tilerows2` | 8 | `e55ad654`, `bf88d5e1` | **none** — both landed (`7538a841`, `d100dc47`) | §9-§16, deliberately (§4) | source-complete |
313+| `lane-av1loss444mm` | 11 | `1a6e4f56`, `7586358f`, `6dfd827e`, `c8ed05f3` | **none** — `1a6e4f56` was on main via `c0727d64`; the other three are in `2be41696` | 8 report commits (§4) | source-complete |
314+| `lane-av1refusal` | 8 | `d6682aa4`, `72b83ba1`, `0c834cd1`, `40849868` | **none** — `d6682aa4` via `e429acfb`/`2ec19064`, `0c834cd1`+`40849868` via `797fa52b` (`fn gate_body`, `fn leading_clause`, `fn squash_source` all present), `72b83ba1`'s Proof half in `29951312` | `lanes/av1refusalclaim.report.md` r1-r7 (§4) | source-complete |
315+
316+**Every one of the eight census branches is now source-complete in this work.**
317+The only residue left anywhere is REPORT text, and each item of it has a stated
318+reason in §4. Two branches are fully contained and prunable today.
319+
320+Verification of the "none" column, run in this tree:
321+
322+```
323+fn every_frame_size_a_header_can_code_has_a_mode_info_grid stream.rs:1, refusal_inventory.rs:1
324+fn gate_body refusal_inventory.rs:2
325+fn leading_clause refusal_inventory.rs:1
326+fn squash_source refusal_inventory.rs:1
327+(cc * chunk_chroma_w, cr * chunk_chroma_h), decode.rs:4
328+set_symr_cdf("eob_pt") decode.rs:1
329+set_symr_cdf("tx_type") decode.rs:1
330+OUR_DQW plane= transform.rs:1
331+pub(crate) plane: usize, decode.rs:1
332+OUR_MODE plane= decode.rs:1
333+```
334+
335+---
336+
337+## 6. Non-interference
338+
339+- **No push, no merge to `main`, no rebase of any lane branch, no tag, no
340+ branch or worktree deleted.** All seven commits live on `lane-breconcile` in
341+ `~/.cache/wt/breconcile`.
342+- **The primary checkout was never written to.**
343+ `git -C /home/user/Documents/Code/Rust/edith_codecs status --porcelain`
344+ is empty, verified at the end of the run. Every path this lane edited or
345+ created is under `/home/user/.cache/wt/breconcile/`.
346+- `lane-av1lm444loss` was not checked out, read from, or written to.
347+- Scratch builds used `CARGO_TARGET_DIR=$HOME/.cache/tgt/{breconcile,tc-a,tc-b,tc-c}`
348+ — lane-private, never the house dir. The three `git archive` extracts for the
349+ test-count re-measurement lived in `/tmp/tc` and were removed;
350+ `df -h /tmp` was 22% used before the suite runs and no `/tmp/ec-av1-*` staging
351+ existed.
352+
353+## 7. Method notes for the next pass
354+
355+- **A census item's RATIONALE decays faster than its content.** Two of nine
356+ items here rest on a lane's own commit message describing an artifact main
357+ has since replaced. The census read the branch file and attributed its comment
358+ to main (`branchcensus2.report.md:108-112`). Re-read the CURRENT gate before
359+ carrying a tag that was minted against an older one.
360+- **`git cherry-pick` beat the census's conflict prediction on 3 of 4
361+ report-only commits** (only `72b83ba1` and the source commits conflicted).
362+ Try the cherry-pick before re-deriving; it is 2 seconds and it is decisive.
363+- **A helper can be dead on its own branch's tip.** `census_plane()` was added
364+ by `7586358f` and made dead by `6dfd827e`; grep the TIP, not the commit.
365+- **A test that pins a taxonomy must pin the SUBJECT, not its own expectation
366+ list.** Mutating the test's expectation proves nothing (measured: green).
367+ Mutating the gate's body is what reds it.
\ No newline at end of file\ No newline at end of file