forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 37dae756aaf763eb9cc259fd81f40c82799af692

2026-09-29

lanes/av1merge-wave3d: the wave reportAhmet Kaan Gümüş · 37dae75
lanes/av1merge-wave3d: the wave report

Three parallel branches off f33b9d41 merged in order, zero conflicts:
lane-av1clipprobe (b2c9f8a4), lane-ibc444c-r4 (10183674), lane-av1rungs17
(97b4ee04). lane-ibc444c and lane-ibc444c-r3 retired as stale duplicates.

Both hazards Main named were checked rather than assumed: the r4 stream.rs delta
is a single tail append with ZERO deletions, so a 3-way apply could not have
resurrected removed lines; and every merge's file list is exactly the branch's
own (3, 3, 4 files). The instrument script's diff is one hunk with zero
deletions before and after the merge, which is what makes its clean auto-merge
meaningful.

Two integration fixes, both the same wave-3c-b step recurring: a generated
artifact must be regenerated when the source it indexes moves (7a7b9665, then
149b2ad8). Main's tsv row-set check is empty after each; the unique path set is
159 before and after both.

Red-before re-measured on the merged tree: reverting only the two arithmetic
lines in decode_intrabc_rect reproduces luma sample 205264, the lane's figure.
The clipprobe lane's three behavioural cases all measured: absent root + require
env is RED naming both ways out, absent root alone is exactly one SKIP line then
ok, present root under require envs still passes sample-exact on all three tile
grids. The oracle rung checker is 14 ok / exit 0, superseding the 10-ok note.
Merge branch 'lane-av1rungs17'Ahmet Kaan Gümüş · 8f6b16fBrowse files
rungs 16/17: script EC_PREDOUT8 (with mode=) and EC_PREDND onto current mainAhmet Kaan Gümüş · 079a7cd
rungs 16/17: script EC_PREDOUT8 (with mode=) and EC_PREDND onto current main

Reconstruction, not replay. lane-av1cmpaudit's commit 3d0001bc predates the HBD
repair block that has since landed on main, so re-applying it as a patch would
clobber that block; the rung bodies were re-applied to the CURRENT script instead.
The script diff is one insert-only hunk (@@ -1076,0 +1077,153 @@), zero deletions,
so the repair block provably survives.

What was actually absent from main is bigger than it looked: NOT just the script
half. `grep -c 'OUR_PRED x={x} y={y} plane=' crates/ec-av1/src/decode.rs` is 0 on
main, so the Rust twin field (RECON_PLANE / recon_plane() / PlaneGuard, `plane=` on
both OUR_PRED sites) is absent as well, and 3d0001bc is not an ancestor of main.

1. rung 16, EC_PREDOUT8 at BOTH 8-bit prediction sites in reconintra.c (the
   non-directional early return and the directional / filter-intra tail), with
   `mode=` on both. Install on a pristine file, and upgrade of the no-mode form the
   oracle tree's git HEAD carries, so a rebuild reproduces the live tree.

2. rung 17, EC_PREDND, the 10/12-bit non-directional site. This is the one that
   matters: rung 16 and the pre-existing EC_PREDOUT both sit after the is_hbd early
   return, so without rung 17 a rebuilt oracle prints NOTHING on a high-bitdepth
   stream -- the failure the rung exists to remove.

3. decode.rs gains `plane=` on both OUR_PRED sites so an EC_PREDOUT8/EC_PREDND vs
   OUR_PRED diff can tell a luma/chroma disagreement from a same-plane one. Behind
   the existing EC_PRED flag; RECON_PLANE is read only by that rung.

4. check-aom-oracle-rungs.sh now also restores reconintra.c to pristine before
   deriving (it previously only restored decodeframe.c, so a rung living in
   reconintra.c was never exercised at all), and asserts: rung 16 installed at both
   sites, mode= on both, rung 17 installed once, mode= present, plus a round-trip of
   the no-mode upgrade form. All ten pre-existing checks still print ok, exit 0.
   Mutation-proved: deleting rung 17, dropping rung 16's directional site, and
   dropping its mode= each red the corresponding assertion.

Evidence (one configure, two aomdec builds differing only in reconintra.c):
12-bit av112bit-key.obu -> 118 EC_PREDND lines with the rungs, 0 lines and empty
stderr without them. 8-bit ii-flake-1.obu -> 15 EC_PREDOUT8 lines, 15/15 with
mode=, 0 without. Decoded output byte-identical either way (md5 6b29cc50... /
482b5e04...). On ours, decode_probe prints 177 OUR_PRED lines, all 177 carrying
plane=, pairing field-for-field with the oracle's first three EC_PREDND lines.

cargo check -p ec-av1 --lib: clean, no warnings.
scripts: the manifest again, after the ibc444c gate's two new pin sitesAhmet Kaan Gümüş · 9572640
scripts: the manifest again, after the ibc444c gate's two new pin sites

Same wave-3c-b step, second time in one wave: a branch that appends a test to
crates/ec-av1/src/stream.rs can add pin sites a `format!("fixtures/{file}")`
read cannot be seen by the generator's first pass, and the preflight's DRIFT
check then fails the tree.

297 -> 299 rows. This one is a pure tail append, so unlike the previous
regeneration there is NOT a single line-attribution shift: the whole diff is
the two new rows, which are real new coverage and are the ibc444c gate's own
two witnesses,
  crates/ec-av1/fixtures/420_intrabc_rect4_witness.obu  (stream.rs:48071)
  crates/ec-av1/fixtures/444_intrabc_rect4_witness.obu  (stream.rs:48069)
plus the host-state unnamed-literal count 191 -> 193, which the drift
comparison excludes by design.

    $ EC_REQUIRE_FIXTURES=1 scripts/verify-fixture-library.sh
      shape: 299 rows / resolve: 0 missing, 0 empty
      pin gates: total=8 committed=21 uncommitted=0 ignored=0 assertless=0
      invariant 4: census self-test passed; every pin-reading gate resolves
      the clip gates resolve .../fixtures too (EC_FIXTURES first, else $ROOT/fixtures)
      verify-fixture-library: GREEN (299 rows)   exit 0

