Commits
Commits on
c4b999cc9cc2da93ec20faabcbcaf121c130405a2026-10-03
lane-av1p1pin: pin the 4:4:4 sb128 128-root rect witness, gate it byte-exactAhmet Kaan Gümüş · c4b999c
lane-av1p1pin: pin the 4:4:4 sb128 128-root rect witness, gate it byte-exact Recipe P1 of lanes/av1witness2recheck.report.md was measured but never pinned: its 595 bytes lived only under /tmp. Rebuilt from the report's exact ffmpeg+aomenc lines -- sha256 68773f2c6e01a2d211bf0213479accb4c2c360132c0e1bc3b326eab7861925b1, so the recipe did not drift. Pinned as fixtures/444_sb128rect_chroma_tile_witness.obu (distinct from 444_sb128rect_lr_witness.obu) and gated by a_444_sb128_rect_chroma_tile_witness_is_byte_exact: all 3 frames, all 3 planes byte-exact vs aomdec and ffmpeg yuv444p rawvideo, plus census deltas proving the guarded 128-root VERT chroma tiling fired 6 times (edge_vert, part128 vert, intra_vert) with HORZ still 0. Non-vacuous, three mutations, three reds: counter expectation 6->7 reds; a flipped U sample reds the aomdec arm; a flipped V sample placed after the aomdec block reds the ffmpeg arm alone. No decode-path edit.
Merge lane/av1graincensus: census the picture the caller receives, after grainAhmet Kaan Gümüş · 927c533
Merge lane/av1graincensus: census the picture the caller receives, after grain census_unwritten_final runs before apply_grain, over the clean planes. The grain destination is allocated uninitialised and written by the band copy, so the picture the caller receives on a grained frame was the one buffer no census had looked at. lanes/unwritten-dep.report.md sections 6 and 8 declined to claim it. This measures it. The census sits inside apply_grain, on both returns, so the property is the function's rather than one of the four stream.rs call sites. uninit_plane poisons the buffer only when the sentinel is live; every shipped build keeps the with_capacity plus set_len corner-cut. A poison count cannot see a sample that was READ and then overwritten -- the noise kernels overwrite every sample they read -- so the initial-content gate (two fills, 0xDEAD vs 0xBEEF) now includes the grain fixture. Neutering the clean-row copy is invisible to the poison census and reds that gate. Proven: deleting the post-grain call reds with "scanned 0 samples ... class: census-never-ran". Grain fixtures stay byte-exact vs ffmpeg.
av1graincensus: census the grained picture, and cover uninit_plane's unsafeAhmet Kaan Gümüş · 852b5e2
av1graincensus: census the grained picture, and cover uninit_plane's unsafe census_unwritten_final runs in stream.rs before apply_grain, and apply_grain is the one stage after it that allocates a NEW picture: film_grain::uninit_plane, Vec::with_capacity + set_len, no fill. lanes/unwritten-dep.report.md sections 6 and 8 both decline to claim anything about that buffer, so the picture the caller actually receives was unmeasured. - decode.rs: census_unwritten_grained at apply_grain's return, with its own GRAINED_UNWRITTEN_SAMPLES / GRAINED_CENSUS_SCANNED pair. The scanned/found pairing is the same one the other two censuses use, so a build with the call deleted cannot pass. census_sentinels is now the shared counting body, returning None when the fill is off, so neither caller can publish a meaningless zero. plane_poison and plane_sentinel_on become pub(crate) so the fill and the count cannot disagree about the value or the predicate. - film_grain.rs: uninit_plane fills with that poison when plane_sentinel_on(). Counting == poison over ambient garbage is not a census -- a hole survives with probability ~1/65536, not always. With the sentinel off, every shipped build, the allocation is still with_capacity + set_len, so the documented corner-cut is untouched. Both returns of apply_grain census, so the property is the function's rather than one branch's. - stream.rs: the gate, a synthetic control counting 5 rather than the pre-grain arm's 7 (so reading the wrong counter reds), and per-fixture scanned > 0, which is reachable only by grain having run. Measured 0 unwritten on s422_grain_160x128, grain_cdef_lr_128x128 and reelb_arf_witness. Mutations: deleting the call reds via scanned > 0; one sentinel sample forced into a grained picture reds with exactly 3, the fixture's 3 grained frames. Class sweep, same lane: with copy_clean_rows neutered the census stays correctly 0 -- the noise overwrites every sample it reads -- so it cannot see a READ of uninitialised memory. That gate had no grain fixture at all, leaving uninit_plane's unsafe uncovered; s422_grain_160x128 is added and proven to bite (allocdet goes red on the same mutation, 0xDEAD vs 0xBEEF). Report: lanes/av1graincensus.report.md
Merge lane/av1sitecensus: two subsize guards claimed per site, not per levelAhmet Kaan Gümüş · f5333e1
Merge lane/av1sitecensus: two subsize guards claimed per site, not per level The walk census claimed two guards by LEVEL, so deleting either left the test green. The key-frame 8x8 SECOND resolution (decode.rs:37621) feeds decode_leaf_rect8 on a raw part8 whose VERT shape is 4x8, BLOCK_INVALID at 4:2:2; the census's AtResolution(KF, 8) row finds the OTHER 8x8 guard in the function. The inter decoder's own 128-root guard (decode.rs:54495) sits above match part128, whose half128_inter arms descend into 128x64 and 64x128 rects, also BLOCK_INVALID at 4:2:2; no row claimed it because the inter decoder never routes through read_sb128_root. Each new row is anchored on a string unique in the decode body and searched FROM that anchor, not from the function top -- the find()-returns-the-first-guard defect, closed once already in this file. Deleting either guard reds the census and names the site. No decode-path line changed.
lane/av1sitecensus: claim two subsize guards per SITE, not per levelAhmet Kaan Gümüş · 1698dbd
lane/av1sitecensus: claim two subsize guards per SITE, not per level
W1-6 from the refusal plan, closing av1subsizesweep "Not closed" #2.
The walk census claimed every guard by LEVEL, so two guards were deletable
without the test noticing:
- decode.rs:37621, the SECOND key-frame 8x8 resolution. The
decode_leaf_rect8 row is AtResolution(KF, 8), which finds the FIRST
(8, 8) guard in the function, 37322.
- decode.rs:54495, the inter decoder's OWN 128-root guard. The
decode_block_128rect row names read_sb128_root, which the inter
decoder never routes through, so nothing claimed it at all.
Both feed BLOCK_INVALID-at-4:2:2 rect walks (4x8 off a raw part8; 128x64 /
64x128 off the half128_inter! arms).
New section (g) of
every_chroma_walking_leaf_dispatch_is_guarded_or_closed_with_a_reason: one
row per site, anchored on a string unique in the decode body, searched from
the anchor rather than the function top, with the dispatch required to
follow the guard. Deleting either guard reds the row and names the site;
moving it below the dispatch reds the ordering assert.
Both mutations proven red and restored; the diff is the +128 of the new
section alone. No decode-path line touched. Closes #2 only -- the census is
still a derived site list, so #1 stands.Merge lane/hash0ee1edf403: the campaign value is not an artefact shapeAhmet Kaan Gümüş · e4f7cf8
Merge lane/hash0ee1edf403: the campaign value is not an artefact shape The one campaign measurement never explained -- reelb_rect64_intra16x4_witness's sentinel hash 0ee1edf403 at 8d6998d7 -- was swept by a byte-exact truncation sweeper (SHA-256 state walked one byte at a time, digest checked after every offset, 629821474 shapes per frame order, both lex and numeric order) plus run-to-run nondeterminism, film-grain planes, cross-fixture contamination over the whole corpus, hash-function variants, swapped columns, and every dump rung. Zero matches. The sweeper has teeth: it reproduces reelb_arf_witness's known truncation (97ef82c0ce) at exactly frames 0..4 plus 13320192 bytes of frame 5, the shape the earlier lane reported by hand. The negative is therefore a measurement, not a silence. The finding: on 8d6998d7 the plain and sentinel runs produce BYTE-IDENTICAL frame files, so every artefact shape collapses to the campaign's own plain value a26438168c. No shape sweep can reach 0ee1edf403 -- the divergence lies outside the artefact space, and the decode is proven invariant under every ambient content tested. The value stays an open instrument question, not a decode defect, and the truncation class that produced its sibling is closed by dumpio.
lane/hash0ee1edf403: the campaign value is not an artefact shape, and the sweep now runs at one-byte granularityAhmet Kaan Gümüş · 989776d
lane/hash0ee1edf403: the campaign value is not an artefact shape, and the sweep now runs at one-byte granularity 0ee1edf403 (reelb_rect64_intra16x4_witness.obu at 8d6998d7, sentinel run) is still not reproduced, and the report argues why a further shape sweep cannot reach it: the plain and sentinel runs produce BYTE-IDENTICAL frame files here, so every shape built from this tree's bytes collapses to the campaign's own plain value a26438168c. What is new is the granularity. hash0ee1-trunc.c walks a SHA-256 state one byte at a time and checks after every offset, so the truncation family is closed at offset 1 rather than 4096: 629821474 shapes per frame order, both orders, zero hits. The sweeper is validated on the control that IS a known truncation -- reelb_arf_witness's 97ef82c0ce is found at exactly frames 0..4 plus 13320192 bytes of frame 5, the shape unwritten-dep reported by hand -- and its SHA-256 is pinned against hashlib. Also swept here, none of it reaching the target: run-to-run nondeterminism at N=8 per fill under MALLOC_PERTURB_, MALLOC_MMAP_THRESHOLD_=0 heap recycling, four thread counts and CPU oversubscription; the film-grain uninitialised plane, which EC_AV1_PLANE_SENTINEL does not gate and which NO_GRAIN shows does not reach output; cross-fixture directory contamination for all 126 other fixtures, whole and truncated; mixed-fill directories; 3706 gap/run/substitution byte sets; 140 splices; 36 hash-function and listing forms; all 127 fixtures x 2 fills x both orders (the target is not another fixture's hash); and all ten EC_AV1_*_DUMP rungs. Verdict stays OPEN with the candidate list narrowed to host-specific ambient content reaching output on the campaign host, an unmeasured build, an unguessable harness shape, or a transcription slip -- each with its falsifier. Read-only on the decode path: no crate source is edited.
Merge lane/h26xpinloud: the h26x test pins fail loudly on an Ok-but-short writeAhmet Kaan Gümüş · 3dd5d25
Merge lane/h26xpinloud: the h26x test pins fail loudly on an Ok-but-short write ec-h264 and ec-h265 wrote their test pins with fs::write(..).ok()? and handed the path straight to ffmpeg as decoder input. The Err path was closed (the helper bails), but a write that returns Ok while leaving a short file was not -- ffmpeg would then read a truncated stream and the test would report a wrong or missing comparison, not a failure. The same silent-truncation class the ec-av1 dump and pin lanes closed, one hop removed. A per-crate helper (not a cross-crate dependency) stats the file after the write and fails loudly with the site, the path, the bytes on disk, the bytes owed, and the OS error -- or, for the write that returned Ok and left a short file, the explicit statement that there was no OS error. The failure semantics each site already had are kept: the callers bail, and the one site that panicked before keeps a panicking twin. The sweep found a fifth same-shape site (ec-h265's write_au) and fixed it too, and made the rd-trace write fatal where a length check is impossible (append mode, no knowable total). Proven with a real Ok-but-short write: a /dev/null symlink makes fs::write return Ok with on-disk length 0 for 1234 bytes owed, and each crate's test asserts the failure line names the path and the shortfall, then a whole-file control reads back byte-identical.
Merge lane/av1witness2recheck: the two witness2 4:4:4 panics are closed on mainAhmet Kaan Gümüş · fcbe228
Merge lane/av1witness2recheck: the two witness2 4:4:4 panics are closed on main A measurement lane: no code changed. It rebuilt the hunt's two exact recipes (sha256 68773f2c.. and 72bed279.., byte-identical to the hunt's, so the recipe did not drift) and decoded both with a provenance-checked probe built from its own tree. Both decode clean on current main -- 3 frames, 320x256, empty stderr, no refusal -- and both are byte-identical to aomdec --rawvideo AND to ffmpeg -pix_fmt yuv444p rawvideo. At fe3e8418, P1 panicked at decode.rs:17631 (the chroma-tiling assert) and P2 panicked at decode.rs:3766 (index 16 of a 16-entry table in reconstruct). Both are closed: P1 by 349b3918 (lane-av1-444sb), P2 by b6d4b528 (lane-av1leaf8oob), and the byte-exactness of BOTH traces to one shared commit fa70a68c (4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a halving) -- exact at that commit, not exact one before. No Wave-1 lane to charter. P1's bytes are not pinned in-tree (the existing 4:4:4 sb128 fixture is a different stream); the bytes and the recipe are preserved in the report.
lanes/av1witness2recheck: W1-7 -- both witness2 4:4:4 panics are closed on mainAhmet Kaan Gümüş · b407ed7
lanes/av1witness2recheck: W1-7 -- both witness2 4:4:4 panics are closed on main Re-ran the hunt's two exact recipes at b8385c93. Both reproduce the fe3e8418 bytes byte-for-byte (68773f2c... / 72bed279..., no recipe drift), and both decode clean AND byte-exact against aomdec and ffmpeg on main. Control: the same streams panic at fe3e8418 at the hunt's own lines (decode.rs:17631 128-rect chroma assert, decode.rs:3766 OOB in PlaneBuf::reconstruct), so the witnesses are still live; only main moved. P1 closed by 349b3918 (lane-av1-444sb, the ss-aware 128-rect chroma unit walk; the assert is now the per-axis invariant at decode.rs:24515). P2 closed by b6d4b528 (lane-av1leaf8oob, decode_leaf8's intrabc closure sized chroma with the 4:2:0 halving; its gate pins these exact bytes as fixtures/444_leaf8_oob.obu and passes here). Byte-exactness on both streams is a later, shared fix: fa70a68c, measured directly as exact at fa70a68c and diverging at f33b9d41. No Wave-1 lane to charter for either site. P1's bytes are not pinned anywhere in-tree; noted in the report if a permanent 4:4:4 sb128 fixture is wanted. No code edited, no fixtures committed.
Merge lane/av1oracleguard: the 4:2:0 ffmpeg oracle helpers refuse a non-4:2:0 streamAhmet Kaan Gümüş · 269e1fd
Merge lane/av1oracleguard: the 4:2:0 ffmpeg oracle helpers refuse a non-4:2:0 stream After the 4:2:2 lift, the three 4:2:0 oracle helpers (ffmpeg_decode_sequence and its 10- and 12-bit twins) would silently CONVERT a 4:2:2 or 4:4:4 stream to 4:2:0 (-pix_fmt yuv420p, width*height/4 sizing), so a 4:2:2 gate built on them would compare the wrong planes and pass green. assert_420_oracle_stream reads the stream's OWN color_config subsampling from its sequence-header OBUs and refuses before the ffmpeg spawn, naming the real subsampling, the chroma shape, and the sibling helper to use. Proven both ways: a flipped oracle sample moves the comparator's count by exactly one (and nothing else moves), so 4:2:0 still measures byte-identical; and a 4:2:2 pin is refused by all three helpers, with the message naming the sibling -- red before, green after, and the red failure text is the hazard itself. Verified no existing gate feeds a wrong-shape pin to these helpers (the 4:2:2/4:4:0 pixel-exactness battery stays green).
Merge lane/av1bookkeep: the inventory's two unregistered rows, and the seventh 4:2:2 cellAhmet Kaan Gümüş · 53601b1
Merge lane/av1bookkeep: the inventory's two unregistered rows, and the seventh 4:2:2 cell The refusal inventory listed 33 strings but PROVEN carried 31 rows, and its own discipline only checked one direction (every row names a live refusal) -- nothing checked that every listed refusal has a row. Registered the two missing rows with their existing gates: the BLOCK_INVALID subsize refusal -> a_422_header_over_a_420_tile_refuses_the_subsize_libaom_ calls_corrupt (NegativeGate), and the filter-intra capability claim -> a_sb_level_horz_vert_strip_admits_no_filter_intra_symbol (Enumeration). Each is red-proven by deletion. And the corpus gate's own precondition is now discharged: it pinned six of the seven measured-diverging 4:2:2 cells and said the branch must not land until s422_384x240 closed and the corpus re-measured 51/51. The cell IS closed on main (BYTE-EXACT, U=0 V=0 Y=0 over 17 decode frames, re-measured on this tree), and the committed fixture 422_palette_intra_in_inter_384x240_17f.obu is byte-identical to the sweep's s422_384x240.obu (same sha256 bf1c658e..a815b) -- the seventh cell is pinned with the exactness re-measured here, and the doc states the closure.
ec-av1: the 4:2:0 ffmpeg oracle helpers refuse a non-4:2:0 streamAhmet Kaan Gümüş · 8b97983
ec-av1: the 4:2:0 ffmpeg oracle helpers refuse a non-4:2:0 stream `ffmpeg_decode_sequence`, `_10bit` and `_12bit` ask ffmpeg for a 4:2:0 pix_fmt and slice chroma at `width * height / 4`. ffmpeg does not refuse a mismatched stream, it CONVERTS it, so the helper's own byte-count assert still passes and a gate built on it compares converted chroma against our real 4:2:2 chroma and passes green. `lanes/av1subsizesweep.report.md` names this as the dangerous form. Each helper now reads the stream's OWN `color_config.subsampling_x/y` from its sequence-header OBUs (the `stream_bit_depth` pattern) and refuses anything but (1,1), naming the real subsampling, the chroma shape it means, and the sibling to use. The guard is the first statement, before the spawn, so a host without ffmpeg still proves it. The correct siblings (`_422`, `_422_depth`, `_444`) already existed. The `_10bit` sibling was not in the assignment's target list but is the same hazard with the same arithmetic, so it got the same one-line guard. The diff is 256 insertions and 0 deletions: every existing line is byte-identical, so the 4:2:0 path is unchanged by construction. Non-vacuity both ways: on the 4:2:0 pin `420_mixll_256x128_6f.obu` the per-plane mismatch count is [0,0,0] and one flipped oracle U sample moves it to [0,1,0]; and `422_key_64x64.obu`, `s422_352x242_10b.obu` and `s422_12bit_160x128.obu` are refused with (1,0), 4:2:2 and the sibling name in the message. Reducing the guard to a no-op turns both refusal tests red. No pre-existing test fed a non-4:2:0 stream to these helpers: a fixture-keyed scan of every test function returns only this lane's own refusal tests, and the shape-filtered run (68 tests) and the `pixel_exact` family (257 tests) are green with EC_AV1_REQUIRE_FFMPEG=1.
lanes/av1bookkeep: the lane report for the inventory rows and the seventh 4:2:2 cellAhmet Kaan Gümüş · 2af0609
lanes/av1bookkeep: the lane report for the inventory rows and the seventh 4:2:2 cell Two commits of code, this file third. It records the measurements both commits rest on, the red proofs (row deletion x2, guard-wording mutation, fnv mutation), and what this lane did NOT establish: the charter's "94-cell census on the merged tree" has no artifact in lanes/ or ~/.cache/census422*/, so it is neither reproduced nor cited -- what is measured is the 95/95 ffmpeg-oracle run on this tree, which is a different instrument and is labelled as such.
ec-av1: the seventh 4:2:2 corpus cell is pinned, and re-measured exact hereAhmet Kaan Gümüş · d6ceb79
ec-av1: the seventh 4:2:2 corpus cell is pinned, and re-measured exact here the_pinned_422_corpus_cells_decode_pixel_exact carried six of the seven cells lanes/av1422ffmpegbase.report.md 2.1 measured as diverging, and its doc said why the seventh was missing: "THIS BRANCH MUST NOT LAND UNTIL THAT CELL CLOSES AND THE CORPUS RE-MEASURES 51/51". s422_384x240 has since closed -- lane-av1422tailskip measured it byte-exact on all 16 displayed and all 17 decode-order frames and refuted the group-tail chroma SKIP arm the risk study's R4 blamed -- so the first half of that condition is met and the row belongs in the gate. Re-measured on THIS tree, not taken from the closure report, with EC_AV1_REQUIRE_FFMPEG=1 and the crate's own comparator (ffmpeg, display order, yuv422p): byte-exact on all 16 frames, per-plane coefficient-unit census delta units [1992, 1254, 1256] and coded [955, 742, 854], so the compare is not vacuous with respect to 4:2:2. The sibling gate on the same bytes (the_pinned_422_palette_intra_in_inter_cell_window_is_byte_exact) also runs green here: 17 decode-order frames byte-exact against aomdec, 16 chroma palette unit windows. The row pins 422_palette_intra_in_inter_384x240_17f.obu rather than committing a second copy of the sweep's s422_384x240.obu: lane-av1422tailskip had already committed those exact bytes under that name and the two files are byte for byte identical (sha256 bf1c658e...a4b815b, 19344 B, fnv1a64 0x923ccabfcb933e90). One stream, one pin. Row non-vacuity: mutating that row's fnv1a64 by one turns the gate red on "[422_palette_intra_in_inter_384x240_17f.obu]: bytes drifted", so the row is read and compared. (Mutating the sha256 column stays green by design -- it is the corpus's identity column for a re-capture, not an in-process assertion.) The doc's "Why these six" paragraph is corrected rather than extended: the seventh is NOT a round_ss cell. 384x240 is 8- AND 16-aligned; it was the late-starting frame-1 alt-ref chroma residual, so it is described as its own class rather than folded into the non-8-aligned-geometry sentence. The gate's own landing condition had a second half -- "AND THE CORPUS RE-MEASURES 51/51" -- so it was run here rather than assumed: the census's ffmpeg-oracle driver (~/.cache/census422b/ffcensus.py, display order, shown frames, geometry from ffprobe, a count over zero frames is a hard error) against a dump_yuv built from THIS lane's tree. 51 of 51 4:2:2 cells BYTE-EXACT, s422_384x240 among them at 0/0/0, and the same run put all 44 4:2:0 / 4:4:4 controls at BYTE-EXACT (95/95 over the corpus). Every remapped stream path's sha256 was checked against the census's recorded sha before use; 0 unresolved. Limits: ffmpeg oracle, display order (the aomdec decode-order census was not re-run), and the census's probe_split_control is obsolete now that the lift has landed.
ec-av1: the inventory listed 33 strings and PROVEN carried 31 rowsAhmet Kaan Gümüş · abb01bd
ec-av1: the inventory listed 33 strings and PROVEN carried 31 rows
Nothing compared the two sets. every_proven_refusal_names_a_test_that_exists
walks PROVEN -> "is this string still a live decode-path refusal, and does its
gate quote it", so a refusal ADDED to REFUSALS with no proving gate was
invisible: on main the BLOCK_INVALID subsize refusal and the lone filter-intra
capability claim were both listed and both unmeasured, and the module's own
printed counts (32 refusals + 1 capability claim, 31 proven) sat 17 lines apart
without anyone comparing them.
Both rows are registered:
- the BLOCK_INVALID subsize refusal (refuse_invalid_plane_block, libaom's
get_plane_block_size rule at decodeframe.c:1456) ->
a_422_header_over_a_420_tile_refuses_the_subsize_libaom_calls_corrupt,
NegativeGate. That gate asserted only the libaom citation INSIDE the refusal
("invalid with this subsampling mode"), so a reworded guard stayed green as
long as it kept citing decodeframe.c:1456; it now quotes the refusal WHOLE
and asserts our own string on the error. Proven non-vacuous by mutating one
word of the guard ("no chroma" -> "no CHROMA"): the gate reds at stream.rs on
the new assertion, where the old one would have passed.
- the filter-intra capability claim ->
a_sb_level_horz_vert_strip_admits_no_filter_intra_symbol, Enumeration. Its
body already quotes the claim's leading clause, which is what that anchor
check accepts.
Anchor strength moves from 25 WHOLE / 6 LEADING CLAUSE to 26 / 7 over 33 rows,
0 matching neither.
New test every_listed_refusal_and_capability_claim_has_a_proven_row holds the
other direction (listed string -> a row that proves it) and requires the two
sets to be one to one. Red proof: deleting either new row turns it red on its
own assertion, naming the unmeasured string.h26xpinloud: the h26x test pins fail loudly on an Ok-but-short writeAhmet Kaan Gümüş · 3aa53dd
h26xpinloud: the h26x test pins fail loudly on an Ok-but-short write ec-av1 already owns this class (dumpio::LoudDump: declare the expected byte count, write, then stat the file's own length). These two crates had no shared helper, so four sites called fs::write directly: ec-h264/tests/encode.rs:475 ffmpeg_decode -> ffmpeg -i <stream> ec-h264/tests/encode.rs:1068 x264_encode_qp -> ffmpeg -i <raw> ec-h265/tests/encode.rs:289 ffmpeg_decode -> ffmpeg -i <stream> ec-h265/tests/encode.rs:341 x265_encode_qp -> ffmpeg -i <raw> Each was fs::write(&path, bytes).ok()?. That closes the Err path; the Ok-but-short path stayed open, and it is the one that hands another tool a silently truncated stream, which then reads as a wrong pixel or a shifted PSNR number rather than a write failure. Measured: 1234 bytes written through a path that looks like a stream file but whose filesystem accepts every byte and stores none returns Ok, and the file on disk is 0 bytes. Each site now goes through a per-crate pin_loud: write, then check the on-disk length against the same bytes.len() the writer used, and fail with the path, both counts, and the OS error. The helper returns the failure LINE, not a panic, because these callers bail (or, at one h264 site, turn None into a SKIP) today and that semantics is kept -- the shortfall is printed in full and the existing bail stands. Only write_au panicked before, so only it gets the panicking twin. The helper is local per crate (no cross-crate dep, no new support crate): ec-h265 keeps it in tests/common/mod.rs because its fifth site lives in a different test binary, ec-h264 keeps it in tests/encode.rs where both of its sites are. Two non-vacuity tests per crate: a /dev/null symlink reproduces a genuine Ok-but-short (0 of 1234), with a whole-file control read back byte for byte; and a child under `ulimit -f 1` with SIGXFSZ ignored proves the Err arm reports what actually LANDED (512 of 4096, EFBIG) rather than the count the writer confirmed. Deleting the check turns the first RED. Sweep of both crates: five sites fixed (the four named plus ec-h265's write_au, File::create + write_all, whose path goes to ffmpeg the same way), and one more -- ec-h264's append-mode $EC_H264_RD_TRACE writer, which discarded its write result -- made fatal instead, because append mode has no knowable total and so admits no length check. Everything else in the two crates is ffmpeg's own output, a read-only path, a directory, or an in-memory BitWriter. Success path byte-identical: same bytes, same path, truncate-then-write.
Merge lane/ecimagewallclock: the animation budget tests are byte bounds, not clocksAhmet Kaan Gümüş · 69db758
Merge lane/ecimagewallclock: the animation budget tests are byte bounds, not clocks The ec-image budget test's panic on a server was its own elapsed time (3.89 s against a 2 s ceiling): the assertion measured the host's memcpy bandwidth, not the property it was written for (that the budget guard refuses before unbounded work). Distribution on the workstation: 0.747-0.893 s across 15 runs for byte-identical decoder work, a ~5x spread across hosts. The bound is now BYTES, measured by a per-thread counting global allocator in the test binary, asserted against the decoder's own Limits::max_total_alloc (4 GiB) -- no fitted constant. The deciding measurement: moving budget.spend one clone later reds the byte bound at 5120024246 bytes against the 4294967296-byte budget, while the old clock measured the same regression at a 1.006 s median and would have PASSED its own 2000 ms ceiling. Honesty corrections from the refutation pass, folded in before merge: the byte bound is an independent measurement, not the guard's own tally -- spend sums declared bytes at chosen call sites while the tally sums actual layout.size() with realloc's full new size, and the refusal's own formatting lands inside the measured window, so the two diverge by construction and the red proofs are tests of their correspondence, not of an identity. The SIGKILL mutation is labelled evidence about the mutation's severity, not a proof of the bound, and the emulated concurrency figures are marked as inferred rather than recorded. The tally deliberately measures allocation traffic, because the host difference this class measures is memcpy bandwidth, which is a property of traffic. Four wall-clock bounds swept the same way (webp and gif budget at 64 and 4096 frames, a 60000x60000 frame, and the LZW bomb); the refusal is still asserted; the discrimination is red-proven; green is proven under emulated slowness (the server condition reproduced locally at load average 46).
ec-image r2: the byte bound is an independent measurement, not the guard's own statementAhmet Kaan Gümüş · a4ec8d5
ec-image r2: the byte bound is an independent measurement, not the guard's own statement Reframes the claim after the refutation pass found it unsound: AllocBudget::spend sums declared bytes at chosen call sites while the counting allocator sums actual layout.size() (realloc full new size included) plus the refusal's own formatting, so 'refused at the budget' does not by itself mean 'allocated no more than the budget' -- the lane's own red proof is the counterexample (5120024246 bytes against 4294967296). The bound is described as an independent measurement and the red proofs as tests of the correspondence. The SIGKILL mutation is labelled evidence about the mutation's severity, not a proof of the bound. The emulated concurrency figures are marked inferred, not recorded. Traffic (not net live bytes) is stated as the deliberate quantity.
ec-av1: the full suite found three real gaps the scoped runs never sawAhmet Kaan Gümüş · a668ef2
ec-av1: the full suite found three real gaps the scoped runs never saw The server suite at the merged head (wave13) went 776/3/49 and BOTH hosts failed the same three tests, so these are tree defects, not flakes: - refusal_inventory: the BLOCK_INVALID subsize refusal added by lane-av1unwritten and lane-av1subsizesweep was never inventoried. The scanner collects the reason string from unsupported(...) joining line continuations, and it keeps escaped quotes, so the entry is written in the scanner's form. - stack_budget: dumpio.rs landed without being registered in the by-value scan's FILES, so the sweep was blind to any by-value return landing in it. Registered. - stream::tests::allocdet_child_decode: another child-helper test that asserted its ALLOCDET_FIXTURES unconditionally and reddened every full suite -- the same class as the 1f4fcc84 hotfix, shipped one lane later. It now returns with a printed skip when invoked without the parent-set variable; the parent still fails when the child prints no census line, so the skip cannot hide a broken child. Swept: the four child helpers in the crate (dumpio x2, uwdep, allocdet) are all guarded now.
2026-10-02
ec-image: bound the animation budget tests by bytes, not by wall clockAhmet Kaan Gümüş · 46c7995
ec-image: bound the animation budget tests by bytes, not by wall clock The WebP budget test asserted `elapsed < 2000 ms` and failed on a server with 3.894534671s. That clock was never measuring the property the test exists for. The decode is refused once the running total crosses max_total_alloc; what the test protects is that the refusal happens before decode_frames clones the whole canvas once per ANMF chunk. The cost of a refused decode is a deterministic function of the budget and the canvas size -- wall time is the host's memcpy bandwidth for a fixed ~4 GiB of traffic, which is exactly what differed between the hosts. Measured, same input, 15 runs each: release 0.747/0.759/0.893 s (min/med/ max), debug 0.774/0.779/0.821 s, server 3.895 s. A 5x spread with byte-identical decoder work. The existing 2000..3000 ms rerun escape hatch does not help: 3.895 s falls outside the rerun window. Replace it with a thread-local counting global allocator in the test binary and bound the work in bytes against the decoder's own max_total_alloc. The ceiling is not a fitted constant: it is the limit the guard enforces, so "refused at the total budget" and "allocated no more than the total budget" are the same statement. Each budget test now decodes both a 64-frame and a 4096-frame file and bounds both, so the cost cannot grow with the attacker's frame count -- a guard spent per input frame, or after the clone instead of before it, is caught here, and no clock could tell those apart. Red proof: moving budget.spend from before the clone to after it (one canvas clone too many) reds on the byte bound at 5120024246 bytes. The same mutation measures 1.006 s median through the old clock and would have passed -- that is what decides it. Under load (16-40 spinners plus direct-write memory hammers, load average 46) decode elapsed reaches 2.42-9.34 s, reproducing the server condition locally, while the new tests stay green at 6.94-13.81 s per run. Same class swept in the same file: the GIF budget test's 5 s ceiling, the 60000x60000 GIF frame's 100 ms ceiling, and the LZW bomb's 1 s ceiling all become byte bounds (measured 4.096 GB, 421 B, and far under 1 MiB respectively). The tally is per-thread rather than a global atomic: cargo test runs these in parallel, and a shared counter summed concurrent decodes together (reported 6144529702 for a decode that allocates 4096023126). cargo test -p ec-image scoped green: fuzz 18, differential 19, real_library 2.
2026-10-01
Merge lane/av1pinloud: a short pin is loud, so the silent-truncation class leaves the pin path tooAhmet Kaan Gümüş · 04561ce
Merge lane/av1pinloud: a short pin is loud, so the silent-truncation class leaves the pin path too
The dump sites were made loud last; the TEST PINS were the residue that lane named and did
not fix. They wrote with `let _ = std::fs::write(path, bytes)`, so a partial write left a
truncated stream at exactly the path the next line's panic hands the reader ("stream pinned
at {}") -- the same silent-truncation class that produced two false defect rows from the
dump path.
Nine sites now go through `dumpio::pin` (a LoudDump wrapper: create, write, finish, so the
file's on-disk length is verified), plus the two EC_AV1_GATE_DUMP writes and the symtrace
flush, which gains the length check it never had. The one warn-and-continue site keeps that
shape on purpose -- its own assert three lines below is the real failure, and panicking on
the write would mask it -- but its warning now carries expected-vs-on-disk byte counts.
That changes what a failing gate PRINTS, and the report says so.
The site label is TEST_PIN, deliberately outside the env-var namespace: a real EC_AV1_PIN
env var exists (the scratch replay helper reads it), and reusing the name would misdirect a
grepp. Every pin site sits inside a branch already about to panic, so a pin failure cannot
turn a passing test into a panic; the success path is byte-identical and asserted by reading
the bytes back.
The class sweep is half-open and says so: the Err path at ec-h264/ec-h265's encode helpers
is closed, the Ok-but-short path is not, because `fs::write` returning Ok does not guarantee
the file's length.ec-av1 r2: label the pin site TEST_PIN, correct the pin/pin_reporting doc split, amend the sweep rowsAhmet Kaan Gümüş · 2d08a6d
ec-av1 r2: label the pin site TEST_PIN, correct the pin/pin_reporting doc split, amend the sweep rows - the pin site label moves out of the EC_AV1_* env-var namespace (no env var of that name exists; EC_AV1_PIN is the scratch replay helper's) so a triager grepping the failure line is not sent to the wrong thing - pin_reporting re-implements the length check rather than wrapping LoudDump (whose failure channel is panic!); say so where a reader would assume otherwise - the h264/h265 rows are half-open, not closed: fs::write returning Ok does not guarantee the on-disk length
lanes: av1pinloud report -- loud self-pins, the28143 non-fatal decision, class sweepAhmet Kaan Gümüş · 4dcc844Browse files
ec-av1: route every test-pin write through dumpio::LoudDumpAhmet Kaan Gümüş · f3fd848
ec-av1: route every test-pin write through dumpio::LoudDump
The self-pin sites in stream.rs wrote with `let _ = std::fs::write(..)`
and then named the path in the panic that followed ("stream pinned at
{}"), so an ENOSPC/EFBIG left a TRUNCATED stream at exactly the path the
reader was told to replay -- the same silent-truncation class as the
dump path, one hop later. dumpio gains pin() (fatal) and pin_reporting()
(same failure line, returned not panicked); msac's symtrace dump folds its
hand-rolled check into the same writer.scripts: pin the 4:2:2 census probe to the zeroed-allocation merged buildAhmet Kaan Gümüş · 79a4e31Browse files
Merge lane/av1uballoc: the plane allocation is zeroed, because a number said soAhmet Kaan Gümüş · 3330da8
Merge lane/av1uballoc: the plane allocation is zeroed, because a number said so fresh_plane handed the decoder a padded plane over uninitialised memory, and its SAFETY argument had been withdrawn by the same file's own measurement. Three closures were filed and none taken, because the choice was between a perf cost and a new instrument. This lane measured all three on the same streams and shipped the middle one: `vec![0u16; n]` (calloc/alloc_zeroed) as the DEFAULT plane allocation. The unsafe `set_len` survives only on the census arms (uninit, padzero, extzero), where uninitialised memory is the point. Measured deltas against the uninitialised arm, interleaved medians in one binary: 4K 4:2:0 +0.84% (6937.7 -> 6995.7 ms), 4K 4:2:2 +0.81%, 1920x1080 -1.63%. The spread on the 4K row is 10.2 ms, so the honest reading is "inside the noise band", not "free", and the report says that rather than rounding to zero. The stop condition did not fire: no fixture on this tree reaches an uninitialised read (128 fixtures x 2 arms = 256 memcheck runs, zero uninitialised-value errors, identical error-signature sets on all 128; 126 decode, 2 refuse). The refused fixture's contribution is measured rather than assumed -- the plane is allocated, partially written and abandoned mid-walk before the refusal, so its zero is a real zero -- and the report records the standing point that a fixture contributing nothing is indistinguishable from one never looked at. The census now scans the padded tail as well as the true extent, as a strict complement, with `plane_poison` refusing any value a legal sample could take.
ec-av1: pick the plane-allocation closure with a number, and ship the zeroed oneAhmet Kaan Gümüş · fd10b92
ec-av1: pick the plane-allocation closure with a number, and ship the zeroed one
fresh_plane handed the decoder an uninitialised buffer and the SAFETY comment
resting on "every sample is written before it is read". That premise was
withdrawn by lane/unwritten-dep's own measurement (224 caller-visible chroma
samples on 440_request_is_422) and the comment was left standing anyway, with
two closures filed and neither chosen: zero the allocation, or instrument the
reads. Choosing between a perf cost and a new instrument is not a measurement
lane's call, so this is that lane.
Measured, one stream at a time, one binary: EC_AV1_PLANE_ALLOC is an env arm
inside the crate rather than a build flag, because three separate builds cannot
make the comparison fair -- recycled-arena state, page-cache state and code
layout all differ between them. Medians of 11 interleaved runs, examples/
alloc_timing.rs (new) timing decode_stream_with and reading minflt around it:
3840x2160 4:2:0 96f uninit 6900.963 ms | fill +0.83% | zeroed +0.80%
3840x2160 4:2:2 48f uninit 4709.657 ms | fill +0.86% | zeroed +0.81%
1920x1080 4:2:0 96f uninit 1768.411 ms | fill -1.87% | zeroed -1.63%
The 4K deltas are ~6 sigma against a 7-10 ms run-to-run spread. alloc_zeroed is
NOT the free zero-page lunch its name suggests: zeroed and fill land within
0.03% of each other at every size, because glibc memsets a recycled arena block
just the same. Output hashes are identical across all three arms on every
stream. The 1080p sign flip is reproducible and unexplained; it is reported as
a number, not a story.
The read census, which is what the decision actually rests on. Three regions of
the allocation can hold a sample no block wrote, and the old census only
scanned one of them:
1. the padded tail outside true_width x true_height -- unwritten by
construction; 4,676,128 of 22,787,296 scanned tail samples over all 127
fixtures, on 38 of them. The comment claimed "no decoder ever reads" it;
that was self-certifying, so the tail is now counted like any other
region.
2. the true extent, where the withdrawn 224-sample case sat -- 0 unwritten of
1,466,581,280 scanned. The witness is refused on main.
3. pix_write's `prev` argument, which reads the destination sample before
overwriting it on every store. Neither instrument can see it (the value
never reaches a branch or a syscall, so a DEBUG build under memcheck on
the uninit arm still reports 0 errors) and no hash moves -- but it is a
read of initial content nonetheless.
Reads were measured two independent ways and both say zero, over the whole
corpus: valgrind memcheck on every fixture under both the uninit and the zeroed
arm (254 runs, 0 uninitialised-value errors, identical signature sets), and
differential poisoning -- 126/126 committed fixtures byte-identical under
0xDEAD, 0xBEEF and the zeroed closure, the 127th being the refused witness.
The memcheck instrument is shown live by mutation: a temporary env-gated read
of the plane's last slot makes the same binary report 12 errors from 4
contexts. Reverted.
So the shipped closure is PlaneAlloc::Zeroed (vec![0u16; n]). The unsafe is now
reachable only from the census arms, its SAFETY comment names the three regions
with their measured counts instead of a premise, and the refusal that closes
region 2 is stated as a refusal rather than a proof -- a hostile file picks its
own subsize values, and that check lives in the tile walk, not at the
allocation.
New gate stream::tests::the_frame_does_not_depend_on_the_plane_buffers_initial
_content: four child processes (two impossible poisons, sentinel-off+uninit,
sentinel-off+zeroed) over ten fixtures must agree on one FNV-1a hash each, with
a synthetic one-sample control first so the equalities cannot be vacuous and a
frames>0 assertion so two children that decoded nothing cannot agree. 4.6 s.
Not in this commit: a pooled plane buffer would make the closure ~free (take the
three buffers from a thread-local pool, zero each once at creation, return on
drop) but it changes PlaneBuf's ownership, which the wavefront workers hold.
Recorded in the report rather than done.
Full table, reader map, census and non-vacuity evidence: lanes/av1uballoc.report.mdscripts: pin the 4:2:2 census probe to the dump-loud merged buildAhmet Kaan Gümüş · a0f5e62Browse files
Merge lane/av1dumploud: a short dump is now loud, at every dump siteAhmet Kaan Gümüş · 841ad80
Merge lane/av1dumploud: a short dump is now loud, at every dump site Every dump site used to write with `let _ = f.write_all(...)`. A full filesystem, an RLIMIT_FSIZE, or any ENOSPC therefore left a TRUNCATED dump and nothing said so -- and that artefact is what produced two false defect rows earlier today (`reelb_arf_witness`'s sentinel hash reproduces bit-for-bit as frames 0..4 plus a 13320192-byte frame 5) and an empty dump that read as instability. Eleven sites now declare their expected byte count and abort with the file, the bytes on disk, the bytes owed and the OS error. Two sites say plainly that they cannot know a total (the append-mode table dump has no end-of-run close; the ECDUMP handle is never dropped) rather than guessing. The proof is a real decode under a real RLIMIT_FSIZE, and it corrected the mechanism: the kernel stores up to the cap and only then returns EFBIG, with write_all confirming none of it, so an acknowledged-bytes count printed "wrote 0" over a 30720-byte file. The failure line therefore reports the file's measured on-disk length and carries the acknowledged count separately. A sweep re-run with the loud writer in place is byte-identical to the earlier report (a26438168c3c53a0 / 8d7a43bc5fcf840a, sizes [18524160], now asserted per frame). The unexplained campaign value 0ee1edf403 stays open with the new evidence named.
ec-av1: every dump site fails loudly on a short writeAhmet Kaan Gümüş · 286530d
ec-av1: every dump site fails loudly on a short write All 11 dump write sites in the crate wrote through `let _ = f.write_all(..)`. A full filesystem, a quota or an RLIMIT_FSIZE therefore left a SHORT file on disk and nothing said so -- the artefact behind two full days of chasing a "decoder nondeterminism" that reproduced bit-for-bit as a truncated frame (lanes/unwritten-dep.report.md: frames 0..4 complete plus 13320192 bytes of frame 5), and behind an empty dump read as instability. New `dumpio::LoudDump`: the caller declares the byte count from the geometry it already has (per-axis extents, u16-vs-u8 sample width), `finish()` checks it against the file's own length on disk, and any shortfall -- or a failure to create the file at all -- aborts with ec-av1 dump FAILED [EC_AV1_FINAL_DUMP] <path>: wrote <on-disk> of <owed> bytes: <reason> Two sites cannot know a total length (EC_AV1_DUMP_TABLES and the ECDUMP symbol stream are append-mode, whole-run files); they say "of an unknown number of bytes" rather than declaring a number they would have to invent. The written count is the file's MEASURED length, not what write_all confirmed: under RLIMIT_FSIZE the kernel stores up to the cap and only then returns EFBIG, so a naive acknowledged count reported "wrote 0" over a 30 720-byte file. Gates: a real decode under a real RLIMIT_FSIZE now FAILS with the line above (child process, SIGXFSZ ignored, asserted against the fragment's real length), plus /dev/full, uncreatable-path, under-declared-length and append-unknown arms. The success path is byte-identical: the hg fixture sweep reproduces a26438168c / 8d7a43bc5f, 3/3 each, 18524160 B per frame. 0ee1edf403 is still NOT reproduced (plain 3/3, sentinel 3/3, concurrent reuse, 7 RLIMIT caps, 204 prefix shapes: all plain value or no match). It stays open -- a SIGKILLed process emits no line at all, so that shape is not ruled out. What is now closed is the silent-truncation class: every truncating cap aborts loudly instead of leaving an artefact.
scripts: keep the 4:2:2 census probe pin on the current durable buildAhmet Kaan Gümüş · a18289eBrowse files
Merge lane/av1docrot: four comments that asserted mechanisms that are not thereAhmet Kaan Gümüş · 04f62da
Merge lane/av1docrot: four comments that asserted mechanisms that are not there An independent sweep of measurement-stating comments found these; each fix states the true claim and cites the evidence for it. - census_unwritten's doc claimed "each frame's pre-deblock point" while the call sits at 2 of the 4 apply_deblock entries (key path, non-pipelined inter path), and its "exact" claim was unbounded. Coverage is now named, the exactness is kept and narrowed to the per-axis extent it actually scans, and the uncovered paths are listed -- zero now means "no hole on the paths that reach this call". - stage_dump_idx() is deleted rather than repointed: no callers, and the live per-var counter has its own doc. - stream.rs no longer tells the reader to diff against EC_AV1_POSTFILT_DUMP, a rung the oracle script never defined; it names EC_AV1_POSTDEBLOCK_DUMP and its depth caveat. - chroma_plane_block_codable's "what led here" keeps its historical measurement and now names the tree it was taken on, records that a later measurement did not reproduce it, and states the current behaviour (the witness is refused on main).
ec-av1: four comments claiming more than their own evidenceAhmet Kaan Gümüş · 61c5b15
ec-av1: four comments claiming more than their own evidence Comment-only, plus one #[allow(dead_code)] function with no callers. census_unwritten: the doc said "at each frame's pre-deblock point". It runs at two of the four apply_deblock entries -- the key path and the non-pipelined inter path. The encoder's filter search (replay_filters, over a captured copy) and the pipelined inter branch (deblock already ran band by band inside par) are not covered, and the doc now says so. The exactness claim is kept and narrowed to the extent the scan actually reads, per axis. stage_dump_idx(): deleted, no callers in the crate. Its doc duplicated the live mechanism; the mc64 index paragraph now names dump_stage_idx, the per-var counter the dumps really name their files from, and records that PREFILT_PICTURE_IDX is bumped AFTER the dump sites, so load()-1 would have named the previous frame. EC_AV1_DECODE_ORDER_DUMP: the doc pointed at EC_AV1_POSTFILT_DUMP, a rung that does not exist in instrument-aom-oracle.sh. Now names EC_AV1_POSTDEBLOCK_DUMP (rung 6) with its 1-byte depth caveat. chroma_plane_block_codable "what led here": the hash measurement is kept and annotated -- taken on 8d6998d7, not reproduced (five plain runs, one hash a761118c8dd5c8d0, unwritten-dep.report.md s10/s13), and main now REFUSES the witness, so those hashes are pre-refusal history. Facts (1) and (2) remain what make the refusal correct. Report: lanes/av1docrot.report.md
ec-av1: the census child test skips in a normal suite run instead of reddening itAhmet Kaan Gümüş · 0cd363d
ec-av1: the census child test skips in a normal suite run instead of reddening it lane/unwritten-dep's child helper opens with an unconditional assert that EC_AV1_PLANE_SENTINEL is set, and the test is in the crate's default test list, so every full suite would fail on it. The parent already catches the case the assert wanted (it panics when the child prints no census line), and the child's own non-census path below the assert returns deliberately -- so the entry condition now returns when neither UWDEP_CENSUS_SYNTHETIC nor UWDEP_CENSUS_FIXTURE is set, printing that it skipped rather than passing silently. Swept the class: the five other tests that assert an env var at entry are the EC_AV1_REQUIRE_* skip idiom, which is correct.
Merge lane/av1subsizesweep: close the residue, and the walk that dispatched around the guardAhmet Kaan Gümüş · 310e784
Merge lane/av1subsizesweep: close the residue, and the walk that dispatched around the guard
The residue named by the merged missing-refusal lane is closed at its resolution rather
than by a third guard: decode_rect4_16_intrabc's strip route derives a plane block of
(pw/2, ph/2) and own422 requires horz, so a VERT strip there would be BLOCK_INVALID at
ss(1,0); its single route is reached only through 16x16-level 1:4 arms, above the level
guard, and HORZ_4's (16,4) cell is legal, so the guard refuses exactly the invalid shape
and not the legal mirror.
What the sweep found instead is a real walk on main: the key-frame 16-level FRAME-EDGE arm
dispatched decode_leaf_rect straight from a gathered edge bit. A short column hands it
BLOCK_8X16, which libaom refuses ("Block size 8x16 invalid with this subsampling mode",
decodeframe.c:1456) -- our decoder walked it. Witness: 422_header_edge16_walk.obu (128 B,
sha256 e8ab2bb2...), decoded by main as 1 frame where aomdec reports a corrupt frame. The
fix names the LEVEL rather than a shape, so it reduces through partition_subsize_dims like
every sibling, and the legal 16x8 mirror keeps decoding.
Ships a walk-site census instead of a symbol-site census -- 19 walks, each with the luma
footprints its dispatch can hand it and the mechanism protecting it, with resolution rows
carrying the guard they depend on and unreachable rows gated by asserting the offending
set is empty. Two rows that a per-site deletion does not red are named as such rather than
papered over; the merged scan's resolution-count cross-check catches them.lane-av1subsizesweep r2: a real witness, a derived read-spelling scan, a scoped censusAhmet Kaan Gümüş · bee9cbf
lane-av1subsizesweep r2: a real witness, a derived read-spelling scan, a scoped census
Main's r2 review was right on all counts. Fixed, plus the three items still
open from r1.
WITNESS. There is one, and the earlier "no witness exists" claim was wrong.
422_header_edge16_walk.obu (128 bytes) is a 4:2:2 sequence header over a 4:2:0
key frame's tile at 88x64. Width 88 is 8 mod 16, so the last 16x16 column block
is column-short and the frame-edge arm fires; height 64 is 16-aligned, so the
both-cut arm is not taken. aomdec says:
Block size 8x16 invalid with this subsampling mode
and so do we. What makes this pin different from every other refusal gate here
is that the 8x16 is the ONLY offending subsize in the stream: over a
260-candidate sweep (4 card textures x 5 quantizers x 13 declared widths) it is
the one candidate whose decode with the guard DELETED SUCCEEDS -- the decoder
returned a full 88x64 picture where libaom refuses the frame. So the guard is
load-bearing, not a redundant second refusal, and the new gate reds when it is
deleted.
The witness had to be built from this crate's own encoder with a DECLARED width
(encode_key_frame_at_size, the gen_coverage_cells cell-2 construction): aomenc
rounds the coded size to even and never declares 88. That also corrects the
report: my earlier `partition_rect_allowed` explanation for the aomenc non-hit
was WRONG -- that gate governs the encoder's partition search, whereas this
arm's partition comes from a single gathered bit after a frame-edge geometry
test. Why aomenc never produces the shape is not known. Severity is a
false-accept, not a pixel divergence: libaom refuses the whole frame, so there
is no correct output to diverge from.
MATCHER GAP WIDENED, AND DERIVED. A partition-symbol READ is now defined as a
`dec.<name>(..)` call whose OWN ARGUMENT LIST names a `partition_w<N>[` CDF.
That needs no hand-list: `dec.symbol(..partition_w..)` qualifies, the frame-edge
gather's `dec.symbol_fixed(&gather(..partition_w..))` qualifies, and
`dec.debug_state()` does not. The old test's read test was the literal
`dec.symbol(`, which is not a substring of `dec.symbol_fixed(` -- that spelling
gap is what hid the hole. The `var == "b"` skip is gone too: edge reads are
sites now and must carry a guard for their own level before the first
chroma-walking dispatch after them. Stated limitation: the definition is
syntactic, so a read reaching a partition CDF through a helper that does not
name it would not be enumerated; there is no such call in this file.
CENSUS ROWS NOW CLAIM A REAL GUARD. r2 was right that AtResolution asserted only
that some shape was BLOCK_INVALID and never mentioned a guard, so rows 5-12 and
19's guard column were prose. A resolution row now CARRIES the guard it depends
on -- (function scope, level) -- and the check looks for
refuse_invalid_subsize((L,L)) inside that function and before the walk's first
call there. Per-guard deletion now reds the census on its own for ten of the
twelve guards. Two are claimed by LEVEL, not by site -- the key-frame 8x8 second
resolution and the inter decoder's own 128-root -- and are caught instead by the
merged scan's resolution-count cross-check; the report says so rather than
papering over it. Three inter rows were added, because the inter 32- and
64-level guards were previously claimed by nothing at all.
ORDERING CHECK NO LONGER VACUOUS. The per-route loop resolved each pair's guard
with find() over the whole decode body, which returns the FIRST 16x16 guard --
the key-frame one -- so the inter pair was satisfied by a guard three quarters
of the file away and deleting the inter guard left it green. Each pair now
scopes its guard search to its own enclosing function. Verified: deleting the
inter 16-level guard at 54809 reds naming decode_intra_rect_in_inter.
ALSO: the stale inter-edge citation (54720/54733 -> the reads, 54777/54790), a
one-line note that two edits leaked into the primary through relative paths and
were reverted before any commit, and the headline that the find came from
censusing WALK sites rather than SYMBOL sites -- that reframing is the only
reason the hole was visible.
cargo check --tests clean. 28 named 422/sub8/subsize/chroma_422 tests pass
(includes the new witness gate). 270 pixel_exact/byte_exact pass, which is the
over-refusal control at scale.scripts: pin the 4:2:2 census probe to the merged-unwritten-dep buildAhmet Kaan Gümüş · 9448d3c
scripts: pin the 4:2:2 census probe to the merged-unwritten-dep build Provenance-checked: the binary embeds no lane worktree path.
Merge lane/unwritten-dep: two of the three unwritten-content rows were dump artefactsAhmet Kaan Gümüş · 1affa3d
Merge lane/unwritten-dep: two of the three unwritten-content rows were dump artefacts The class it was chartered to chase had one real member and two harness failures. Real: `440_request_is_422`'s output depends on plane memory the tile walk never wrote (224 unwritten chroma samples, U 112 + V 112, whole 4x4 groups) -- and the pre-deblock census already saw them, so it was never blind. The earlier "the deblock pass creates the dependence" reading came from `dump_stage16`, which cropped chroma as `(fw/2, fh/2)`: a 4:2:0 assumption that on a 64x64 4:2:2 frame hid 2048 of 8192 samples, exactly the rows where the difference lives. Fixed to per-axis `round_ss(fw, ss_x)` / `round_ss(fh, ss_y)` at all six call sites, with `round_ss(dim, 1) == div_ceil(2)`, so every 4:2:0 dump is byte-for-byte unchanged and no published number moves. Artefacts: `reelb_arf_witness`'s sentinel hash reproduces bit-for-bit as a TRUNCATED DUMP (frames 0..4 plus 13320192 bytes of frame 5) because every dump site discards its write errors; `reelb_rect64_intra16x4_witness` is not a defect at all, its hash stays unexplained and is filed as an open instrument-hygiene question. Both leaves the filed debt. Ships a census taken where the output is taken, paired with a scanned counter so "scanned and found nothing" is distinguishable from "never scanned", a synthetic non-vacuity control that no later lane can refuse, and mutations that red on a deleted call site and on a forced sentinel sample. Files rather than fixes the UB its own comments were hiding: `fresh_plane`'s `set_len` on uninitialised memory was justified by a premise 250 lines away in the same file had already withdrawn. The comments now say what the measurement says; the `unsafe` is labelled NOT FULLY JUSTIFIED with three closure options, none taken here.
lane-av1422liftverify: land the refutation pass report for the 4:2:2 liftAhmet Kaan Gümüş · e189999
lane-av1422liftverify: land the refutation pass report for the 4:2:2 lift The lane branch carried one commit (a 407-line report) that never reached main; landing it preserves the refutation record rather than leaving it in a worktree slated for removal.
lane-unwritten-dep r6: the SAFETY comment credited the gate with a census it does not performAhmet Kaan Gümüş · caad117
lane-unwritten-dep r6: the SAFETY comment credited the gate with a census it does not perform Report/comment accuracy only. Zero non-comment lines changed -- verified with git diff -U0 filtered for lines that are not /// or //. 1 -- THE GATE DOES ONE CENSUS, NOT TWO. decode.rs and report section 12 said the sentinel gate "counts at two points, pre-deblock and the output point". It does not: the gate reads only take_final_unwritten_samples / take_final_census_scanned, which is ONE census at the output point. The pre-deblock census (census_unwritten, take_unwritten_samples / take_census_scanned) is a different instrument, and section 13 of this lane's own report establishes it has NO committed reader anywhere in the crate on main. So the two-point claim told a reviewer auditing the unsafe that the premise is backed by two scans when only one exists -- and the missing one is exactly the scan that would catch a hole before the filters. Both sites now say the gate counts at the OUTPUT POINT ONLY and that the pre-deblock census backs nothing here, with the earlier two-point wording named as the error it was. 2 -- THE FILING NOW RESTS ON THIS LANE'S OWN MEASUREMENT. Section 12 filed the unsafe on "two distinct plain hashes across five runs", which is second-hand from lanes/av1unwritten.report.md:118-124, and section 10 of this same report says I did NOT reproduce it (five plain runs on 8d6998d7, one hash, a761118c8dd5c8d0). The basis is now the measurement this lane actually took: an exact u16 whole-plane census finding 224 unwritten chroma samples (U 112, V 112, whole 4x4 groups, rows 36..63) in a frame that is SHOWN and whose samples the caller receives. Uninitialised memory reaching the caller IS the UB and needs no hash claim. The hash observation is retained but labelled second-hand-and-not- reproduced, with the note that ambient content is machine-dependent so a stable value on one host and a varying one on another would be the same defect. The reachability paragraph was rebased the same way, and the decode.rs SAFETY comment no longer states the two-hash fact flatly. 3 -- ROW RANGE. decode.rs named the invisible region as "chroma rows 30..63". The old crop wrote fh.div_ceil(2) = 32 of 64 rows, so the region is rows 32..63, which is what section 4 of the report already said. The 2048-sample count was right; only the range was wrong. Corrected, with the arithmetic now shown inline. Not touched, per instruction: the same two-hash sentence inside chroma_plane_block_codable's "What led here" is lane/av1unwritten's own prose and accurately reports a measurement they made -- not mine to reword. The other stale-prose sites found by the class sweep, the decode path, film_grain.rs, the reserved 4:2:0 group-tail chroma SKIP arm, decode_rect4_16_intrabc, and the dump writers' error swallowing. No merge, no push.
lane-unwritten-dep r5b: the filed choice in section 12 is three-way, not two-wayAhmet Kaan Gümüş · 691273f
lane-unwritten-dep r5b: the filed choice in section 12 is three-way, not two-way Report only; no code change, no merge, no push. Adds the middle closure Main identified, which section 12 was missing: a zeroed allocation can come from the ALLOCATOR rather than a loop. alloc_zeroed / anonymous mmap hands back zero pages on first touch, which for plane-sized buffers costs a page fault rather than a per-sample store. It is recorded with the caveat that makes it honest -- an option that needs its own measurement, not a claim that it is free. The 4K cost is unmeasured in this lane, and "a page fault per page" is a mechanism, not a benchmark; whoever takes it must measure it before calling it cheaper than explicit zero-fill. The section now says "Three closures, none taken here" and the decision stays with a chartered lane. Also adds the connection the text implied but did not state: the withdrawn premise was doing DOUBLE duty. It justified the unsafe in fresh_plane AND it was the reason the census's original story -- a pre-deblock scan blind to a hole the loop filter later reads -- looked plausible. The same measurement that withdrew the safety argument is what made the blind-census reading wrong: there was never a blind pre-deblock scan, only a dump_stage16 that could not see half the chroma plane. So section 12 and the corrected stage bisect in section 4 are one fact read twice, and a reader who fixes one without the other will re-derive the error. That is the part worth leaving on the page for whoever picks this up. Verified before commit: no source file changed in this round, no stale "two closures" wording remains anywhere in the report, and the two source comments still carry "NOT FULLY JUSTIFIED" / "SAFETY, PARTIAL" with the unsafe unchanged. Gate remains green on the merged tree (1 passed, 816 filtered, 70.92s, measured in r5 and unaffected by this report-only change).
lane-unwritten-dep r5: the unsafe in fresh_plane is justified by a retracted measurement -- filed, not hiddenAhmet Kaan Gümüş · 6e36a7d
lane-unwritten-dep r5: the unsafe in fresh_plane is justified by a retracted measurement -- filed, not hidden
Three items. The first is the highest-risk thing this lane found and it is NOT
closed here; it is filed with its reachability evidence and the comments now say
so, so a reviewer can no longer approve the unsafe on a withdrawn proof.
1 -- fresh_plane's SAFETY ARGUMENT WAS A RETRACTED MEASUREMENT. The doc claimed
the SB-padded surface "is written sample-for-sample by the tile walk's
reconstruction before anything reads it" and cited the sentinel gate ("proven by
the sentinel gate above"). The same file retracts it: on 440_request_is_422 five
runs with uninitialised planes give TWO different output hashes, five sentinel
runs give one, and the pre-deblock census finds 112 unwritten samples per chroma
plane, 224 total. Output varying with the buffer's initial content means an
uninitialised sample was READ.
(a) Both comments -- the block doc and the inline SAFETY note -- now carry the
true, weaker claim. The gate proves no unwritten sample SURVIVES into the frame
the caller receives; it does NOT prove every sample is written before it is read,
because it counts at two points (pre-deblock, output) and therefore measures
survival, not reads. A sample read as a prediction or filter neighbour and
overwritten a moment later is invisible to both counts; no such read has been
observed and no instrument here measures for one. On main = e45cc748 the one path
where a read was demonstrated is unreachable (lane/av1unwritten refuses the
subsize before descending).
(b) Not silently reworded, and the unsafe is UNCHANGED -- the block says
"THE `unsafe` BELOW IS NOT FULLY JUSTIFIED" and the inline note says "SAFETY,
PARTIAL -- the premise is NOT established". Filed as report section 12 with the
two closures: (i) zero the allocation, the sound default, at the ~3% of
frame-thread cycles at 4K that lane-picalloc removed; or (ii) a per-sample
reads-before-write instrument, the only route that keeps the optimisation.
Neither taken here: both are decisions for a lane chartered for them. Report
section 12 also carries the reachability evidence -- a demonstrated read on
440_request_is_422 at 8d6998d7, now refused, and one refused witness cannot
establish the universal claim for the other 126 fixtures.
2 -- dump_stage16's DOC CONTRADICTED THE CODE. It still said it "matches aomdec's
own ec_dump16 rung byte for byte (crop dims, u16 LE)", true only of the 4:2:0
crop that was removed. Rewritten to the per-axis extent and to the oracle's
actual crop (rung 1 writes y_crop_width x y_crop_height and
uv_crop_width x uv_crop_height, each already per-axis), with the byte shape
tabulated for all four subsampling modes. Notes that round_ss at ss=1 is
div_ceil(2), so every 4:2:0 dump is byte-for-byte unchanged.
3 -- DOES THE GATE SUPPLY THE READER take_unwritten_samples LACKED? NO, and the
report says so. Checked: take_unwritten_samples and take_census_scanned still
have NO committed reader on main = e45cc748 -- the only references anywhere in
crates/ec-av1/src are in their own doc comments. This gate reads only its own
pair, take_final_unwritten_samples / take_final_census_scanned. So the r4
pairing is a TEMPLATE for how a census gate should be written (count AND
scanned, so "scanned and found nothing" is distinguishable from "never
scanned"); it is NOT a committed gate over the pre-deblock census, and no such
claim is made. Report section 13 names the gap rather than assuming it closed.
Green on the merged tree: 1 passed; 0 failed; 816 filtered out; 70.92s.
Not touched, per instruction: the other stale-prose sites in these files
(census_unwritten's "each frame's pre-deblock point" doc, the dead
stage_dump_idx(), the POSTFILT_DUMP rung reference), and out of scope: the
decode path, film_grain.rs, the reserved 4:2:0 group-tail chroma SKIP arm,
decode_rect4_16_intrabc, the dump writers' error swallowing.lane-av1subsizesweep: census every chroma-plane walk a BLOCK_INVALID subsize reachesAhmet Kaan Gümüş · 67c524e
lane-av1subsizesweep: census every chroma-plane walk a BLOCK_INVALID subsize reaches Closes the residue lane/av1unwritten named, and finds a wider one it could not see. The named residue, decode_rect4_16_intrabc, is CLOSED at the resolution rather than guarded a third time. Its own else arm (decode.rs:18336-18337) halves both axes unconditionally -- `(pw / 2, ph / 2)` -- and `own422` requires `horz`, so a VERT strip at ss (1,0) would derive a BLOCK_4X8 plane block, itself BLOCK_INVALID there. It is dead because the walk has exactly one caller chain into two 16x16-level 1:4 arms, and `partition_subsize_dims((16,16), PARTITION_VERT_4) == (4,16)` is in PLANE_BLOCK_INVALID_422, so `refuse_invalid_subsize((16,16), part16)` refuses exactly the shape that would be invalid. HORZ_4 gives (16,4) whose (1,0) cell is BLOCK_8X4 and is legal, so the surviving strip is the one `own422` is written for. All of that is now derived in the test, not asserted in a comment. The wider one: the key-frame 16-level FRAME-EDGE arm (decode.rs:37034) is the only partition read in the file that dispatches on its own symbol instead of resolving it into a `partN` the level's guard covers. The 128/64/32-level edge arms and the inter 16-level edge arm all resolve into a guarded partN; this one feeds `decode_leaf_rect` straight from `edge_split`. With a short column the strip is BLOCK_8X16, whose (1,0) plane block is BLOCK_INVALID -- a subsize libaom refuses at decodeframe.c:1456. The merged lane's structural scan cannot see it: its window keys on `dec.symbol(`, and this arm reads `dec.symbol_fixed(&gather(..))`. The guard names the LEVEL, not a shape: the gathered bit resolves to PARTITION_HORZ when the columns are full and PARTITION_VERT when they are not, and refuse_invalid_subsize reduces that through the same partition_subsize_dims every other site uses. So the 16x8 strip -- legal at 4:2:2, BLOCK_8X8 -- keeps decoding. Measured on real aomenc 4:2:0 streams of exactly this shape, the new site is REACHED with part=2 (VERT, the 8x16 strip) and reports codable=true while the frame decodes; it reds on the cell list, not a hand-picked shape list. No aomenc witness proves it FIRING, and none can: aomenc gates partition_rect_allowed on the same av1_ss_size_lookup table, so a conformant encoder never emits the symbol. 45 real 4:2:2 encodes were built and none reached the arm. That is the same residue-not-live-pixels status the merged lane's own guards carry; no witness is claimed. Red-before-green is mutation-based instead, both directions: deleting the guard reds, and moving it below the dispatch -- r5's defect in a new place -- reds. The new gate is a CENSUS over walk sites rather than symbol sites: 19 walks, each with the luma footprints its dispatch can hand it and the mechanism that protects it (dispatch-time guard / resolution guard / unreachable-with-reason). It derives the residue's subsize split from partition_subsize_dims, pins the caller counts, and checks guard < 1:4-arm-test < dispatch on each of the residue's two routes. 4:4:0 (0,1) is excluded from the offending set because no color_config can select it -- counting it would be the merged lane's own r2 mistake. It caught two errors in my own census before shipping: it flagged 16x4 as needing a guard because 4x4:0 marks it invalid, and it flagged the square walks as resolution-guarded when no shape they walk is ever invalid. Both fixed. cargo check --tests clean. 27 named 422/sub8/subsize/chroma_422 tests pass, including the pinned 4:2:2 corpus, bigblock, lossless-inter and intrabc-sb128 pixel-exactness gates. Report: lanes/av1subsizesweep.report.md -- the 19-row census table, and the wider hardcoded-chroma-halving sweep named for the owning lanes (the oracle helpers that slice chroma at width*height/4 are the dangerous ones: a future 4:2:2 gate using them compares half the oracle's bytes and passes green).
lane-unwritten-dep r4: the r2 story was still in the source; the gate now pins the call siteAhmet Kaan Gümüş · c14e1db
lane-unwritten-dep r4: the r2 story was still in the source; the gate now pins the call site
Six points from the r3 refutation. Two P1s in the code, four corrections.
1 (P1) -- THE r2 STORY WAS STILL IN THE SOURCE. decode.rs and stream.rs both
still carried the refuted claim ("the pre-deblock plane is BYTE-IDENTICAL (0
sentinel samples)", "the deblock pass is where the dependence is CREATED", "a
pre-deblock scan cannot see a hole the loop filter then READS"). The
stream.rs comment sat directly above the call and contradicted the corrected
numbers (224 pre-deblock samples; pre-deblock DIFFERS 2158 B). Both rewritten to
what was measured: the hole is present PRE-DEBLOCK, the census sees it, and the
earlier reading was a mis-cropped dump (dump_stage16's 4:2:0 chroma crop). The
same paragraph is corrected in the gate's doc comment, and the census's own doc
now states that its second count is NOT a patch for a blind pre-deblock scan --
it is the measurement taken where the output is taken, covering the whole route
from the tile walk to the caller.
2 (P1) -- THE GATE COULD NOT FAIL WHEN ITS CALL SITE WAS DELETED. The synthetic
control called census_unwritten_final DIRECTLY, so deleting stream.rs's call left
every assertion passing; the r3 mutation row claiming otherwise was false. The
gate now reads take_final_census_scanned() alongside
take_final_unwritten_samples() -- the pairing the merged pre-deblock census
already documents. Fixture arms require scanned > 0, the synthetic arm requires
scanned == 40 (16+16+8), so "scanned and found nothing" is distinguishable from
"never scanned". Re-proven by actually deleting the call line: RED, "the census
scanned 0 samples on reelb_arf_witness -- the call at the output point is not
running ... (class: census-never-ran)". Neuter mutation re-proven against the
targeted function: RED, "the synthetic control scanned 0 samples, expected 40".
(A first attempt at that mutation hit the pre-deblock census's identical guard --
which is itself a reason the targeted form is the one recorded.)
3 -- MERGE PROOF REPLACED. The 813->816 filtered-test delta is a count of names
and a merge that dropped hunks would print the same number, so it is dropped. The
proof is behavioural: on the merged tree 440_request_is_422 returns REFUSED (0
frames), only reachable with lane/av1unwritten's content; on the branch point
8d6998d7 the same fixture decodes to "OK: 1 frames decoded".
4 -- PUBLISHED-CONCLUSIONS IMPACT STATED. round_ss(dim, 1) is bit-identical to
dim.div_ceil(2), so every 4:2:0 dump is byte-for-byte unchanged; only 4:2:2 and
4:4:0 frames change. Of the 21 lane files referencing *_DUMP16, exactly one --
lanes/av1422luma.report.md -- uses non-4:2:0 fixtures, and its stage table is a
Y-only conclusion (every row "frame 0 Y wrong vs ffmpeg", luma counts, a luma
first-differing coordinate) which SURVIVES. What the change invalidates is only
that report's "depth-correct *_DUMP16" LABEL, now wrong for the chroma half of
those files. No published number moves. Coordinates reworded exactly: the span
runs cols 0-15 but is NOT filled (every row has 0-3 and 12-15), 28 whole 4x4
groups = 12 rows x 8 + 4 rows x 4.
5 -- GRAIN OVERREACH REMOVED. "grain ... cannot introduce a hole" was unmeasured:
the census never sees the planes apply_grain allocates. Deleted from the report
and from the gate's doc comment; the scope statement now claims only the pre-grain
planes and says explicitly that whether apply_grain can introduce a hole is not
measured here.
6 -- TRIGGER MADE CONSISTENT. census_unwritten_final gated on the raw env var
while fresh_plane and the merged census_unwritten gate on plane_sentinel_on()
(env OR the thread-local set_plane_sentinel), so any in-process test using the
thread-local would have found this census inert. It now uses plane_sentinel_on().
Green on the merged tree: 1 passed, 816 filtered, 71.69s. Dump writers' error
swallowing is untouched -- it is its own lane.lane-unwritten-dep r3: the census was never blind -- dump_stage16's 4:2:0 chroma crop wasAhmet Kaan Gümüş · 9e84e98
lane-unwritten-dep r3: the census was never blind -- dump_stage16's 4:2:0 chroma crop was 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.
lane-unwritten-dep: the reelb_* divergence is a truncated dump; the census blind spot is deblockAhmet Kaan Gümüş · 9fe4968
lane-unwritten-dep: the reelb_* divergence is a truncated dump; the census blind spot is deblock Neither reelb_rect64_intra16x4_witness.obu nor reelb_arf_witness.obu output depends on unwritten plane content on 8d6998d7. Both campaign PLAIN values reproduce EXACTLY (a26438168c, 8d7a43bc5f, `cat dir/frame.f*` shape); neither SENTINEL value does. Output is byte-identical across the crate's own PLANE_SENTINEL, five glibc MALLOC_PERTURB_ values, EC_AV1_THREADS 1/2/4/8, and in-process allocator-free-list poisoning, for all 34 / all 40 decode-order frames including every hidden alt-ref. 97ef82c0ce is reproduced bit-for-bit by a dump that stopped after 5 complete frames and 13320192 bytes of frame 5 (71.8% of one frame), the rest never written: EC_AV1_FINAL_DUMP ignores its write error, so a full filesystem leaves a prefix of the true byte stream and nothing says so. The census's blind spot, named with a stage bisect on 440_request_is_422: the pre-deblock plane is BYTE-IDENTICAL plain vs sentinel (0 sentinel samples) while the final output differs by 1986 bytes, and the difference enters AT deblock (PREFILT_DUMP16 identical, POSTDEBLOCK_DUMP16 differs by 26 bytes). Deblock reads a neighbour to decide an edge, so an unwritten sample changes its neighbour's filtered value even when the unwritten sample itself is overwritten afterwards. A scan taken before the filter cannot see that by construction. Fix: census_unwritten_final + take_final_unwritten_samples, called beside the EC_AV1_FINAL_DUMP site, i.e. where the output is taken. Gate the_frame_the_caller_receives_carries_no_unwritten_plane_sample asserts non-vacuity FIRST (32 on the 4:2:2 witness, the one fixture where a hole really reaches the output) and then 0 on four real film fixtures with hidden alt-refs. Three mutations red it: neutering the census, removing the call, and forcing one sentinel sample into one film frame's output. No display-order frame is affected on either fixture: no unwritten sample reaches the output at all, displayed or hidden. 440_request_is_422's cause is the invalid subsize lane/av1unwritten refuses; that lane is untouched.
Merge lane/av1unwritten: refuse the subsize libaom calls corruptAhmet Kaan Gümüş · 8d3f38a
Merge lane/av1unwritten: refuse the subsize libaom calls corrupt 440_request_is_422.obu is a 4:2:2 sequence header over a 4:2:0 tile, so its partition symbols name subsizes (8x16 among them) with no chroma plane block at ss (1,0). libaom refuses that at decodeframe.c:1445-1458 with "Block size %dx%d invalid with this subsampling mode", and aomdec refuses the file outright; libaom's own encoder never emits such a shape either (partition_search.c:3383-3389 gates partition_rect_allowed with the same table). This decoder walked those subsizes anyway, and its output for the witness depends on unwritten plane content. The fix mirrors libaom's check instead of inventing a geometry: the two BLOCK_INVALID cell lists of av1_ss_size_lookup are transcribed verbatim, a partition symbol is resolved to its subsize and refused there when that subsize has no chroma plane block at the frame's subsampling, and the refusal is a returned error naming the shape (a partition symbol is stream data, so hostile bytes reach it). Eleven guard sites cover the ten partition-symbol resolutions; the eleventh is the redundant one behind the shared read_sb128_root. Two instruments make the coverage checkable rather than asserted: EC_AV1_SUBSIZE_GUARD_TRACE records what each guard site sees over the corpus (exactly one codable=false observation corpus-wide, the key-frame 16-level VERT_B), and EC_AV1_SUBSIZE_ARM_TRACE does the same for unguarded dispatch arms. A structural test derives its site list from the bindings in this file, requires a guard for each resolution's own level, and asserts that no guard sits inside a PARTITION_HORZ_A..=PARTITION_VERT_B arm, which can only carry values 4..=7. Verified over four refutation passes. The decode path: no guard fires on a legal shape (all 20 genuine 4:2:2 fixtures decode, and partition_subsize_dims matches subsize_lookup cell for cell); 127-fixture sweep, the witness is the only row that changes and nothing newly refuses; the witness refuses while 422_key_64x64 still decodes. The checker itself failed three times and each failure is in the report: a four-cell hand-picked predicate that refused a legal 16x4 at 4:2:2, three guards placed inside arms that could not see the offending value, and an AB-arm tracker that self-cleared on the arm's own brace line. Residue, stated: decode_rect4_16_intrabc is out of scope and unaudited, and the guard-vs-resolution cross-check is level presence plus a 220-line window, not a dispatch bound.