diff --git a/lanes/unwritten-dep.report.md b/lanes/unwritten-dep.report.md index b56490ff..4f147866 100644 --- a/lanes/unwritten-dep.report.md +++ b/lanes/unwritten-dep.report.md @@ -1,289 +1,297 @@ -# lane/unwritten-dep — the reelb_* divergence is a TRUNCATED DUMP, and the census's blind spot is the loop filter +# lane/unwritten-dep — the reelb_* rows are not decoder defects; the instrument that lied is `dump_stage16` **Outcome in one line: neither `reelb_rect64_intra16x4_witness.obu` nor -`reelb_arf_witness.obu` output depends on unwritten plane content on `8d6998d7` — -the campaign's sentinel hash is reproduced EXACTLY by a run whose filesystem ran -out of space mid-write (`97ef82c0ce` = frames 0–4 complete plus 13 320 192 bytes -of frame 5, hashed `cat dir/frame.f*`-style); and the census's real blind spot is -named and fixed: it runs at PRE-DEBLOCK, while deblock READS neighbours to decide -an edge, so a hole can be invisible there and still change the output. A -post-filter census, taken at the exact point `EC_AV1_FINAL_DUMP` writes, reports -32 unwritten samples on the 4:2:2 witness (non-vacuity control) and 0 on all -four film fixtures.** - -Branch `lane/unwritten-dep`, base `main` = `8d6998d7`. No push. - ---- +`reelb_arf_witness.obu` output depends on unwritten plane content; the census was +never blind — `dump_stage16` was, because it hardcoded a 4:2:0 chroma extent and +on a 4:2:2 frame wrote half of each chroma plane into no dump at all, which +fabricated the "identical pre-deblock, differs post-deblock" attribution; with +per-axis extents the 4:2:2 witness shows 224 unwritten samples pre-deblock +(exactly lane/av1unwritten's own number), so the difference is present BEFORE any +filter runs. The gate's non-vacuity control is now synthetic and survives +`main`'s refusal of the only fixture that had one.** + +Branch `lane/unwritten-dep`. Base `8d6998d7`, **rebased by merging +`main` = `e45cc748` locally** (commit `c62eeda9`) — the merge proof the +acceptance asked for is this lane's own tree; no rebase onto a different base, +the merge keeps `8d6998d7` as the branch point. + +> **r3 correction, on top of r2.** r2 named the census as the blind instrument and +> attributed the 4:2:2 witness's divergence to deblock. Both were wrong, and r2's +> own numbers refuted them: its `EC_AV1_DEBUG_SKIP_DEBLOCK` result did not remove +> the difference, and 32 surviving sentinel samples cannot explain 1986 +> differing bytes. The cause is r2's own unexamined instrument. +> `dump_stage16` (`decode.rs`) cropped chroma as `(fw/2, fh/2)` — a 4:2:0 +> assumption — so on a 64×64 **4:2:2** frame (ss_x=1, ss_y=0) it wrote 32×32 +> chroma where the frame carries 32×64. **2048 chroma samples appeared in no +> stage dump at all**, and they are exactly the region where the difference +> lives. r2 read the dump's blind spot as a pipeline property. With per-axis +> extents the pre-deblock dump is where the difference *starts*. ## 1. Provenance -The probe was built in this lane's own worktree with its own target dir, and its -embedded paths name only this worktree: +Built in this lane's worktree with its own target dir; the binary's embedded +paths name only this worktree. ``` -$ cd /home/user/.cache/wt/unwrittendep -$ CARGO_TARGET_DIR=/home/user/.cache/tgt/uwdep-k9 cargo build -p ec-av1 --example decode_probe -$ strings /home/user/.cache/tgt/uwdep-k9/debug/examples/decode_probe | grep -o "wt/[a-zA-Z0-9_-]*" | sort -u +$ CARGO_TARGET_DIR=/home/user/.cache/tgt/uwdep-merge cargo build -p ec-av1 --example decode_probe +$ strings .../decode_probe | grep -o 'wt/[a-zA-Z0-9_-]*' | sort -u wt/unwrittendep -$ git rev-parse HEAD -8d6998d7cbafa1a7a5271e0d638365890a4b4310 ``` -Two traps in the brief were live and are worth recording because both produce a -*silent* wrong reading: - -* the first build's target dir (`/home/user/.cache/tgt/unwrittendep`) was - **deleted underneath this lane mid-run**; every binary whose path is quoted in - this report is under `uwdep-k9`, built and used after that; -* `/tmp` is a 16 GB tmpfs that ran at 80% during the first sweep and silently - produced **short** dump files (sizes 0, 7 553 024, 4194304 instead of - 18 524 160) — those runs are excluded below and every retained run asserts - the exact expected frame size. +Two live traps, both of which produce a *silent* wrong reading: this lane's first +target dir was deleted underneath it mid-run (hence `uwdep-k9` → `uwdep-merge`), +and `/tmp` is a 16 GB tmpfs that filled during the first sweep and produced +short/zero-length dump files. Every retained run asserts the exact expected +frame size; the 10-bit fixtures' frame is 18 524 160 bytes. -Fixtures, byte-identical to what the campaign measured: -`reelb_arf_witness.obu` 32 126 bytes sha256 `7f3b060da5aa9c53…`, -`reelb_rect64_intra16x4_witness.obu` 23 472 bytes sha256 `c9e721088766163b…`. +Fixtures: `reelb_arf_witness.obu` 32 126 B sha256 `7f3b060da5aa9c53…`, +`reelb_rect64_intra16x4_witness.obu` 23 472 B sha256 `c9e721088766163b…`. -Both fixtures are 10-bit 3840×1608, so `EC_AV1_FINAL_DUMP` writes u16 LE and one -frame is exactly `(3840*1608 + 2*1920*804) * 2 = 18 524 160` bytes. Every run -below asserts that size. +## 2. Reproduction -## 2. Reproduction — and the result is NOT the campaign's +Hash shape `cat dir/frame.f*` (lexicographic), 3 plain + 2 sentinel runs: -`EC_AV1_FINAL_DUMP` writes `.f` per decode-order frame. Hashing the -concatenation in the order a shell glob produces (`cat dir/frame.f*`, i.e. -lexicographic) is the shape that reproduces the campaign's numbers exactly: - -| fixture | plain run | sentinel run | campaign plain | campaign sentinel | +| fixture | plain | sentinel | campaign plain | campaign sentinel | |---|---|---|---|---| | `reelb_rect64_intra16x4_witness` (34 frames) | `a26438168c` ×3 | `a26438168c` ×2 | `a26438168c` | `0ee1edf403` | | `reelb_arf_witness` (40 frames) | `8d7a43bc5f` ×3 | `8d7a43bc5f` ×2 | `8d7a43bc5f` | `97ef82c0ce` | -**Both campaign PLAIN values reproduce exactly. Neither SENTINEL value does.** -Plain is stable across repeats and across five different ambient contents -(glibc `MALLOC_PERTURB_` ∈ {0, 1, 85, 170, 254} — every fresh allocation filled -with that byte), across `EC_AV1_THREADS` ∈ {1, 2, 4, 8}, and in-process with the -allocator's free list deliberately poisoned (§4). Under every one of those the -sentinel run is byte-identical to the plain run, all 34 / all 40 frames. +**Both campaign PLAIN values are reproduced exactly by this build; neither +SENTINEL value is.** The decode output is byte-identical plain vs sentinel, and +under every other ambient content available: glibc `MALLOC_PERTURB_` ∈ {0, 1, 85, +170, 254}, `EC_AV1_THREADS` ∈ {1, 2, 4, 8}, and in-process poisoning of the +allocator's free list with 16 MiB dirty-then-freed blocks. -## 3. What the campaign's sentinel hash actually is: a truncated dump +The in-process test is the strongest of these because there is no filesystem in +the measurement at all, and it has teeth — on the 4:2:2 witness it reports +differences under 4 of 4 poison patterns (667–715 differing U samples, +673–690 differing V, 0 in luma), while reporting **0 differing frames under 4 +of 4 patterns on both hg fixtures**. -`EC_AV1_FINAL_DUMP` ignores its write error — `let _ = f.write_all(&buf);` at -`stream.rs` (the final-dump site). A run whose filesystem fills therefore leaves -a byte stream that is a **prefix** of the true one, and nothing reports it. +## 3. `97ef82c0ce` — consistent with a truncated dump, not proven to be one -Sweeping every (frames-complete, tail-truncated) shape against the campaign's -value: +Sweeping (frames-complete, tail-truncated) shapes against the campaign's value: ``` $ python3 /tmp/unwritten/partial.py reelb_arf_witness -reelb_arf_witness: 40 frames (max index 39), hunting 97ef82c0ce MATCH: frames 0..4 + f5 truncated to 13320192 bytes, lex-hashed - 1 match(es) ``` -**`97ef82c0ce` is reproduced bit-for-bit by a dump that stopped after 5 complete -frames and 13 320 192 of frame 5's 18 524 160 bytes** — 71.8% of one frame, with -frames 6–39 never written. The decode is byte-identical; only the FILESYSTEM -differs. This is the same class the brief already flagged ("a differing hash -between runs can be a timeout with no dump at all"), one size up: not an absent -dump but a **partial** one. - -Corroborating mechanisms, each demonstrated with a byte-identical decode and a -different hash: - -* **`RLIMIT_FSIZE`** caps a file's size; `sigXFSZ` ignored, the write fails - cleanly past the cap. `reelb_rect64` at a 4 MiB cap: `788d3be08ae5112e` for both - plain and sentinel, versus `5350cd5569d226eb` uncapped. Same decode, different - hash. -* **A reused dump directory** keeps the tail files of any fixture that wrote more - frames earlier. `reelb_arf_witness` into a directory `reelb_head_mvclamp_witness` - (55 frames) had written leaves 55 files and hashes `9ca5c4d7af` — a value no - single decode produces. -* **Hashing the `sha256sum` LISTING** rather than the bytes embeds the directory - path, so two byte-identical dumps in differently-named directories hash - differently (`8d7a43bc5f` vs `be6ca147a7` for the same content). - -`reelb_rect64`'s `0ee1edf403` is **not** reproduced by any of these. Swept and ruled -out: every numeric prefix and every prefix-plus-page-truncated tail at 4 KiB and -512 B granularity, prefixes built from either fixture (rect64 is a 34-frame -prefix of arf's 40 with byte-identical frames 0–33), hole shapes (one truncated -frame among a complete set), zero-length-frame shapes, stale cross-fixture -directory mixes in both orders, and the listing shape. Whatever produced that one -value, it is not the decode: §4 shows the decode's output is invariant under -every ambient content available to test. - -## 4. The instrument with the blind spot is the CENSUS, and here is exactly where - -The refusal lane's `census_unwritten` scans the three planes at each frame's -**pre-deblock** point. That is a real blind spot, and it is demonstrable on the -one fixture where a hole genuinely reaches the output. - -Stage-by-stage on `440_request_is_422` (8-bit 64×64, a 4:2:2 sequence header over -a 4:2:0 tile — lane/av1unwritten's witness, which main still decodes), comparing -an uninitialised run against a `PLANE_SENTINEL`-filled one: - -| stage dump | bytes | plain vs sentinel | +The campaign's value is reproduced **bit-for-bit** by a byte stream that is frames +0–4 complete plus 13 320 192 bytes of frame 5 (71.8% of one frame), frames 6–39 +absent. `EC_AV1_FINAL_DUMP` does `let _ = f.write_all(&buf)`, so a full filesystem +leaves a prefix of the true stream and nothing reports it. + +**This pins the byte content and the shape, not the mechanism.** An unlived +sentinel, a timeout-killed process, and a full filesystem all leave the same +bytes. The wording is therefore *consistent with* a truncated dump, and the +converse — that the decode is innocent — rests on §2's invariance, not on this +match. Corroborating but likewise non-conclusive: `RLIMIT_FSIZE` at a 4 MiB cap +gives `788d3be08ae5112e` for both fills vs `5350cd5569d226eb` uncapped; a reused +dump directory leaves a longer fixture's tail (`9ca5c4d7af`); hashing the +`sha256sum` listing embeds the directory path. + +`0ee1edf403` is **not** reproduced by any shape swept (every numeric prefix; +every prefix + page-truncated tail at 4 KiB and 512 B; prefixes from either +fixture, since rect64 is a 34-frame prefix of arf's 40 with byte-identical frames +0–33; hole shapes; zero-length-frame shapes; stale cross-fixture mixes both +orders; the listing shape). It remains an **open instrument-hygiene question**, +not a decode question — the decode is invariant (§2). + +## 4. The instrument defect, and the corrected measurement + +**Class: `diagnostic-dump-assumes-one-subsampling`** — a debug/instrumental dump +that derives a plane's extent from an assumed subsampling rather than the +sequence's, so part of the plane is absent from the measurement and conclusions +drawn from that measurement are about the dump. Same per-axis family as the +decoder's own `round_ss(dim, ss)` rule. + +`decode.rs`, `dump_stage16`, cropped chroma as `(fw.div_ceil(2), fh.div_ceil(2))` +— the 4:2:0 assumption on both axes. The oracle's rung 1 uses libaom's +`uv_crop_width` / `uv_crop_height`, which are per-axis. Fixed to +`(round_ss(fw, ss_x), round_ss(fh, ss_y))`, with all six call sites passing +`ss_x(fctx)` / `ss_y(fctx)`. + +**Corrected stage bisect on `440_request_is_422`** (8-bit, 64×64, 4:2:2 header +over a 4:2:0 tile; `main` = `e45cc748` refuses it, so this is measured on the +branch point `8d6998d7`): + +| stage dump | before the fix | after the fix | |---|---|---| -| `EC_AV1_PREFILT_DUMP16` (pre-deblock, where the census runs) | 12 288 | **IDENTICAL** | -| `EC_AV1_POSTDEBLOCK_DUMP16` | 12 288 | DIFFERS (26 bytes) | -| `EC_AV1_POSTCDEF_DUMP16` | 12 288 | DIFFERS (26 bytes) | -| `EC_AV1_DECODE_ORDER_DUMP` | 8 192 | DIFFERS (1 985 bytes) | -| `EC_AV1_FINAL_DUMP` | 8 192 | DIFFERS (1 986 bytes) | - -So the pre-deblock census sees **zero** unwritten samples and byte-identical -planes, and the dependence is nevertheless in the output. **Deblock creates it**: -it reads a neighbouring sample to decide an edge (`aom_lpf_*` masks and -thresholds), so an unwritten sample changes its neighbour's *filtered* value even -though the unwritten sample itself is overwritten a moment later. A scan taken -before the filter cannot see that, by construction. - -An exact u16 census at the pre-deblock point confirms the zero rather than -inferring it: `EC_AV1_PREFILT_DUMP16` under `EC_AV1_PLANE_SENTINEL=1`, whole -file, `0xDEAD` counted per frame — 0 on every frame of all three fixtures. - -**The fix (§5) is to also take the census where the output is taken.** A census -there reports 32 unwritten samples on this witness and 0 on every clean fixture. - -### Displayed vs hidden, per fixture - -`reelb_arf_witness`: 40 decode-order frames, 19 shown, 21 hidden alt-refs, plus 18 -`show_existing_frame` headers. `reelb_rect64_intra16x4_witness`: 34 decode-order -frames, 17 shown, 17 hidden, plus 16 `show_existing_frame`. (Header counts from -`EC_PROBE_HDR=1`; the show/hidden split is per non-`show_existing` header.) - -**Answer to the campaign's question: no unwritten sample reaches a DISPLAYED -frame on either fixture — because no unwritten sample reaches the output at all, -displayed or hidden.** Every one of the 34 / 40 frames, hidden alt-refs included, -hashes identically under plain, sentinel, and five ambient contents. The hidden -frames matter to the question precisely because they are the ones a shown-only -gate never looks at; here they are clean too, which is why the film fixtures' -existing pixel-exactness gates are not exposed by this. - -The only fixture in the corpus where a hole reaches the output is the 4:2:2 -witness, whose single frame is SHOWN (`Key show=true`), and whose cause is the -invalid subsize that lane/av1unwritten refuses. That lane owns the cause; this -lane touches nothing in it (see §7). - -## 5. The fix and the gate - -`crates/ec-av1/src/decode.rs`: - -* `PLANE_SENTINEL` census **at the output point** — `census_unwritten_final(y, u, v)` - counts, over the three planes as they are about to be stored into the reference - slots, how many samples still hold `PLANE_SENTINEL` once every filter has run. - Those planes are already cropped to the true extent at this point, so a flat - count over each IS the true-extent count. Env-gated on the same flag as the - fill (the fill and the census must agree on when they are live). -* `FINAL_UNWRITTEN_SAMPLES`, a process-global counter, and - `take_final_unwritten_samples()` to read and clear it — process-global rather - than thread-local because the gate reads it from a different thread than the one - that scanned. - -`crates/ec-av1/src/stream.rs`: the census is called beside the `EC_AV1_FINAL_DUMP` -site — the same point, the same planes, so the claim it supports is literally -"no sample the tile walk never wrote survives into the frame the caller receives". - -The gate `the_frame_the_caller_receives_carries_no_unwritten_plane_sample` -(`crates/ec-av1/src/stream.rs`) asserts, in this order: - -1. **non-vacuity first**: the census reports **> 0** on `440_request_is_422` - (measured 32). A census that read zero everywhere would fail here, so every - zero below means something; -2. **0** on `reelb_arf_witness` (37 shown frames), `reelb_rect64_intra16x4_witness` (33), - `gm_small_side_witness` (33), `reelc_sb128_inter_witness` (15) — the real film - streams with hidden alt-refs, the only shapes where a hidden frame's hole - could reach a later displayed frame through the reference bank. - -The fill is env-gated and this crate forbids `set_var` (`envflags`), so the -measurement runs in a child process (`uwdep_child_unwritten_census`) that the -parent invokes by name; the parent asserts the child's reported count. The child -asserts `EC_AV1_PLANE_SENTINEL` is set, so a run where the fill was not live -fails rather than reporting a meaningless zero. +| `EC_AV1_PREFILT_DUMP16` (pre-deblock) | 12 288 B, **IDENTICAL** | 16 384 B, **DIFFERS (2158 B)** | +| `EC_AV1_POSTDEBLOCK_DUMP16` | 12 288 B, DIFFERS (26 B) | 16 384 B, DIFFERS (2017 B) | +| `EC_AV1_POSTCDEF_DUMP16` | 12 288 B, DIFFERS (26 B) | 16 384 B, DIFFERS (1948 B) | +| `EC_AV1_DECODE_ORDER_DUMP` | 8 192 B, DIFFERS (1985 B) | 8 192 B, DIFFERS (1917 B) | +| `EC_AV1_FINAL_DUMP` | 8 192 B, DIFFERS (1986 B) | 8 192 B, DIFFERS (1986 B) | + +12 288 B = 6144 samples = 4096 luma + 2×1024: only chroma rows 0–31. The frame the +caller receives is 8192 samples. **The 2048 missing chroma samples are the +region r2's conclusion was drawn from.** + +**Coordinates, from the corrected pre-deblock dump** (8192 samples, u16, whole +plane, `0xDEAD` counted): + +* unwritten samples, sentinel run: **U 112, V 112, Y 0** — U and V rows 36–63 + (16 distinct rows), cols 0–15, in whole 4×4 groups (row 36: cols 0–3 and + 12–15). **224 total, which is exactly lane/av1unwritten's own census number** + (`lanes/av1unwritten.report.md:152-156`). +* plain vs sentinel differing samples, pre-deblock: **U 1004 of 2048, V 1004 of + 2048, Y 0**, rows 32–63 — the hole plus everything predicted from it. + +So the corrected conclusion is the opposite of r2's: the difference is **already +present before deblock**; no filter creates it. r2's "Deblock creates it" was an +artefact of the dump it could not see past. + +**And the census was never blind.** It runs at pre-deblock and it reports the +hole — 224 samples, in whole 4×4 chroma blocks. What could not see it was the +stage dump. On the hg fixtures both report 0. + +## 5. Displayed vs hidden, per fixture + +`reelb_arf_witness`: 40 decode-order frames — 19 shown, 21 hidden alt-refs, plus 18 +`show_existing_frame` headers. `reelb_rect64_intra16x4_witness`: 34 — 17 shown, 17 +hidden, plus 16 `show_existing_frame`. (From `EC_PROBE_HDR=1`; the split is over +non-`show_existing` headers.) + +**No unwritten sample reaches a DISPLAYED frame on either fixture — or a hidden +one.** Every one of the 34/40 frames hashes identically under plain, sentinel, +five ambient fills, four thread counts and in-process poisoning, and both the +pre-deblock census and the new output-point census report 0. The hidden frames +were measured specifically because they are the route by which a hole would reach +a later displayed frame through the reference bank; they are clean. + +The one fixture where a hole does reach output is the 4:2:2 witness, whose single +frame is **SHOWN** (`Key show=true`), with 224 unwritten chroma samples. Its +cause is the invalid subsize `main` now refuses; that lane owns it and is +untouched here. + +## 6. The fix and the gate + +`decode.rs`: `census_unwritten_final` + `take_final_unwritten_samples` — a census +over the three planes at the point they are stored into the reference slots, with +`dump_stage16`'s chroma extent made per-axis. + +`stream.rs`: the census is called beside the `EC_AV1_FINAL_DUMP` site. + +**SCOPE, stated not implied:** that point is **before `apply_grain`**, so the +claim is over the **pre-grain** planes. That is also the claim that matters +most — those exact bytes are what the reference bank stores and what every later +frame predicts from, and grain synthesises from the pre-grain frame plus the +grain parameters without reading the plane buffer. "The caller's final grained +picture has no hole" is **not** claimed and is not asserted. + +Gate `the_frame_the_caller_receives_carries_no_unwritten_plane_sample`: + +1. **non-vacuity first, and SYNTHETIC**: the census is handed planes carrying + exactly 7 sentinel samples and must report exactly 7. No fixture is involved, + so it cannot be affected by `main` refusing `440_request_is_422` — which is + what r2's fixture-carried control would have done on merge; +2. **0** on `reelb_arf_witness`, `reelb_rect64_intra16x4_witness`, `gm_small_side_witness`, + `reelc_sb128_inter_witness` — the real 10-bit streams with hidden alt-refs. + +The fill is env-gated and this crate forbids `set_var`, so the measurement runs +in a child process the parent invokes by name; the child asserts +`EC_AV1_PLANE_SENTINEL` is set, so a non-live fill fails rather than reporting a +meaningless zero. + +**Merge proof — green on a tree containing both lanes.** `main` = `e45cc748` +merged into this branch (`c62eeda9`), then: ``` -$ cargo test -p ec-av1 --lib -- the_frame_the_caller_receives_carries_no_unwritten_plane_sample -test stream::tests::the_frame_the_caller_receives_carries_no_unwritten_plane_sample ... ok -test result: ok. 1 passed; 0 failed; 0 ignored; 813 filtered out; finished in 66.06s +$ CARGO_TARGET_DIR=.../uwdep-merge cargo test -p ec-av1 --lib -- the_frame_the_caller_receives_carries_no_unwritten_plane_sample +test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 816 filtered out; finished in 71.58s ``` -Measured census, all five fixtures, provenance-verified probe: - -``` -440_request_is_422 FINAL_UNWRITTEN 32 frames=1 <- control, non-zero -reelb_arf_witness FINAL_UNWRITTEN 0 frames=37 -reelb_rect64_intra16x4_witness FINAL_UNWRITTEN 0 frames=33 -gm_small_side_witness FINAL_UNWRITTEN 0 frames=33 -reelc_sb128_inter_witness FINAL_UNWRITTEN 0 frames=15 -``` +816 filtered (vs 813 on the branch point) — the merged tree's extra tests are +present, so this is the gate running against both lanes' content, not one. -### Mutations — three, all red +### Mutations | mutation | result | |---|---| -| `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" | +| `census_unwritten_final` neutered (`if true { return; }`) | **RED**: "the census reported 0 for planes carrying exactly 7 sentinel samples … (class: census-silently-blind)" | | the `census_unwritten_final` call removed from the output point | RED at the same control | -| 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)" | +| 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" | -The third is the one that matters: it shows the gate bites on a hole of **one -sample in one frame** on a stream that otherwise decodes perfectly, which is -exactly the class the pre-deblock census missed. +The first is the non-vacuity proof in the same run, and it no longer depends on +any fixture's decode behaviour. -## 6. Commands +## 7. Commands ```bash -# provenance cd /home/user/.cache/wt/unwrittendep -CARGO_TARGET_DIR=/home/user/.cache/tgt/uwdep-k9 cargo build -p ec-av1 --example decode_probe -strings /home/user/.cache/tgt/uwdep-k9/debug/examples/decode_probe | grep -o 'wt/[a-z]*' - -# reproduction: 3 plain + 2 sentinel, per-frame size asserted, per-frame hash -# (frame = 18524160 bytes; the campaign's plain values reproduce exactly) -# stage bisect that names the blind spot -python3 /tmp/unwritten/stages.py 440_request_is_422 -# EC_AV1_PREFILT_DUMP16 12288 bytes IDENTICAL -# EC_AV1_POSTDEBLOCK_DUMP16 12288 bytes DIFFERS (26 bytes) -# EC_AV1_DECODE_ORDER_DUMP 8192 bytes DIFFERS (1985 bytes) -# EC_AV1_FINAL_DUMP 8192 bytes DIFFERS (1986 bytes) -# the campaign's sentinel hash, reproduced as a truncated dump -python3 /tmp/unwritten/partial.py reelb_arf_witness # MATCH: 0..4 + f5 cut to 13320192 bytes -# the gate +git merge e45cc748 # merge proof tree +CARGO_TARGET_DIR=... cargo build -p ec-av1 --example decode_probe +strings .../decode_probe | grep -o 'wt/[a-z]*' # provenance + +python3 /tmp/unwritten/coords.py # corrected coordinates (§4) +bash /tmp/unwritten/determinism.sh "440_request_is_422 reelb_rect64_intra16x4_witness reelb_arf_witness" 5 +python3 /tmp/unwritten/partial.py reelb_arf_witness # the 97ef82c0ce shape cargo test -p ec-av1 --lib -- the_frame_the_caller_receives_carries_no_unwritten_plane_sample ``` -## 7. Disposition of the campaign's two rows - -* **`reelb_arf_witness` — closed, not a defect.** Output is invariant under the - sentinel, five `MALLOC_PERTURB_` values, four thread counts, and in-process - allocator poisoning. The reported divergence is reproduced exactly as a - **truncated dump** (`97ef82c0ce`), which the fix to the dump path must not be - mistaken for a decode difference: the dump site still ignores its write error, - and that is a property of the INSTRUMENT. This lane does not change the dump - site (the brief scopes the fix to the walk / the pre-read write), and the gate - in §5 makes the *decoder* claim checkable regardless. -* **`reelb_rect64_intra16x4_witness` — closed, not a defect, cause not identified.** - Same invariance, same gate coverage. Its campaign sentinel value - (`0ee1edf403`) is not reproduced by any dump-artefact shape swept (§3) and - not by the decode (§4); it is unexplained. Named as an open measurement - question, not a defect. -* **`440_request_is_422` — not this lane's to fix.** Its 32 unwritten samples and - the loop-filter read are measured and gated here as the non-vacuity control; - the CAUSE is the invalid subsize lane/av1unwritten refuses, and that lane owns - it. - -Untouched, as instructed: `film_grain.rs`, the reserved 4:2:0 group-tail chroma -SKIP arm, `decode_rect4_16_intrabc`, and anything on `lane/av1unwritten` (its -`census_unwritten` and the two dump-adjacent hunks in `decode.rs` were read, not -written; this lane's changes are a new function above `fresh_plane`, one call -beside the final-dump site, and the two new tests). - -## 8. What this lane did not do - -* The dump sites still swallow their write errors. A short dump is the artefact - that produced this whole question, and the honest fix is to make a partial - write loud (`assert_eq!` on the written length, or write-then-verify). That is - an instrument change touching every dump in the crate, beyond this lane's - scope, and it needs its own mutation proof. **Named, not done.** -* `0ee1edf403` is unexplained (§3). -* No pixel claim is made or unmade for any fixture. The gate claims only that no - unwritten sample reaches the frame the caller receives. +## 8. Disposition + +* **`reelb_arf_witness` — closed, not a decoder defect.** Output invariant under + every ambient content tested (§2); the campaign's divergence is *consistent + with* a truncated dump (§3), and the decode is innocent on the invariance + evidence, not on the hash match. +* **`reelb_rect64_intra16x4_witness` — closed, not a decoder defect; its campaign + sentinel value `0ee1edf403` remains an OPEN instrument-hygiene question** (§3). +* **`440_request_is_422` — measured and gated, not fixed here.** 224 unwritten + chroma samples, pre-deblock, whole 4×4 blocks; cause is the invalid subsize + `main` refuses (lane/av1unwritten, untouched). +* **The `dump_stage16` per-axis extent is fixed** (§4) — the class is + `diagnostic-dump-assumes-one-subsampling`. + +## 9. What this lane did not do + +* **The unswept family, now swept**: r2 did not run-to-run content + nondeterminism with uninitialised planes — the family + `lanes/av1unwritten.report.md:118-124` records as three different plain hashes + of 440 from three identical invocations. A sentinel run structurally cannot + detect it (it pins content to one value), and r2's in-process test could not + (one process, one heap). N separate processes are required; the result is in + §10. **I had not swept it in r2 and said nothing about it — that was a gap, not + a negative result.** +* The dump sites still swallow their write errors, so a short dump remains + possible — the artefact behind §3. Making a partial write loud is an + instrument change touching every dump in the crate; named, not done. +* No pixel claim is made or unmade for any fixture. +* Untouched per instructions: `film_grain.rs`, the reserved 4:2:0 group-tail + chroma SKIP arm, `decode_rect4_16_intrabc`, and `lane/av1unwritten`'s content + (read-only). + +## 10. The run-to-run nondeterminism family, swept + +N separate PROCESSES (not one process -- an in-process test cannot see this, it +has one heap), uninitialised planes, per-run decode-order concatenation hashed, +exact frame size asserted: + +``` +=== 440_request_is_422 frames=0 (main = e45cc748 REFUSES it; not sweepable on the merge tree) +=== reelb_rect64_intra16x4_witness +5350cd5569d226eb frames=34 sizes=[18524160] +5350cd5569d226eb frames=34 sizes=[18524160] +5350cd5569d226eb frames=34 sizes=[18524160] +5350cd5569d226eb frames=34 sizes=[18524160] +=== reelb_arf_witness +dca5b3d9d2d56f30 frames=40 sizes=[18524160] +dca5b3d9d2d56f30 frames=40 sizes=[18524160] +dca5b3d9d2d56f30 frames=40 sizes=[18524160] +dca5b3d9d2d56f30 frames=40 sizes=[18524160] +``` + +**Negative for both hg fixtures: 4/4 identical, correct size, no spread.** This +is the family a sentinel run structurally cannot detect (it pins content to one +value), and it is independent of the sentinel evidence in section 2. + +`440_request_is_422` **could not be swept on the merge tree** -- `main` = `e45cc748` +refuses it, which is the refusal working as intended. On the branch point +`8d6998d7` I measured 3 identical plain hashes (`a761118c8dd5c8d0`), i.e. I did +**not** reproduce the three-distinct-hashes observation at +`lanes/av1unwritten.report.md:118-124`. That is consistent rather than +contradictory: the witness's output depends on ambient memory, and what the +allocator hands back is machine- and run-dependent, so a fixed value on one host +and a varying one on another are the same defect. **Stated as measured: 3/3 +identical here, and no claim about reproducing their observation.**