Unique path set 159 before and 159 after; Main's row-set check is empty;
regeneration is idempotent.
Merge branch 'lane-ibc444c-r4'Ahmet Kaan Gümüş · bda1f98Browse files
scripts: the clipprobe manifest was stale on its own sourceAhmet Kaan Gümüş · 0d91363
scripts: the clipprobe manifest was stale on its own source

The lane shipped scripts/fixture-library.tsv at 295 rows, but this lane's own
generator, run over the source it committed, emits 297 -- so
`EC_REQUIRE_FIXTURES=1 scripts/verify-fixture-library.sh` is RED on DRIFT
immediately after the merge. Two kinds of staleness, both real:

  * the whole crates/ec-av1/src/stream.rs column is off by ~2 lines
    (committed stream.rs:8156, regenerated 8154) -- the artifact was generated
    before the lane's last stream.rs edit shortened it;
  * three rows are missing outright, the three `library_fixture::require(`
    sites this lane added: stream.rs:6298, stream.rs:45101 and
    library_fixture.rs:151.

The merge note said to take the lane's version on a conflict and re-run the
verifier; there was no conflict, and this is the same "regenerate on the merged
tree" step as the previous wave, so it lands as its own commit rather than
folded into the merge.

No coverage is lost. The unique PATH SET is 159 before and 159 after, and
Main's row-set check is empty:

    $ diff <(grep -v '^#' scripts/fixture-library.tsv | cut -f1 | sort -u) \
           <(regen | cut -f1 | sort -u)
    (empty)

Regeneration is idempotent (regen(regen(tree)) == regen(tree)) and, measured
while I was here, invariant under the staging shape the lane worried about: a
symlinked fixture root and a real directory produce byte-identical output (297
rows each, diff empty), so the 295-vs-297 gap was staleness, not host shape.

    $ EC_REQUIRE_FIXTURES=1 scripts/verify-fixture-library.sh
      shape: 297 rows / resolve: 0 missing, 0 empty
      invariant 1: positive control fired; no root-fixture pin path
      invariant 2: every committed pin is tracked
      invariant 3: negation present; no tracked pin shadowed
      pin gates: total=8 committed=21 uncommitted=0 ignored=0 assertless=0
      invariant 4: census self-test passed; every pin-reading gate resolves
      the clip gates resolve .../fixtures too (EC_FIXTURES first, else $ROOT/fixtures)
      verify-fixture-library: GREEN (297 rows)   exit 0
Merge branch 'lane-av1clipprobe'Ahmet Kaan Gümüş · 9e077c2Browse files
4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a halvingAhmet Kaan Gümüş · e7a1a68
4:4:4 intrabc rect chroma: size the plane block from ss_size_lookup, not a halving

Rebuilt on f33b9d41 (wave3c-b). decode_intrabc_rect sized a rect intra-BC
block's chroma plane block with a hardcoded 4:2:0 halving. libaom decides that
shape twice and neither site halves: av1_get_max_uv_txsize (blockd.h) is
ss_size_lookup[bsize] -- bw >> ss_x by bh >> ss_y at (px >> ss_x, py >> ss_y)
-- and get_vartx_max_txsize (blockd.h:1447) reads that plane block as
max_txsize_rect_lookup[plane_bsize], with decode_token_recon_block
(decodeframe.c:972-1005) walking the units from it. At 4:4:4 an 8x16 luma
block's chroma plane block is 8x16 and libaom codes it as ONE TX_8X16; the
halving read that same footprint as ONE 4x8 rect unit. This also UNSCOPES
lane-whtshape's `if lossless` conditional, which named the lossy 4:4:4 cell as
another lane's open cell. Identical arithmetic at 4:2:0.

