forge
Explore
Log in

Don't you dare go Hollow

lane-unwritten-dep r3: the census was never blind -- dump_stage16's 4:2:0 chroma crop was

Browse files at this commit

9e84e98714144e304965867c4b39b28fdff42c7cAhmet Kaan GümüşParent: 89e850c
Corrects r2, which named the census as the blind instrument and attributed the
4:2:2 witness's divergence to deblock. r2's own numbers refuted both: its
EC_AV1_DEBUG_SKIP_DEBLOCK run did not remove the difference, and 32 surviving
sentinel samples cannot explain 1986 differing bytes.

dump_stage16 cropped chroma as (fw/2, fh/2) -- a 4:2:0 assumption. On a 64x64
4:2:2 frame (ss_x=1, ss_y=0) it wrote 32x32 where the frame carries 32x64, so
2048 chroma samples appeared in NO stage dump, and they are exactly the region
where the difference lives. Class: diagnostic-dump-assumes-one-subsampling.
Fixed to (round_ss(fw, ss_x), round_ss(fh, ss_y)); all six call sites pass the
frame's per-axis subsampling. The oracle's rung 1 already used
uv_crop_width/uv_crop_height, which are per-axis.

With per-axis extents the corrected bisect reverses r2: the pre-deblock dump now
DIFFERS by 2158 bytes instead of being identical, and an exact u16 whole-plane
census finds 224 unwritten samples (U 112, V 112, rows 36..63, whole 4x4 groups)
-- exactly lane/av1unwritten's own number. The hole is present BEFORE any filter
runs. The census reports it; the stage dump could not see it.