MEASURED by trace, not by reading. This commit adds EC_IBCTX to
read_coeffs_rect (w, h, skip_ctx, sign_ctx, entry/post STREAM BIT, call site
via #[track_caller], deliberately NO plane label), EC_IBCTX2 to read_coeffs,
and EC_IBCBLOCK to decode_intrabc_rect; pairs against the oracle's EC_ECDUMP_IN
by stream bit position. Caller and plane, previously unestablished:

  oracle  bit 6870  plane=0 mi=(92,104) tx=7 (TX_8X16) all_zero=0
  ours    bit 6885  8x16 skip_ctx=0  read_inter_plane_rect
  oracle  bit 6878  plane=1 mi=(92,104) tx=7 (TX_8X16) all_zero=1
  ours    bit 6893  4x8  skip_ctx=0  read_inter_plane_rect  all_zero=0  <-- FORK
  oracle  bit 6879  plane=2 mi=(92,104) tx=7 (TX_8X16) all_zero=1

The txb_skip VALUE first disagrees one unit before the bit position does.
Reverting only the two arithmetic lines makes the gate's luma floor bite at
sample 205264 -- the exact ceiling lanes/av1444rect.report.md rounds 3-4
documented.

The gate doc states the CORRECTED finding, not the retracted one: the
coefficient ladder is NOT exact. Measured here with the 0-bit filter on BOTH
sides -- oracle 2395 all_zero reads (2359 with a real position), ours 3999
lines of which 1326 consumed bits, 71 interval matches. The chroma tail is a
second ENTROPY fork (~1069 reads missing), first at U/V (160, 80) = mi
(20, 40); the gate pins a measured per-plane exact prefix [307200, 51360,
51360] and says so. The doc also states that pairing must be by BIT INTERVAL,
not by index, and names the one-line oracle instrumentation that unblocks it
(aom_reader_tell after the aom_read_symbol at decodetxb.c:158).

Gate guard calls main's shared aomdec_available(NAME): ONE presence-check
shape in the crate, and with EC_AV1_REQUIRE_AOMDEC / EC_AV1_REQUIRE_AOMENC set a
missing aomdec FAILS instead of reporting green with the compare skipped.

A/B on a real tree -- `git diff main --stat` is exactly 2 files, +271/-20,
zero mu_chunk_order / read_intra_chroma_lossless churn, zero scripts/ touched;
both halves rebuilt in a lane-private target dir with touch before each run:

                            MAIN ONLY (f33b9d41)    MAIN + THIS LANE
  -- list                    753 tests                754 tests  (+1 = my gate)
  444                       ok. 36 passed; 0 failed  ok. 37 passed; 0 failed
  lossless                  ok. 25 passed; 0 failed  ok. 25 passed; 0 failed
  intrabc_rect              ok.  6 passed; 0 failed  ok.  7 passed; 0 failed
  gate_coverage             ok. 13 passed; 0 failed  ok. 13 passed; 0 failed
  refusal_inventory         ok. 19 passed; 0 failed  ok. 19 passed; 0 failed

Zero failures on either half; no test green on main is red here. Full batch:
a_444_intrabc_rect_chroma_plane_block ok 1 (4:2:0 twin byte-exact; luma
byte-exact 307200/307200; U and V byte-exact to sample 51360),
a_444_intrabc_rect4 ok 1, lossless_tx_tests ok 5, cargo check --all-targets 0
errors 0 warnings.

Straggler twins of the same halving are NAMED in the report, not merged:
decode.rs:16758 in decode_intrabc_owned_rect and decode.rs:19846 in
cfl_ac_q3_at. Neither is reached on this lane's witness, so fixing them would
be an unmeasured change to another path; lane-av1oraclepost's class sweep should
take them. The 3-way apply reported no conflict in either region.
lanes: av1clipprobe reportAhmet Kaan Gümüş · a5188cbBrowse files
ec-av1: the clip gates stop skipping green on an absent fixture rootAhmet Kaan Gümüş · 1f91edd
ec-av1: the clip gates stop skipping green on an absent fixture root

The 1080p multi-tile gate printed 'SKIP the 1080p tile round trip: no
fixture' and libtest reported ok on any tree without the gitignored root
fixtures/ -- which is every linked worktree. Eleven clip gates had that
shape, and none of them had an env that made the absence RED, so
EC_AV1_REQUIRE_FFMPEG=1 (a batch saying 'this gate must run') did not help.

New crates/ec-av1/src/library_fixture.rs owns the real-library fixture
root and the one presence probe. It resolves EC_FIXTURES FIRST, which is
the root scripts/verify-fixture-library.sh validates: the preflight and
the gates used to read two different directories, so pointing EC_FIXTURES
at a library elsewhere printed 'resolve 0 missing' and GREEN while every
clip gate skipped. It fails under EC_REQUIRE_FIXTURES /
EC_AV1_REQUIRE_FFMPEG / EC_AV1_REQUIRE_AOMENC and otherwise prints exactly
one SKIP line naming the resolved path and the three ways out.

Every clip gate now routes through it, the per-clip 'missing' drops in
the BD-rate and TPL probes included, and the preflight's last word is
GREEN-WITH-FINDINGS rather than a bare GREEN over a reported mode-(i)
finding. gen-fixture-library.sh learns the resolver's library-relative
literal so RESOLVE keeps checking the clip rows instead of losing them
the moment a gate stops spelling ../../fixtures.
lanes/av1merge-wave3c-b: the wave reportAhmet Kaan Gümüş · b207cf9
lanes/av1merge-wave3c-b: the wave report

Four merges (b94bc532 loss444kf, 2b7caad3 refusalspan, 75bf8f2f fixlib,
be6449ad probes) landed with zero conflicts; three branches retired with
ancestry/ancestor evidence. Per-branch verification, the name-set delta by comm
both directions, and the three integration fixes -- two of which turned out to
be fixes for reds that do not exist, and one that was real (the fixture manifest
stopped regenerating on the merged tree).

Also records the two claims that did not survive checking (--ignored --list is
51 -> 49, not 51 -> 50; one staging step would have certified a suite full of
silent SKIPs) and the server run, which is still executing: its unit name, staging
path and the command to read its totals are in section 6, and no total is
guessed anywhere.
scripts: regenerate the fixture manifest for the merged treeAhmet Kaan Gümüş · 1e2fda6
scripts: regenerate the fixture manifest for the merged tree

Merging this wave shifted the `required-by` line numbers in
crates/ec-av1/src/stream.rs and crates/ec-av1/src/encode.rs, and added two
pin-reading sites, so the manifest lane-av1fixlib committed no longer
regenerates: `EC_REQUIRE_FIXTURES=1 scripts/verify-fixture-library.sh` failed
on DRIFT (31 changed rows, of which 2 are new rows, not line shifts):

  - ll444_intrabc_rect_l2.obu  (stream.rs:7248, sha f0de080e...)
  - ll444_128root_lossless.obu (stream.rs:7302, a third site; the committed
    manifest had 7010 and 7130 only)

Both fixtures are committed blobs (601adaa2 / b888abd1), so the rows are
missing from the manifest, not the pins missing from the tree.

    EC_REQUIRE_FIXTURES=1 scripts/verify-fixture-library.sh
      shape: 305 rows / resolve: 0 missing, 0 empty
      invariant 1: positive control fired; no root-fixture pin path
      invariant 2: every committed pin is tracked
      invariant 3: negation present; no tracked pin shadowed
      pin gates: total=8 committed=21 uncommitted=0 ignored=0 assertless=0
      invariant 4: census self-test passed; every pin-reading gate resolves
      verify-fixture-library: GREEN (305 rows)   exit 0

Regeneration is idempotent here (regen(regen(tree)) == regen(tree)) and the
only non-line-number delta is the two added rows plus the host-state literal
count 189 -> 191.
Merge branch 'lane-av1probes'Ahmet Kaan Gümüş · aca5eb3Browse files
Merge branch 'lane-av1fixlib'Ahmet Kaan Gümüş · ce93bbfBrowse files
Merge branch 'lane-av1loss444kf'Ahmet Kaan Gümüş · 3bc9845Browse files
lane-av1refusalspan: a closer seen before the body opens is not oursAhmet Kaan Gümüş · eec2f7d
lane-av1refusalspan: a closer seen before the body opens is not ours

`depth -= 1` underflowed (debug panic, wrap in release) if the scan met a
`}` between the `fn` keyword and the body's `{`. Ignore it instead.
lane-av1refusalspan: a spinning scanner arm must fail the suite, not hang itAhmet Kaan Gümüş · ba38593
lane-av1refusalspan: a spinning scanner arm must fail the suite, not hang it

Found by mutation M3: replacing the string-literal skip with a plain
`continue` turns the boundary finder into an infinite loop, and the
boundary test hung for 600s instead of failing. Every arm now has to
advance the cursor, asserted at the top of the loop, so a future arm that
forgets to moves the failure from a hung suite to a failed one.
lanes: withdraw the suite-red flag on the three recipe gates, and record the ruleAhmet Kaan Gümüş · ae401f7
lanes: withdraw the suite-red flag on the three recipe gates, and record the rule

I flagged to Main that the wave had un-ignored three a_real_aomenc_* recipe
gates whose contract is "this feature must fire", and that they would red the
suite. That was read off two reports and one older tree, not measured. On the
base commit they PASS:

  cargo test -p ec-av1 --lib --release -- --test-threads=1 a_real_aomenc_
  test result: ok. 185 passed; 0 failed; 0 ignored; 0 measured; 564 filtered out
  finished in 833.35s

Individually, plainly and un-ignored:

  a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_and_delta_q...
    ok in 1.51 s -- the rewritten gate re-encodes a pinned 512x384 stream and
    byte-compares it; 48 delta_q symbol groups, 17 rect64_qidx_drift_hits, and a
    --deltaq-mode=0 control at 0 groups / 0 drift.
  a_real_aomenc_inter_sequence_with_an_intra_1to4_strip_decodes_pixel_exact
    6 frames pixel-exact, intra 1:4 strips 64x16=0 16x64=0 32x8=8 8x32=11
    (--enable-1to4-partitions=0 control: 0/0/0/0), 35179 B
  ..._10bit: 32x8=12 8x32=7 (control 0/0/0/0), 34727 B

So the wave REWROTE them from blind 40-stream sweeps into feature-armed gates whose
feature fires, and the un-ignore is correct. No re-ignore; the flag is withdrawn.

The report now carries the rule this lane exercised and broke once: an #[ignore]
reason must name the UNBLOCK CONDITION; a gate asserting "this must fire" has
exactly one unblock, so un-ignoring it is a claim about the decoder, not a
tidy-up. The counter-example is in the same file: this lane violated it by
reporting a disposition it had not measured.
lane-av1refusalspan: bound a proving gate's body by its own closing braceAhmet Kaan Gümüş · cc885c2
lane-av1refusalspan: bound a proving gate's body by its own closing brace

The refusal inventory's anchor check needed a gate's own text, and the
window rule it used ("the body ends at the next `fn` at the same
indentation, or at end of file") is not a function boundary on this tree:
a top-level `#[test] fn` in decode.rs has its next same-indent `fn` tens
of thousands of lines away, so the window reached end of file constantly
and one row's 27,427-line "body" was satisfied by the CHROMA sibling's
string seven lines down.

`gate_body` now ends the slice at the brace that closes the gate's body,
found by a scan that walks Rust rather than lines: string, raw-string,
byte-string, char and lifetime forms, line comments and nestable block
comments are skipped, so a brace inside one cannot move the boundary.
Every failure mode is a FAILURE -- no definition, a definition that is
never closed, an ambiguous name, or a body that still carries another
same-indent `fn` -- and none of them widens the window.

Re-measured over real bodies: 26 rows quote the whole refusal string, 7
quote its leading clause, 0 match neither. Nine rows the previous
measurement counted as anchored were not (their anchor was neighbour
text), so the nine gates now name the refusal they prove and pin its
guard site through `pins_refusal`.

New tests: the boundary's own non-vacuity (neighbour isolation, a brace in
a literal, the last function in a file, an unclosed body), and the same
boundary exercised over all three real sources.
lanes: classify the ignored ec-av1 probes, un-ignore the 1080p tile gateAhmet Kaan Gümüş · 408e7cf
lanes: classify the ignored ec-av1 probes, un-ignore the 1080p tile gate

lane-av1probes. The release triage dispositioned the 15 process-global gates
and skipped the probe/benchmark set; that set was a black box. This lands the
classification and the three fixes it found.

Measured (release, one cargo invocation per test name, EC_AV1_REQUIRE_FFMPEG=1
EC_AV1_REQUIRE_AOMENC=1 EC_REQUIRE_FIXTURES=1, TMPDIR off the tmpfs) on server
host-a and on the workstation for the real-library rows: 38 ignored
non-gate items at base 745c60e7 -- 32 REAL DIAGNOSTIC VALUE, 5 STAGING, 1
ROBUST-RED, 0 DEAD WEIGHT, 0 decoder defects. Nothing in the set is dead; what
was broken is the REASON TEXT, which is what this commit fixes.

1. UN-IGNORE a_1080p_multi_tile_stream_decodes_sample_exact_through_both_decoders.
   It was ignored only for its wall ("1080p encode: minutes") and is the only
   1080p arm in the ignored set that ASSERTS. Plain release run on this tree:
   1080p 2x1/2x2/4x2 tiles, 84488/84208/84685 bytes, all sample-exact, ok in
   27.39 s. The check is a per-frame first-differing-luma-sample comparison
   against ffmpeg, not a length or non-empty smoke. Both skippable halves route
   through the crate's EXISTING probes (h264_clip_frames -> have_ffmpeg() +
   clip.exists(), and have_ffmpeg() for the ffmpeg arm); no new presence-check
   shape. Ignore count 51 -> 50.

2. REASON REWRITES, 11 items whose reason misdescribed them. The wall
   benchmarks now carry their measured wall and their host floor
   (tile_search_wall_1080p TIMED OUT at 2400 s on a 4-core server and takes
   1243 s on 12 cores); filter_stage_wall_film says it measures the BARS
   fixture without EC_AV1_WALL_CLIP; the four bare #[ignore] scratch probes
   name their env vars, including the three geometry vars of
   scratch_isolate_pinned_mismatch whose 64/64/1 default is wrong for every
   real pin; sweep_rectx_recipes stops carrying a lane label;
   tpl_intra_denominator_histogram stops claiming film fixtures it never
   opens; the two prune_k sweeps say they are local-run because their clip
   paths are hard-coded /home/user absolutes; probe_split says it panics on
   its own lossless synthetic rows.

3. stage_timing_breakdown_inter printed "motion search (NEWMV) 17.82ms (of
   which interpolation 148.63ms)" -- a sub-number larger than its parent. Both
   timers were always real; the print's attribution was wrong. Bucket 0 times
   only the NEWMV/GLOBAL sub-search (stage_since(0) fires after
   find_best_new_mv and the global-MV search), and bucket 1 is EVERY
   mc::predict call including a committed block's final prediction, which runs
   outside any bucket-0 region. Bucket 1 is now its own top-level row with the
   overlap quantified and explicitly not added to the total; the residual is
   labelled for what it contains. The accounting closes: 107.27 + 157.56 =
   264.83 ms against a 264.82 ms wall.