Gate: the non-vacuity control is now SYNTHETIC -- the census is handed planes
carrying exactly 7 sentinel samples and must report 7. r2's control used
440_request_is_422, which main now refuses, so r2's gate would have gone red on
merge for an unrelated reason. Merge proof: main = e45cc748 merged locally
(c62eeda9), gate green there (816 filtered vs 813 on the branch point, so both
lanes' content is present). Mutation -- neutering census_unwritten_final reds
the synthetic control.

Scope stated rather than implied: the census is taken before apply_grain, so the
claim is over the pre-grain planes (the bytes the reference bank stores and every
later frame predicts from); "the caller's final grained picture has no hole" is
NOT claimed.

Swept the family r2 did not: run-to-run content nondeterminism with
uninitialised planes, N separate processes. Negative for both hg fixtures, 4/4
identical with the correct frame size. 440 is not sweepable on the merge tree
(main refuses it); on the branch point I measured 3/3 identical and make no claim
about reproducing av1unwritten's three-distinct-hashes observation.

Evidence bar corrected: 97ef82c0ce is CONSISTENT WITH a truncated dump (frames
0-4 plus 13320192 bytes of frame 5, reproduced bit-for-bit) -- that pins bytes and
shape, not mechanism; the decode's innocence rests on the invariance evidence.
0ee1edf403 stays an open instrument-hygiene question, not a decode question.
lanes/unwritten-dep.report.mdmodified+252 -244
@@ -1,289 +1,297 @@
1-# lane/unwritten-dep — the reelb_* divergence is a TRUNCATED DUMP, and the census's blind spot is the loop filter
1+# lane/unwritten-dep — the reelb_* rows are not decoder defects; the instrument that lied is `dump_stage16`
22
33 **Outcome in one line: neither `reelb_rect64_intra16x4_witness.obu` nor
4-`reelb_arf_witness.obu` output depends on unwritten plane content on `8d6998d7` —
5-the campaign's sentinel hash is reproduced EXACTLY by a run whose filesystem ran
6-out of space mid-write (`97ef82c0ce` = frames 0–4 complete plus 13 320 192 bytes
7-of frame 5, hashed `cat dir/frame.f*`-style); and the census's real blind spot is
8-named and fixed: it runs at PRE-DEBLOCK, while deblock READS neighbours to decide
9-an edge, so a hole can be invisible there and still change the output. A
10-post-filter census, taken at the exact point `EC_AV1_FINAL_DUMP` writes, reports
11-32 unwritten samples on the 4:2:2 witness (non-vacuity control) and 0 on all
12-four film fixtures.**
13-
14-Branch `lane/unwritten-dep`, base `main` = `8d6998d7`. No push.
15-
16----
4+`reelb_arf_witness.obu` output depends on unwritten plane content; the census was
5+never blind — `dump_stage16` was, because it hardcoded a 4:2:0 chroma extent and
6+on a 4:2:2 frame wrote half of each chroma plane into no dump at all, which
7+fabricated the "identical pre-deblock, differs post-deblock" attribution; with
8+per-axis extents the 4:2:2 witness shows 224 unwritten samples pre-deblock
9+(exactly lane/av1unwritten's own number), so the difference is present BEFORE any
10+filter runs. The gate's non-vacuity control is now synthetic and survives
11+`main`'s refusal of the only fixture that had one.**
12+
13+Branch `lane/unwritten-dep`. Base `8d6998d7`, **rebased by merging
14+`main` = `e45cc748` locally** (commit `c62eeda9`) — the merge proof the
15+acceptance asked for is this lane's own tree; no rebase onto a different base,
16+the merge keeps `8d6998d7` as the branch point.
17+
18+> **r3 correction, on top of r2.** r2 named the census as the blind instrument and
19+> attributed the 4:2:2 witness's divergence to deblock. Both were wrong, and r2's
20+> own numbers refuted them: its `EC_AV1_DEBUG_SKIP_DEBLOCK` result did not remove
21+> the difference, and 32 surviving sentinel samples cannot explain 1986
22+> differing bytes. The cause is r2's own unexamined instrument.
23+> `dump_stage16` (`decode.rs`) cropped chroma as `(fw/2, fh/2)` — a 4:2:0
24+> assumption — so on a 64×64 **4:2:2** frame (ss_x=1, ss_y=0) it wrote 32×32
25+> chroma where the frame carries 32×64. **2048 chroma samples appeared in no
26+> stage dump at all**, and they are exactly the region where the difference
27+> lives. r2 read the dump's blind spot as a pipeline property. With per-axis
28+> extents the pre-deblock dump is where the difference *starts*.
1729
1830 ## 1. Provenance
1931
20-The probe was built in this lane's own worktree with its own target dir, and its
21-embedded paths name only this worktree:
32+Built in this lane's worktree with its own target dir; the binary's embedded
33+paths name only this worktree.
2234
2335 ```
24-$ cd /home/user/.cache/wt/unwrittendep
25-$ CARGO_TARGET_DIR=/home/user/.cache/tgt/uwdep-k9 cargo build -p ec-av1 --example decode_probe
26-$ strings /home/user/.cache/tgt/uwdep-k9/debug/examples/decode_probe | grep -o "wt/[a-zA-Z0-9_-]*" | sort -u
36+$ CARGO_TARGET_DIR=/home/user/.cache/tgt/uwdep-merge cargo build -p ec-av1 --example decode_probe
37+$ strings .../decode_probe | grep -o 'wt/[a-zA-Z0-9_-]*' | sort -u
2738 wt/unwrittendep
28-$ git rev-parse HEAD
29-8d6998d7cbafa1a7a5271e0d638365890a4b4310
3039 ```
3140
32-Two traps in the brief were live and are worth recording because both produce a
33-*silent* wrong reading:
34-
35-* the first build's target dir (`/home/user/.cache/tgt/unwrittendep`) was
36- **deleted underneath this lane mid-run**; every binary whose path is quoted in
37- this report is under `uwdep-k9`, built and used after that;
38-* `/tmp` is a 16 GB tmpfs that ran at 80% during the first sweep and silently
39- produced **short** dump files (sizes 0, 7 553 024, 4194304 instead of
40- 18 524 160) — those runs are excluded below and every retained run asserts
41- the exact expected frame size.
41+Two live traps, both of which produce a *silent* wrong reading: this lane's first
42+target dir was deleted underneath it mid-run (hence `uwdep-k9` → `uwdep-merge`),
43+and `/tmp` is a 16 GB tmpfs that filled during the first sweep and produced
44+short/zero-length dump files. Every retained run asserts the exact expected
45+frame size; the 10-bit fixtures' frame is 18 524 160 bytes.
4246
43-Fixtures, byte-identical to what the campaign measured:
44-`reelb_arf_witness.obu` 32 126 bytes sha256 `7f3b060da5aa9c53…`,
45-`reelb_rect64_intra16x4_witness.obu` 23 472 bytes sha256 `c9e721088766163b…`.
47+Fixtures: `reelb_arf_witness.obu` 32 126 B sha256 `7f3b060da5aa9c53…`,
48+`reelb_rect64_intra16x4_witness.obu` 23 472 B sha256 `c9e721088766163b…`.
4649
47-Both fixtures are 10-bit 3840×1608, so `EC_AV1_FINAL_DUMP` writes u16 LE and one
48-frame is exactly `(3840*1608 + 2*1920*804) * 2 = 18 524 160` bytes. Every run
49-below asserts that size.
50+## 2. Reproduction
5051
51-## 2. Reproduction — and the result is NOT the campaign's
52+Hash shape `cat dir/frame.f*` (lexicographic), 3 plain + 2 sentinel runs:
5253
53-`EC_AV1_FINAL_DUMP` writes `<prefix>.f<N>` per decode-order frame. Hashing the
54-concatenation in the order a shell glob produces (`cat dir/frame.f*`, i.e.
55-lexicographic) is the shape that reproduces the campaign's numbers exactly:
56-
57-| fixture | plain run | sentinel run | campaign plain | campaign sentinel |
54+| fixture | plain | sentinel | campaign plain | campaign sentinel |
5855 |---|---|---|---|---|
5956 | `reelb_rect64_intra16x4_witness` (34 frames) | `a26438168c` ×3 | `a26438168c` ×2 | `a26438168c` | `0ee1edf403` |
6057 | `reelb_arf_witness` (40 frames) | `8d7a43bc5f` ×3 | `8d7a43bc5f` ×2 | `8d7a43bc5f` | `97ef82c0ce` |
6158
62-**Both campaign PLAIN values reproduce exactly. Neither SENTINEL value does.**
63-Plain is stable across repeats and across five different ambient contents
64-(glibc `MALLOC_PERTURB_` ∈ {0, 1, 85, 170, 254} — every fresh allocation filled
65-with that byte), across `EC_AV1_THREADS` ∈ {1, 2, 4, 8}, and in-process with the
66-allocator's free list deliberately poisoned (§4). Under every one of those the
67-sentinel run is byte-identical to the plain run, all 34 / all 40 frames.
59+**Both campaign PLAIN values are reproduced exactly by this build; neither
60+SENTINEL value is.** The decode output is byte-identical plain vs sentinel, and
61+under every other ambient content available: glibc `MALLOC_PERTURB_` ∈ {0, 1, 85,
62+170, 254}, `EC_AV1_THREADS` ∈ {1, 2, 4, 8}, and in-process poisoning of the
63+allocator's free list with 16 MiB dirty-then-freed blocks.
6864
69-## 3. What the campaign's sentinel hash actually is: a truncated dump
65+The in-process test is the strongest of these because there is no filesystem in
66+the measurement at all, and it has teeth — on the 4:2:2 witness it reports
67+differences under 4 of 4 poison patterns (667–715 differing U samples,
68+673–690 differing V, 0 in luma), while reporting **0 differing frames under 4
69+of 4 patterns on both hg fixtures**.
7070
71-`EC_AV1_FINAL_DUMP` ignores its write error — `let _ = f.write_all(&buf);` at
72-`stream.rs` (the final-dump site). A run whose filesystem fills therefore leaves
73-a byte stream that is a **prefix** of the true one, and nothing reports it.
71+## 3. `97ef82c0ce` — consistent with a truncated dump, not proven to be one
7472
75-Sweeping every (frames-complete, tail-truncated) shape against the campaign's
76-value:
73+Sweeping (frames-complete, tail-truncated) shapes against the campaign's value:
7774
7875 ```
7976 $ python3 /tmp/unwritten/partial.py reelb_arf_witness
80-reelb_arf_witness: 40 frames (max index 39), hunting 97ef82c0ce
8177 MATCH: frames 0..4 + f5 truncated to 13320192 bytes, lex-hashed
82- 1 match(es)
8378 ```
8479
85-**`97ef82c0ce` is reproduced bit-for-bit by a dump that stopped after 5 complete
86-frames and 13 320 192 of frame 5's 18 524 160 bytes** — 71.8% of one frame, with
87-frames 6–39 never written. The decode is byte-identical; only the FILESYSTEM
88-differs. This is the same class the brief already flagged ("a differing hash
89-between runs can be a timeout with no dump at all"), one size up: not an absent
90-dump but a **partial** one.
91-
92-Corroborating mechanisms, each demonstrated with a byte-identical decode and a
93-different hash:
94-
95-* **`RLIMIT_FSIZE`** caps a file's size; `sigXFSZ` ignored, the write fails
96- cleanly past the cap. `reelb_rect64` at a 4 MiB cap: `788d3be08ae5112e` for both
97- plain and sentinel, versus `5350cd5569d226eb` uncapped. Same decode, different
98- hash.
99-* **A reused dump directory** keeps the tail files of any fixture that wrote more
100- frames earlier. `reelb_arf_witness` into a directory `reelb_head_mvclamp_witness`
101- (55 frames) had written leaves 55 files and hashes `9ca5c4d7af` — a value no
102- single decode produces.
103-* **Hashing the `sha256sum` LISTING** rather than the bytes embeds the directory
104- path, so two byte-identical dumps in differently-named directories hash
105- differently (`8d7a43bc5f` vs `be6ca147a7` for the same content).
106-
107-`reelb_rect64`'s `0ee1edf403` is **not** reproduced by any of these. Swept and ruled
108-out: every numeric prefix and every prefix-plus-page-truncated tail at 4 KiB and
109-512 B granularity, prefixes built from either fixture (rect64 is a 34-frame
110-prefix of arf's 40 with byte-identical frames 0–33), hole shapes (one truncated
111-frame among a complete set), zero-length-frame shapes, stale cross-fixture
112-directory mixes in both orders, and the listing shape. Whatever produced that one
113-value, it is not the decode: §4 shows the decode's output is invariant under
114-every ambient content available to test.
115-
116-## 4. The instrument with the blind spot is the CENSUS, and here is exactly where
117-
118-The refusal lane's `census_unwritten` scans the three planes at each frame's
119-**pre-deblock** point. That is a real blind spot, and it is demonstrable on the
120-one fixture where a hole genuinely reaches the output.
121-
122-Stage-by-stage on `440_request_is_422` (8-bit 64×64, a 4:2:2 sequence header over
123-a 4:2:0 tile — lane/av1unwritten's witness, which main still decodes), comparing
124-an uninitialised run against a `PLANE_SENTINEL`-filled one:
125-
126-| stage dump | bytes | plain vs sentinel |
80+The campaign's value is reproduced **bit-for-bit** by a byte stream that is frames
81+0–4 complete plus 13 320 192 bytes of frame 5 (71.8% of one frame), frames 6–39
82+absent. `EC_AV1_FINAL_DUMP` does `let _ = f.write_all(&buf)`, so a full filesystem
83+leaves a prefix of the true stream and nothing reports it.
84+
85+**This pins the byte content and the shape, not the mechanism.** An unlived
86+sentinel, a timeout-killed process, and a full filesystem all leave the same
87+bytes. The wording is therefore *consistent with* a truncated dump, and the
88+converse — that the decode is innocent — rests on §2's invariance, not on this
89+match. Corroborating but likewise non-conclusive: `RLIMIT_FSIZE` at a 4 MiB cap
90+gives `788d3be08ae5112e` for both fills vs `5350cd5569d226eb` uncapped; a reused
91+dump directory leaves a longer fixture's tail (`9ca5c4d7af`); hashing the
92+`sha256sum` listing embeds the directory path.
93+
94+`0ee1edf403` is **not** reproduced by any shape swept (every numeric prefix;
95+every prefix + page-truncated tail at 4 KiB and 512 B; prefixes from either
96+fixture, since rect64 is a 34-frame prefix of arf's 40 with byte-identical frames
97+0–33; hole shapes; zero-length-frame shapes; stale cross-fixture mixes both
98+orders; the listing shape). It remains an **open instrument-hygiene question**,
99+not a decode question — the decode is invariant (§2).
100+
101+## 4. The instrument defect, and the corrected measurement
102+
103+**Class: `diagnostic-dump-assumes-one-subsampling`** — a debug/instrumental dump
104+that derives a plane's extent from an assumed subsampling rather than the
105+sequence's, so part of the plane is absent from the measurement and conclusions
106+drawn from that measurement are about the dump. Same per-axis family as the
107+decoder's own `round_ss(dim, ss)` rule.
108+
109+`decode.rs`, `dump_stage16`, cropped chroma as `(fw.div_ceil(2), fh.div_ceil(2))`
110+— the 4:2:0 assumption on both axes. The oracle's rung 1 uses libaom's
111+`uv_crop_width` / `uv_crop_height`, which are per-axis. Fixed to
112+`(round_ss(fw, ss_x), round_ss(fh, ss_y))`, with all six call sites passing
113+`ss_x(fctx)` / `ss_y(fctx)`.
114+
115+**Corrected stage bisect on `440_request_is_422`** (8-bit, 64×64, 4:2:2 header
116+over a 4:2:0 tile; `main` = `e45cc748` refuses it, so this is measured on the
117+branch point `8d6998d7`):
118+
119+| stage dump | before the fix | after the fix |
127120 |---|---|---|
128-| `EC_AV1_PREFILT_DUMP16` (pre-deblock, where the census runs) | 12 288 | **IDENTICAL** |
129-| `EC_AV1_POSTDEBLOCK_DUMP16` | 12 288 | DIFFERS (26 bytes) |
130-| `EC_AV1_POSTCDEF_DUMP16` | 12 288 | DIFFERS (26 bytes) |
131-| `EC_AV1_DECODE_ORDER_DUMP` | 8 192 | DIFFERS (1 985 bytes) |
132-| `EC_AV1_FINAL_DUMP` | 8 192 | DIFFERS (1 986 bytes) |
133-
134-So the pre-deblock census sees **zero** unwritten samples and byte-identical
135-planes, and the dependence is nevertheless in the output. **Deblock creates it**:
136-it reads a neighbouring sample to decide an edge (`aom_lpf_*` masks and
137-thresholds), so an unwritten sample changes its neighbour's *filtered* value even
138-though the unwritten sample itself is overwritten a moment later. A scan taken
139-before the filter cannot see that, by construction.
140-
141-An exact u16 census at the pre-deblock point confirms the zero rather than
142-inferring it: `EC_AV1_PREFILT_DUMP16` under `EC_AV1_PLANE_SENTINEL=1`, whole
143-file, `0xDEAD` counted per frame — 0 on every frame of all three fixtures.
144-
145-**The fix (§5) is to also take the census where the output is taken.** A census
146-there reports 32 unwritten samples on this witness and 0 on every clean fixture.
147-
148-### Displayed vs hidden, per fixture
149-
150-`reelb_arf_witness`: 40 decode-order frames, 19 shown, 21 hidden alt-refs, plus 18
151-`show_existing_frame` headers. `reelb_rect64_intra16x4_witness`: 34 decode-order
152-frames, 17 shown, 17 hidden, plus 16 `show_existing_frame`. (Header counts from
153-`EC_PROBE_HDR=1`; the show/hidden split is per non-`show_existing` header.)
154-
155-**Answer to the campaign's question: no unwritten sample reaches a DISPLAYED
156-frame on either fixture — because no unwritten sample reaches the output at all,
157-displayed or hidden.** Every one of the 34 / 40 frames, hidden alt-refs included,
158-hashes identically under plain, sentinel, and five ambient contents. The hidden
159-frames matter to the question precisely because they are the ones a shown-only
160-gate never looks at; here they are clean too, which is why the film fixtures'
161-existing pixel-exactness gates are not exposed by this.
162-
163-The only fixture in the corpus where a hole reaches the output is the 4:2:2
164-witness, whose single frame is SHOWN (`Key show=true`), and whose cause is the
165-invalid subsize that lane/av1unwritten refuses. That lane owns the cause; this
166-lane touches nothing in it (see §7).
167-
168-## 5. The fix and the gate
169-
170-`crates/ec-av1/src/decode.rs`:
171-
172-* `PLANE_SENTINEL` census **at the output point** — `census_unwritten_final(y, u, v)`
173- counts, over the three planes as they are about to be stored into the reference
174- slots, how many samples still hold `PLANE_SENTINEL` once every filter has run.
175- Those planes are already cropped to the true extent at this point, so a flat
176- count over each IS the true-extent count. Env-gated on the same flag as the
177- fill (the fill and the census must agree on when they are live).
178-* `FINAL_UNWRITTEN_SAMPLES`, a process-global counter, and
179- `take_final_unwritten_samples()` to read and clear it — process-global rather
180- than thread-local because the gate reads it from a different thread than the one
181- that scanned.
182-
183-`crates/ec-av1/src/stream.rs`: the census is called beside the `EC_AV1_FINAL_DUMP`
184-site — the same point, the same planes, so the claim it supports is literally
185-"no sample the tile walk never wrote survives into the frame the caller receives".
186-
187-The gate `the_frame_the_caller_receives_carries_no_unwritten_plane_sample`
188-(`crates/ec-av1/src/stream.rs`) asserts, in this order:
189-
190-1. **non-vacuity first**: the census reports **> 0** on `440_request_is_422`
191- (measured 32). A census that read zero everywhere would fail here, so every
192- zero below means something;
193-2. **0** on `reelb_arf_witness` (37 shown frames), `reelb_rect64_intra16x4_witness` (33),
194- `gm_small_side_witness` (33), `reelc_sb128_inter_witness` (15) — the real film
195- streams with hidden alt-refs, the only shapes where a hidden frame's hole
196- could reach a later displayed frame through the reference bank.
197-
198-The fill is env-gated and this crate forbids `set_var` (`envflags`), so the
199-measurement runs in a child process (`uwdep_child_unwritten_census`) that the
200-parent invokes by name; the parent asserts the child's reported count. The child
201-asserts `EC_AV1_PLANE_SENTINEL` is set, so a run where the fill was not live
202-fails rather than reporting a meaningless zero.
121+| `EC_AV1_PREFILT_DUMP16` (pre-deblock) | 12 288 B, **IDENTICAL** | 16 384 B, **DIFFERS (2158 B)** |
122+| `EC_AV1_POSTDEBLOCK_DUMP16` | 12 288 B, DIFFERS (26 B) | 16 384 B, DIFFERS (2017 B) |
123+| `EC_AV1_POSTCDEF_DUMP16` | 12 288 B, DIFFERS (26 B) | 16 384 B, DIFFERS (1948 B) |
124+| `EC_AV1_DECODE_ORDER_DUMP` | 8 192 B, DIFFERS (1985 B) | 8 192 B, DIFFERS (1917 B) |
125+| `EC_AV1_FINAL_DUMP` | 8 192 B, DIFFERS (1986 B) | 8 192 B, DIFFERS (1986 B) |
126+
127+12 288 B = 6144 samples = 4096 luma + 2×1024: only chroma rows 0–31. The frame the
128+caller receives is 8192 samples. **The 2048 missing chroma samples are the
129+region r2's conclusion was drawn from.**
130+
131+**Coordinates, from the corrected pre-deblock dump** (8192 samples, u16, whole
132+plane, `0xDEAD` counted):
133+
134+* unwritten samples, sentinel run: **U 112, V 112, Y 0** — U and V rows 36–63
135+ (16 distinct rows), cols 0–15, in whole 4×4 groups (row 36: cols 0–3 and
136+ 12–15). **224 total, which is exactly lane/av1unwritten's own census number**
137+ (`lanes/av1unwritten.report.md:152-156`).
138+* plain vs sentinel differing samples, pre-deblock: **U 1004 of 2048, V 1004 of
139+ 2048, Y 0**, rows 32–63 — the hole plus everything predicted from it.
140+
141+So the corrected conclusion is the opposite of r2's: the difference is **already
142+present before deblock**; no filter creates it. r2's "Deblock creates it" was an
143+artefact of the dump it could not see past.
144+
145+**And the census was never blind.** It runs at pre-deblock and it reports the
146+hole — 224 samples, in whole 4×4 chroma blocks. What could not see it was the
147+stage dump. On the hg fixtures both report 0.
148+
149+## 5. Displayed vs hidden, per fixture
150+
151+`reelb_arf_witness`: 40 decode-order frames — 19 shown, 21 hidden alt-refs, plus 18
152+`show_existing_frame` headers. `reelb_rect64_intra16x4_witness`: 34 — 17 shown, 17
153+hidden, plus 16 `show_existing_frame`. (From `EC_PROBE_HDR=1`; the split is over
154+non-`show_existing` headers.)
155+
156+**No unwritten sample reaches a DISPLAYED frame on either fixture — or a hidden
157+one.** Every one of the 34/40 frames hashes identically under plain, sentinel,
158+five ambient fills, four thread counts and in-process poisoning, and both the
159+pre-deblock census and the new output-point census report 0. The hidden frames
160+were measured specifically because they are the route by which a hole would reach
161+a later displayed frame through the reference bank; they are clean.
162+
163+The one fixture where a hole does reach output is the 4:2:2 witness, whose single
164+frame is **SHOWN** (`Key show=true`), with 224 unwritten chroma samples. Its
165+cause is the invalid subsize `main` now refuses; that lane owns it and is
166+untouched here.
167+
168+## 6. The fix and the gate
169+
170+`decode.rs`: `census_unwritten_final` + `take_final_unwritten_samples` — a census
171+over the three planes at the point they are stored into the reference slots, with
172+`dump_stage16`'s chroma extent made per-axis.
173+
174+`stream.rs`: the census is called beside the `EC_AV1_FINAL_DUMP` site.
175+
176+**SCOPE, stated not implied:** that point is **before `apply_grain`**, so the
177+claim is over the **pre-grain** planes. That is also the claim that matters
178+most — those exact bytes are what the reference bank stores and what every later
179+frame predicts from, and grain synthesises from the pre-grain frame plus the
180+grain parameters without reading the plane buffer. "The caller's final grained
181+picture has no hole" is **not** claimed and is not asserted.
182+
183+Gate `the_frame_the_caller_receives_carries_no_unwritten_plane_sample`:
184+
185+1. **non-vacuity first, and SYNTHETIC**: the census is handed planes carrying
186+ exactly 7 sentinel samples and must report exactly 7. No fixture is involved,
187+ so it cannot be affected by `main` refusing `440_request_is_422` — which is
188+ what r2's fixture-carried control would have done on merge;
189+2. **0** on `reelb_arf_witness`, `reelb_rect64_intra16x4_witness`, `gm_small_side_witness`,
190+ `reelc_sb128_inter_witness` — the real 10-bit streams with hidden alt-refs.
191+
192+The fill is env-gated and this crate forbids `set_var`, so the measurement runs
193+in a child process the parent invokes by name; the child asserts
194+`EC_AV1_PLANE_SENTINEL` is set, so a non-live fill fails rather than reporting a
195+meaningless zero.
196+
197+**Merge proof — green on a tree containing both lanes.** `main` = `e45cc748`
198+merged into this branch (`c62eeda9`), then:
203199
204200 ```
205-$ cargo test -p ec-av1 --lib -- the_frame_the_caller_receives_carries_no_unwritten_plane_sample
206-test stream::tests::the_frame_the_caller_receives_carries_no_unwritten_plane_sample ... ok
207-test result: ok. 1 passed; 0 failed; 0 ignored; 813 filtered out; finished in 66.06s
201+$ CARGO_TARGET_DIR=.../uwdep-merge cargo test -p ec-av1 --lib -- the_frame_the_caller_receives_carries_no_unwritten_plane_sample
202+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 816 filtered out; finished in 71.58s
208203 ```
209204
210-Measured census, all five fixtures, provenance-verified probe:
211-
212-```
213-440_request_is_422 FINAL_UNWRITTEN 32 frames=1 <- control, non-zero
214-reelb_arf_witness FINAL_UNWRITTEN 0 frames=37
215-reelb_rect64_intra16x4_witness FINAL_UNWRITTEN 0 frames=33
216-gm_small_side_witness FINAL_UNWRITTEN 0 frames=33
217-reelc_sb128_inter_witness FINAL_UNWRITTEN 0 frames=15
218-```
205+816 filtered (vs 813 on the branch point) — the merged tree's extra tests are
206+present, so this is the gate running against both lanes' content, not one.
219207
220-### Mutations — three, all red
208+### Mutations
221209
222210 | mutation | result |
223211 |---|---|
224-| `census_unwritten_final` neutered (`if true { return; }`) | RED at the non-vacuity control: "the census reports 0 even on the one fixture whose output DOES depend on unwritten plane memory" |
212+| `census_unwritten_final` neutered (`if true { return; }`) | **RED**: "the census reported 0 for planes carrying exactly 7 sentinel samples … (class: census-silently-blind)" |
225213 | the `census_unwritten_final` call removed from the output point | RED at the same control |
226-| one sentinel sample forced into a film frame's output (`EC_AV1_UWDEP_MUT_HOLE=1`, `p.y[0] = 0xDEAD`) | RED on the fixture itself: "reelb_arf_witness hands the caller 40 samples the tile walk never wrote (class: a hole the loop filter read)" |
214+| one sentinel sample forced into a film frame's output (`p.y[0] = 0xDEAD`) | RED on the fixture: "reelb_arf_witness hands the caller N samples the tile walk never wrote" |
227215
228-The third is the one that matters: it shows the gate bites on a hole of **one
229-sample in one frame** on a stream that otherwise decodes perfectly, which is
230-exactly the class the pre-deblock census missed.
216+The first is the non-vacuity proof in the same run, and it no longer depends on
217+any fixture's decode behaviour.
231218
232-## 6. Commands
219+## 7. Commands
233220
234221 ```bash
235-# provenance
236222 cd /home/user/.cache/wt/unwrittendep
237-CARGO_TARGET_DIR=/home/user/.cache/tgt/uwdep-k9 cargo build -p ec-av1 --example decode_probe
238-strings /home/user/.cache/tgt/uwdep-k9/debug/examples/decode_probe | grep -o 'wt/[a-z]*'
239-
240-# reproduction: 3 plain + 2 sentinel, per-frame size asserted, per-frame hash
241-# (frame = 18524160 bytes; the campaign's plain values reproduce exactly)
242-# stage bisect that names the blind spot
243-python3 /tmp/unwritten/stages.py 440_request_is_422
244-# EC_AV1_PREFILT_DUMP16 12288 bytes IDENTICAL
245-# EC_AV1_POSTDEBLOCK_DUMP16 12288 bytes DIFFERS (26 bytes)
246-# EC_AV1_DECODE_ORDER_DUMP 8192 bytes DIFFERS (1985 bytes)
247-# EC_AV1_FINAL_DUMP 8192 bytes DIFFERS (1986 bytes)
248-# the campaign's sentinel hash, reproduced as a truncated dump
249-python3 /tmp/unwritten/partial.py reelb_arf_witness # MATCH: 0..4 + f5 cut to 13320192 bytes
250-# the gate
223+git merge e45cc748 # merge proof tree
224+CARGO_TARGET_DIR=... cargo build -p ec-av1 --example decode_probe
225+strings .../decode_probe | grep -o 'wt/[a-z]*' # provenance
226+
227+python3 /tmp/unwritten/coords.py # corrected coordinates (§4)
228+bash /tmp/unwritten/determinism.sh "440_request_is_422 reelb_rect64_intra16x4_witness reelb_arf_witness" 5
229+python3 /tmp/unwritten/partial.py reelb_arf_witness # the 97ef82c0ce shape
251230 cargo test -p ec-av1 --lib -- the_frame_the_caller_receives_carries_no_unwritten_plane_sample
252231 ```
253232
254-## 7. Disposition of the campaign's two rows
255-
256-* **`reelb_arf_witness` — closed, not a defect.** Output is invariant under the
257- sentinel, five `MALLOC_PERTURB_` values, four thread counts, and in-process
258- allocator poisoning. The reported divergence is reproduced exactly as a
259- **truncated dump** (`97ef82c0ce`), which the fix to the dump path must not be
260- mistaken for a decode difference: the dump site still ignores its write error,
261- and that is a property of the INSTRUMENT. This lane does not change the dump
262- site (the brief scopes the fix to the walk / the pre-read write), and the gate
263- in §5 makes the *decoder* claim checkable regardless.
264-* **`reelb_rect64_intra16x4_witness` — closed, not a defect, cause not identified.**
265- Same invariance, same gate coverage. Its campaign sentinel value
266- (`0ee1edf403`) is not reproduced by any dump-artefact shape swept (§3) and
267- not by the decode (§4); it is unexplained. Named as an open measurement
268- question, not a defect.
269-* **`440_request_is_422` — not this lane's to fix.** Its 32 unwritten samples and
270- the loop-filter read are measured and gated here as the non-vacuity control;
271- the CAUSE is the invalid subsize lane/av1unwritten refuses, and that lane owns
272- it.
273-
274-Untouched, as instructed: `film_grain.rs`, the reserved 4:2:0 group-tail chroma
275-SKIP arm, `decode_rect4_16_intrabc`, and anything on `lane/av1unwritten` (its
276-`census_unwritten` and the two dump-adjacent hunks in `decode.rs` were read, not
277-written; this lane's changes are a new function above `fresh_plane`, one call
278-beside the final-dump site, and the two new tests).
279-
280-## 8. What this lane did not do
281-
282-* The dump sites still swallow their write errors. A short dump is the artefact
283- that produced this whole question, and the honest fix is to make a partial
284- write loud (`assert_eq!` on the written length, or write-then-verify). That is
285- an instrument change touching every dump in the crate, beyond this lane's
286- scope, and it needs its own mutation proof. **Named, not done.**
287-* `0ee1edf403` is unexplained (§3).
288-* No pixel claim is made or unmade for any fixture. The gate claims only that no
289- unwritten sample reaches the frame the caller receives.
233+## 8. Disposition
234+
235+* **`reelb_arf_witness` — closed, not a decoder defect.** Output invariant under
236+ every ambient content tested (§2); the campaign's divergence is *consistent
237+ with* a truncated dump (§3), and the decode is innocent on the invariance
238+ evidence, not on the hash match.
239+* **`reelb_rect64_intra16x4_witness` — closed, not a decoder defect; its campaign
240+ sentinel value `0ee1edf403` remains an OPEN instrument-hygiene question** (§3).
241+* **`440_request_is_422` — measured and gated, not fixed here.** 224 unwritten
242+ chroma samples, pre-deblock, whole 4×4 blocks; cause is the invalid subsize
243+ `main` refuses (lane/av1unwritten, untouched).
244+* **The `dump_stage16` per-axis extent is fixed** (§4) — the class is
245+ `diagnostic-dump-assumes-one-subsampling`.
246+
247+## 9. What this lane did not do
248+
249+* **The unswept family, now swept**: r2 did not run-to-run content
250+ nondeterminism with uninitialised planes — the family
251+ `lanes/av1unwritten.report.md:118-124` records as three different plain hashes
252+ of 440 from three identical invocations. A sentinel run structurally cannot
253+ detect it (it pins content to one value), and r2's in-process test could not
254+ (one process, one heap). N separate processes are required; the result is in
255+ §10. **I had not swept it in r2 and said nothing about it — that was a gap, not
256+ a negative result.**
257+* The dump sites still swallow their write errors, so a short dump remains
258+ possible — the artefact behind §3. Making a partial write loud is an
259+ instrument change touching every dump in the crate; named, not done.
260+* No pixel claim is made or unmade for any fixture.
261+* Untouched per instructions: `film_grain.rs`, the reserved 4:2:0 group-tail
262+ chroma SKIP arm, `decode_rect4_16_intrabc`, and `lane/av1unwritten`'s content
263+ (read-only).
264+
265+## 10. The run-to-run nondeterminism family, swept
266+
267+N separate PROCESSES (not one process -- an in-process test cannot see this, it
268+has one heap), uninitialised planes, per-run decode-order concatenation hashed,
269+exact frame size asserted:
270+
271+```
272+=== 440_request_is_422 frames=0 (main = e45cc748 REFUSES it; not sweepable on the merge tree)
273+=== reelb_rect64_intra16x4_witness
274+5350cd5569d226eb frames=34 sizes=[18524160]
275+5350cd5569d226eb frames=34 sizes=[18524160]
276+5350cd5569d226eb frames=34 sizes=[18524160]
277+5350cd5569d226eb frames=34 sizes=[18524160]
278+=== reelb_arf_witness
279+dca5b3d9d2d56f30 frames=40 sizes=[18524160]
280+dca5b3d9d2d56f30 frames=40 sizes=[18524160]
281+dca5b3d9d2d56f30 frames=40 sizes=[18524160]
282+dca5b3d9d2d56f30 frames=40 sizes=[18524160]
283+```
284+
285+**Negative for both hg fixtures: 4/4 identical, correct size, no spread.** This
286+is the family a sentinel run structurally cannot detect (it pins content to one
287+value), and it is independent of the sentinel evidence in section 2.
288+
289+`440_request_is_422` **could not be swept on the merge tree** -- `main` = `e45cc748`
290+refuses it, which is the refusal working as intended. On the branch point
291+`8d6998d7` I measured 3 identical plain hashes (`a761118c8dd5c8d0`), i.e. I did
292+**not** reproduce the three-distinct-hashes observation at
293+`lanes/av1unwritten.report.md:118-124`. That is consistent rather than
294+contradictory: the witness's output depends on ambient memory, and what the
295+allocator hands back is machine- and run-dependent, so a fixed value on one host
296+and a varying one on another are the same defect. **Stated as measured: 3/3
297+identical here, and no claim about reproducing their observation.**