No decoder logic changed: every source edit is a #[ignore] reason, a doc
comment, or the one eprintln block above.
lane-av1loss444kf: a sub-8x8 RECT leaf's chroma unit gets the LEAF's reachAhmet Kaan Gümüş · cecc096
lane-av1loss444kf: a sub-8x8 RECT leaf's chroma unit gets the LEAF's reach

The 4:4:4 lossless 256x256 key frame (109215 B, sha256 4563a01f17786000...)
decoded with 21 U + 28 V samples wrong over x 196..207 / y 200..203, luma
exact, entropy bit-locked over all 81933 symbol reads and its 12288
transform units at identical absolute (plane, x, y). The whole filter chain
is inert on both sides of that frame (the oracle's pre-deblock, post-deblock,
post-CDEF and final dumps are byte-identical to each other, and so are ours),
and on a lossless frame the pixel delta IS the prediction delta -- so the
residual, the dequant scale and the 4x4 WHT placement are exonerated by
arithmetic, not by search.

libaom asks has_bottom_left with the LEAF's bsize, the unit's (row_off,
col_off) and tx_size, and answers TRUE inside the left column whenever
`row_off + count < plane_bh_unit` -- the block's own next row, already
reconstructed. A 4x8 leaf's first TX_4X4 unit therefore has four real
bottom-left samples. sub8_leaf_chroma444 looked a standalone BLOCK_4X4 up at
the unit's own position instead, got false, and PlaneBuf::edges replicated
the last left sample across the edge's full reach: the unit predicted
D203/CFL from a fabricated edge. A from-scratch transcription of libaom's
z3 + edge filter + upsample reproduces all 16 oracle samples of each damaged
unit with the real column and all 16 of ours with the replicated one, and the
damage in the 2nd and 3rd blocks is that first wrong block's pixels read back
as their left edge.

Fix: Reach::of_tu over the leaf's own (bw, bh, col_off, row_off, tx) with the
block reach the function already computes -- at both lossless 4:4:4 arms, the
intra one and the intrabc one, which is what the 4:2:2 twin of this function
was already fixed to do (lane-av1-422kf2). 49 -> 0 on the 109215 B carrier and
on the independent 109909 B one.

Witness: a_lossless_444_sub8_rect_leaf_chroma_reach_decodes_the_key_frame_pixel_exact
-- live re-encode pinned by length and fnv1a64, 4:4:4 header asserted,
key frame byte-exact against aomdec --limit=1, and the new
sub8_chroma444_lossless_tu_reach_hits() counter (86 on this cell) proving the
fixed path fired. Red-before with only the two reach expressions reverted:
"differs from aomdec in 49 samples (first Some((1, 201, 200, 160, 159)))".

4:2:0 and 4:2:2 are structurally untouched (every call site sits behind
`chroma_444`), and a square 4x4 leaf is provably unchanged (of_tu falls
through to the block's own answer, which for a square leaf IS the old
lookup). -- lossless 444: 48/0. -- 420: 2/0. -- intrabc: 21/0. -- 422: 6/0.
lanes: wave-3c-a merge report -- two branches in, fixlib held, census sweepAhmet Kaan Gümüş · 90e4e6e
lanes: wave-3c-a merge report -- two branches in, fixlib held, census sweep

lm444loss-corr (879c11e2) and oraclehbd (8667050b) merged --no-ff, both
predicted clean by merge-tree and both clean in fact. One integration fix
followed: the new gate's bare `aomdec_path().is_file()` is what the wave-3b
oracle-presence scan exists to reject, and it reds on the merged tree
(6c1d78a6 routes it through aomdec_available).

fixlib is NOT merged -- Main's hold stands. Its acceptance line is measured
anyway: census total=8 committed=21 uncommitted=0 ignored=0 assertless=0 with
the prose restored, census self-test PASS, preflight GREEN (303 rows) exit 0.
lane-av1fixtureshape is verified subsumed by ancestry (c1cf1758 is the merge
base) -- a check that read NOT-SUBSUMED earlier in the wave against the older
tip, which is why it is re-run at merge time.

Name sets: 748 -> 749, comm clean in both directions, no duplicate
registrations, 29/0 on the gate_coverage|refusal_inventory|count_vacuity family.
wave-3c-a: route the lm444loss-corr gate's oracle arm through aomdec_availableAhmet Kaan Gümüş · d48c08a
wave-3c-a: route the lm444loss-corr gate's oracle arm through aomdec_available

The merged branch's new gate guarded its pixel compare with a bare
`aomdec_path().is_file()`. The oracle-presence scan merged in wave 3b
(7a865ee7) rejects exactly that shape outside the probe that owns it, and
reds on the merged tree:

  gate_coverage::tests::no_tool_presence_check_outside_its_probe
    1 bare tool presence check(s) outside a probe
    stream.rs:7271: if aomdec_path().is_file() {

A bare is_file() skips the compare with NO env escape, so under
EC_AV1_REQUIRE_AOMENC=1 the gate would still report green with the oracle
compare never run -- the "unreadable gate is unproven, not clean" class.
`aomdec_available(NAME)` carries the env-escape assertion and the SKIP
line, so the hand-rolled else-arm is dropped rather than kept alongside.

cargo test -p ec-av1 --lib -- gate_coverage refusal_inventory count_vacuity
  29 passed; 0 failed
Merge branch 'lane-av1oraclehbd'Ahmet Kaan Gümüş · 3bf8d88Browse files
lanes: the shared oracle gets the depth-correct, byte-checked rungs (zero-window swap)Ahmet Kaan Gümüş · 4b63be1
lanes: the shared oracle gets the depth-correct, byte-checked rungs (zero-window swap)

The private copy was never the problem: ~/.cache/aom-oracle shipped the same four
broken rungs, so every lane that ever paired against them on a 10/12-bit stream
got a 0-byte file -- which reads downstream as "the oracle has no data for this
stage" and becomes a phantom stage diff.

Swapped with no window, because ps showed a live lane (cargo-target-av1lm444corr,
a_10bit_film_frames_with_frame_edge_mv_clamping...) exec'ing the shared aomenc
at that moment: hardlink backup aomdec.prefix-20260929-054321 + source copy in
revert/, source edit (a file no running process reads), ninja libaom.a only, the
link command re-run with -o to a scratch path, the new binary verified fully
OFF-PATH, then one mv (inode 177294570 -> 177592760). Revert:
  mv ~/.cache/aom-oracle/build/aomdec.prefix-20260929-054321 ~/.cache/aom-oracle/build/aomdec
  git -C ~/.cache/aom-oracle/src checkout -- av1/decoder/decodeframe.c

Verified ON the shared binary after the flip: five rungs exit 0 on av112bit-key.obu
(12-bit, 30720 B each; rung 12 61440 B) and palette_screen_witness_10bit.obu
(10-bit, 73728 B each; rung 12 147456 B); 8/8 byte-identical to the decoder's as
u8 rows; 8-bit no-op vs the backed-up OLD binary 10/10 IDENTICAL (32768 B and
6144 B). Loudness proven live in the shared tree by a mutant also linked off-path
(12-bit: exit 134, expect=30720 wrote=30560; 8-bit: expect=6144 wrote=6080).
check-aom-oracle-rungs.sh against the shared source: 10 ok, exit 0.

Naming: no lane in today's waves (3a: av1cmpaudit/av1leftwit/av1lossy128x96/
av1pinslive/av1txsearch; 3b: av1rawhelper/av1oracleskip) paired against these four
rungs -- cmpaudit records them as having no in-repo consumer, rawhelper names
PREFILT only as dump_yuv's documented contract and gates on rung 12, oracleskip is
the aomenc-SKIP class. No test anywhere sets those env vars, so no automated gate
could rest on a 0-byte dump. Historical users were 8-bit lanes, where the old
rungs were correct.
census: comment-stripped matching plus a self-test in the shape that cost a gateAhmet Kaan Gümüş · 3972653
census: comment-stripped matching plus a self-test in the shape that cost a gate

The strip was real but landed in 2b4ecf71, not in the commit I told Agent01-5 it
was in, so their measurement against 12cae635 was accurate for that tree: a doc
comment belonging to the NEXT gate lands inside the previous gate's body (fn_bodies
spans fn-line to next-fn-line), ROOT_RE matched the comment, the gate was
reclassified into the root-literal branch, found no names and hit continue. The
census count dropped and NOTHING went red -- unproven read as clean.

Two things close that door:
  - every search (ROOT_RE, JOIN_RE, the crate_pin/pin_dir singles, the asserts
    check) matches on a comment-stripped body, /* */ and // and /// alike;
  - scripts/pin-gate-audit.py --self-test is a POSITIVE CONTROL in the exact
    shape: a comment reproducing the forbidden literal INSIDE a gate that reads
    crate_pin, plus a second gate after it. It runs the real pipeline over a
    synthetic tree in a temp dir, so it works on a read-only staged tree, and it
    asserts BOTH gates are still counted as crate_pin. The verifier runs it and
    fails if it does not pass.
    MUTATION-PROVED: with the stripping removed from the self-test path it fails
    with reclassified=[('selftest_a_reads_a_pin', 'root-literal')]; restored, it
    passes. A control that only proved 'the scanner finds a forbidden literal'
    would NOT have caught this, which is why it is a separate control.

Re-measured with the verbatim prose restored (the state that ships): census
total=8 committed=21 uncommitted=0 ignored=0 assertless=0, code-shape violations
0, both positive controls firing, verify GREEN (303 rows).
ec-av1: restore the verbatim forbidden literal in the golden7 doc commentAhmet Kaan Gümüş · 62d9c1e
ec-av1: restore the verbatim forbidden literal in the golden7 doc comment

My first commit reworded this comment so a plain grep could not match the
banned concat! literal it quotes. That was the wrong fix: the sentence
explains the shape the gate removed, which is exactly what a reader needs,
and the real defect was the scanner, not the prose. lane-av1fixlib 12cae635
strips comments before invariant 1 matches and plants a positive control,
so the literal is now correctly ignored as prose:

  EC_REQUIRE_FIXTURES=1 scripts/verify-fixture-library.sh
    invariant 1: no root-fixture pin path
    code-shape violations: 0
    verify-fixture-library: GREEN (303 rows)   exit 0

Comment restored to the text it had before 2364d7a7. No behaviour change:
pinned_golden7_stream_decodes_pixel_exact still passes.

Branch rebased onto 12cae635 so the preflight is committed in this tree
rather than copied in untracked; scripts/ is 12cae635 verbatim.
report: correct the wrong-gate attribution, and close the last census blind spotAhmet Kaan Gümüş · 3371138
report: correct the wrong-gate attribution, and close the last census blind spot

An earlier version of section 6 named pinned_lr_sgr_stream_call_unique_dump as
reading /../../fixtures/lr-sgr-r7.obu. It does not: at that base the gate already
read crate_pin("lr-sgr-r7.obu"). The only invariant-1 hit in the tree was a DOC
COMMENT inside pinned_golden7_stream_decodes_pixel_exact reproducing the literal
verbatim while explaining the shape it removed -- prose, not code, and a report
that names the wrong gate sends the next reader to the wrong file. The real
violation was the warp gate, closed by Agent01-5's 2364d7a7.

Also: the census printed one GATE row per NAME in the crate_pin branch (21 rows
for 8 gates) while COUNT total=8 was the real number. One row per gate now, and
one per name on the NAME rows where the detail belongs.
lanes: make a narrowing-rung regression loud, and check the derivationAhmet Kaan Gümüş · c755a39
lanes: make a narrowing-rung regression loud, and check the derivation

The depth fix made the four u8-narrowing rungs correct; the harm that caused
was their SILENCE -- a segfaulting rung leaves a 0-byte file, which downstream
reads as "the oracle has no data for this stage" and becomes a phantom stage
diff, or as evidence about the decoder. Two additions:

1. ec_dump_finish(): all four narrowing rungs now close through a byte-count
   check against the shape they claim (Y+U+V at one byte per sample, crop for
   PREFILT, mi-aligned for the other three) and abort() with one self-naming
   line on a mismatch. Non-vacuous: dropping PREFILT's last luma row makes
   aomdec exit 134 with
   EC_DUMP_ABORT rung=EC_AV1_PREFILT_DUMP bit_depth=12 hbd=1 expect=30720
   wrote=30560; restoring it gives exit 0 / 30720 B. Rung 12 keeps its own
   fclose (charter: do not change rung 12) and the rewriter cannot reach it --
   it keys on a rewritten ec_dump_narrow_row call in the block. Monochrome
   expects luma only; a failed fopen skips the block, so no config writes 0.

2. scripts/check-aom-oracle-rungs.sh: derives decodeframe.c from PRISTINE
   upstream (scratch copy, real tree never written) and asserts 0 legacy row
   loops, 12 narrow_row call sites, 4 finish call sites (one per rung), rung 12
   still converting and not narrowed, and that a second run is a no-op. Exit 0
   today; deleting the depth block from a copy of the script makes it print 7
   FAILs and exit 1 in under a second, with no build.

Emitted bytes unchanged: re-paired av112bit-key.obu (12-bit) and
palette_screen_witness_10bit.obu (10-bit), all four rungs oracle vs decoder,
all IDENTICAL.
av1lm444loss-corr: close the handoff loop; fix a self-contradiction in 8.1Ahmet Kaan Gümüş · 44dc399
av1lm444loss-corr: close the handoff loop; fix a self-contradiction in 8.1

8.1 concluded the fork was 'a genuine block-level walk divergence' while 10.3
says that framing was wrong in substance because the frame boundary had not
been measured. A reader arriving at 8.1 first was being told something the
report later takes back. Marked SUPERSEDED IN PART with a pointer to 10.3 and
kept both, because retracting a caveat is not the same as getting the rest
right.

Records Agent02-2's FINAL: they adopted the (a)/(b) split, fixed and gated (b)
(the intra tail passing a TX_32x32 unit size where decode_token_recon_block
walks the chroma span of 64 >> ss), and handed (a) over with a three-file
search space. They reproduced this lane's 109909 B fixture byte-for-byte.
This lane claims no part of that cell.
av1lm444loss-corr: the 256x256 key frame is reconstruction-only, not a walk forkAhmet Kaan Gümüş · 4450532
av1lm444loss-corr: the 256x256 key frame is reconstruction-only, not a walk fork

Per-frame EC_SYMR counts on the 109909 B stream put the key frame at 82697
reads with NO fork inside it; the first fork (125511) is in decode_idx=1.
So the key frame's 49 chroma samples are reconstruction-only -- its entropy
is bit-locked, which rules out the mu-chunk walk, plane threading and the
coefficient sets as their cause. Two independent encodes agree, so it is
one confirmed defect on the reconstruction side.

Corrects my own handoff: I called 125511 'a genuine block-level walk
divergence' without having measured the frame boundary. The cell has two
symptoms -- (a) key-frame reconstruction-only, (b) frame-1 entropy fork --
and they are not linked by reconstruction. Also records that my first
ladder script compared cdf0 directly, the one field whose convention
differs across the two sides.
av1lm444loss-corr: hand the 256x256 cell to Agent02-2, retract the mi-label caveatAhmet Kaan Gümüş · 122df9e
av1lm444loss-corr: hand the 256x256 cell to Agent02-2, retract the mi-label caveat

The second defect (4:4:4 lossless 256x256, key frame, 49 chroma samples,
first U(200,201)) is handed to Agent02-2, whose tripwire is the same sample.
Three measurements RETRACT this report's earlier 'the mi labels are
transposed, so the fork is a labelling artefact' caveat: both sides print
mi in the same field order, swapping ours (32,0) gives (0,32) not the
oracle's (0,48), and the labels agree on 71.8% of the preceding reads --
so read 125511 is a genuine block-level walk divergence.

Also records that the two sides use different ph vocabularies (ours emits
ph=inter8 for the sub-8x8 leaf arm, the oracle has no such phase), so ph is
not pairable either; and two lore items for the batch -- a luma first-fork
as the signature of a chroma arithmetic error, and the two-row
non-vacuity shape this gate uses.
av1lm444loss-corr: report -- the ss-aware replay step, and why the old branch is do-not-mergeAhmet Kaan Gümüş · 9dcbf14
av1lm444loss-corr: report -- the ss-aware replay step, and why the old branch is do-not-merge

Records that lane-whtshape already merged the lossless arm my r2/r3
re-implemented, that lane-av1lm444loss is superseded rather than merged,
and that the old report's own provenance line was stale. States the step
rule from the codebase's own reference construction (decode.rs:43688),
proves 4:2:0 identity arithmetically before measuring it, and gives the
mutation proof for the one-line correction.
ec-av1: step the intrabc-rect lossless chroma replay by the unit's own mi footprintAhmet Kaan Gümüş · 30d94ca
ec-av1: step the intrabc-rect lossless chroma replay by the unit's own mi footprint

lane-whtshape (f541d062, merged afa13bcf) gave `decode_intrabc_rect` the
per-TX_4X4 lossless chroma walk and the tail replay that re-stamps each
unit's own coefficient context over the whole-block record. The replay
stepped the mi origin by `4 >> ss_y(fctx)` cells, which is 4:2:0-only
arithmetic.

A TX_4X4 chroma unit covers `4 << ss` LUMA pixels, so its origin in the
luma-mi grid advances by `(4 << ss) / MI`. That is the form
`decode_inter_block`'s reference `mu_chroma_units` construction already
writes (decode.rs:43688, `at.0 + cr * ((cu << ss_y(fctx)) / MI)` with
cu = 4 on a lossless frame); this site was the outlier.

  ss (1,1) 4:2:0: `4 >> 1` = 2 mi, and `(4 << 1) / 4` = 2 mi -- the SAME
              number, so 4:2:0 is unchanged BY CONSTRUCTION, not by
              measurement alone.
  ss (0,0) 4:4:4: `4 >> 0` = 4 mi = 16 luma px per 4x4 chroma unit, where
              the unit covers `4 << 0` = 4 luma px = ONE mi. Every replayed
              unit was stamped at 4x its own mi row/column, writing over
              cells belonging to other blocks.

Measured on `ll444_intrabc_rect_l2.obu` (testsrc2 512x128 yuv444p,
aomenc --lossless=1 --cpu-used=2 --lag-in-frames=0 --kf-max-dist=100
--limit=6, 121844 bytes, sha256 f0de080edce35d34cdd628b71f63dc452
f946e8328352b69d3c1da090a54ec67), which reaches it: before, 10604 samples
wrong in the KEY frame, first at byte 33216 (Y(64,448)) -- the corrupted
chroma context desyncs the following luma, which is why the first
divergence is luma at all; frames 1-5 123987..171988 wrong. After: all
six frames byte-exact against the oracle aomdec in decode order, and the
EC_SYMR ladder is 540833 reads on both sides with zero fork.

Gate `a_lossless_444_intrabc_rect_replay_steps_by_the_units_own_mi_footprint`
asserts the 4:4:4 shape from the stream's OWN parsed sequence header (at
(1,1) the two steps are the same number, so a 4:2:0 stream cannot fail
this gate), that lane-whtshape's own INTRABC_RECT_LOSSLESS_CHROMA4_HITS
counter fired so the corrected expression was evaluated, luma-sized chroma
extents, and decode-order byte-exactness. Control arm: the 128x96
4:4:4 lossless pin must read that counter 0 -- whole square blocks have no
multi-unit chroma plane block to step.

Mutation proof, run: reverting only the step expression and nothing else
turns the gate RED at "decode-order frame 0 of 6 differs from the oracle
at byte 33216 (ours 101 vs 100), 10604 bytes differ"; restored from a
saved copy with cp, verified with diff -q, LIVE run ok.
flip shape to fatal by default: both live violations are closedAhmet Kaan Gümüş · 59fe559
flip shape to fatal by default: both live violations are closed

Agent01-5's 2364d7a7 (merged) closed both crates/ec-av1 shape violations -- the
root pin reads crate_pin("lr-sgr-r7.obu"), and all fourteen warp pins are
committed under crates/ec-av1/fixtures/ and read through the pin helper, which
also un-ignores the gate. EC_REQUIRE_FIXTURES=1 scripts/verify-fixture-library.sh
is now GREEN (303 rows) with shape fatal by default: SHAPE=:-1. --strict and
EC_FIXTURE_SHAPE_STRICT=0 are the escape hatches.

Three defects this lane's own preflight had, each found by running it somewhere
other than its own tree, each the class the lane exists to prevent:
  - off-git the tracked column was recomputed as no-git for all 37 pin rows, so
    every host reported DRIFT with a good library;
  - invariant 1 could not see a comment -- a doc comment reproducing the
    forbidden literal to explain the fix read as a live violation for a round;
    it now strips comments before matching;
  - the census's single-name branch neither counted ignored nor noticed a
    crate_pin whose name is built at runtime, so such a gate vanished silently;
    it now counts ignored and emits a BADCALL row the preflight fails on.

Five modes re-measured after the flip: A 0, B 1, C 0, D 1, E 0 (was 1), and F --
a reintroduced concat! root-pin line -- 1 with no flag at all.
ec-av1: both live fixture-pin shape violations closed in stream.rsAhmet Kaan Gümüş · 58044e9
ec-av1: both live fixture-pin shape violations closed in stream.rs

The preflight named two sites in this crate.

1. The lr-sgr-r7 gate already read through crate_pin at HEAD; the
   remaining invariant-1 hit was a DOC COMMENT in
   pinned_golden7_stream_decodes_pixel_exact quoting the forbidden
   concat!(CARGO_MANIFEST_DIR, "/../../fixtures/...") shape verbatim to
   explain what had been fixed. The grep cannot see a comment, so the
   crate carried a live violation that was pure prose. Reworded to
   describe the shape without reproducing the literal; the history the
   comment exists to keep is unchanged.

2. pinned_warp_stream_decodes_pixel_exact bound one gitignored root
   directory literal and formatted 14 runtime names against it, so no
   committed tree could satisfy it and the gate skipped GREEN having
   read nothing. All fourteen pins are present in the runner library:
   they are committed under crates/ec-av1/fixtures/ byte-for-byte
   (warp-mismatch, warp-flake-5/7, ii-flake-1/2/3/5/6/7/8/9,
   rect-flake-1/2/3) and each is named by a string literal through
   crate_pin, the spelling pinned_golden3/4/7 and pinned_sbpart
   already use. The helper now takes a Path and reads through
   require_pin, so an absent pin is a hard failure naming the crate-local
   path rather than a raw io panic.

With the pins committed the gate is un-#[ignore]d: a plain run decodes
all fourteen and carries warp_selected_hits 0 -> 113, so it is a real
gate rather than a no-op with a better excuse. Costs 1.8s plus ffmpeg,
which have_ffmpeg() already gates.

Preflight, EC_FIXTURE_SHAPE_STRICT=1: no invariant-1 and no
invariant-4 FAIL, census uncommitted=0 (was 14).
Merge lane-av1oracleskip r3 @ 7a865ee7 — the oracle-presence scan that closes the class structurallyAhmet Kaan Gümüş · b4cb053
Merge lane-av1oracleskip r3 @ 7a865ee7 — the oracle-presence scan that closes the class structurally

# Conflicts:
#	crates/ec-av1/src/gate_coverage.rs
run the golden7 behavioural half, and make the strict flip one character awayAhmet Kaan Gümüş · db6f6f1
run the golden7 behavioural half, and make the strict flip one character away

The gate RUNS and PASSES: non_last_ref_hits before=0 after=2, exactly the delta
its own doc records, reproduced by the recovered pin -- the self-validation a
re-encode cannot pass. It is live in the merged tree (no #[ignore]).

Two things worth writing down for whoever repeats the run: the shared
$HOME/.cache/cargo-target held a stale ec_av1 binary built from ANOTHER worktree
of the same package, and its panic named a line that does not exist in this
source; a lane-scoped CARGO_TARGET_DIR is required. And the substring filter
does not match, so --exact with the full test path does.

verify-fixture-library.sh now takes --strict as well as
EC_FIXTURE_SHAPE_STRICT=1, so the default can be flipped to fatal the moment the
last shape violation lands, with no other edit.
Merge lane-av1oracleskip @ 7bf95961 — one aomdec_available() for 18 guard sites, 7 redundant else skip-arms deletedAhmet Kaan Gümüş · f94e32d
Merge lane-av1oracleskip @ 7bf95961 — one aomdec_available() for 18 guard sites, 7 redundant else skip-arms deleted

# Conflicts:
#	crates/ec-av1/src/stream.rs