forge
Explore
Log in

Don't you dare go Hollow

r2: rebase onto merged main, delete the unreachable drl gate, re-verify the pins

Browse files at this commit

fac47ce182b1e9f32218b8b84ce97a197026cb68Ahmet Kaan GümüşParent: a7e1d4c
Gate 1 is DELETED rather than kept-with-a-better-ignore, on evidence rather than
preference: its precondition is unreachable (r1), and its pixel half -- the
decode-vs-encoder-reconstruction compare on a 1280x768 force_sb128 sequence --
is already made four times over by the sibling sb128 gates at the same geometry.
Deletion therefore loses no coverage on either half, which is the condition
under which deleting a gate is right; had the pixel compare been unique, keeping
it with a fact-stating ignore string would have been the honest call.

The coverage claim moves to the test that now carries it,
every_drl_index_the_new_mv_pricer_offers_is_one_the_writer_can_signal
(encode.rs:15689), which is strictly stronger than the clip gate: it enumerates
the pricer's whole offer set against the writer's rule, and 0..=4 bounds the
DOMAIN rather than sampling it, since best_new_mv_syntax breaks at
entries.len() <= idx for idx > 0 and so no stack size can offer index 3 or 4.
A second pointer added at encode.rs:18618, where a cargo test run-line still
named the deleted gate.

note_drl_clamp and DRL_CLAMP_HITS are KEPT as the tripwire for the owning fix --
the invariant test goes red the moment the pricer is widened, and
tile::drl_clamp_hits() then shows the clamp on real content. The
#[cfg(test)] take_drl_clamp_hits had no reader left and is removed.

One rebase conflict, in the two 1:4 gates' comment slot: lane-av1pins had
independently re-run those gates on the seven-lane tree and recorded the same
two facts (pixel blocker gone, recipe never fires). Both records are kept side
by side in the resolved comment -- theirs is the merge-main evidence the
mandelbrot claim was dead, ours is the mechanism and the fix.

Three pins re-verified on merged main (aa0ac8c2, +58 commits) in a PLAIN pass,
0 ignored, private CARGO_TARGET_DIR, sources touched first: all green, every
pin byte-identical to r1 (8384/35179/34727 B, same fnv1a64), each printing its
counter and its control arm on one line.
crates/ec-av1/src/encode.rsmodified+11 -2
@@ -18615,8 +18615,17 @@ mod tests {
1861518615 ///
1861618616 /// `#[ignore]`: [`force_sb128`] moves a process-global.
1861718617 ///
18618- /// cargo test -p ec-av1 --release --lib -- --ignored \
18619- /// a_128_superblock_clip_whose_drl_index_the_write_time_stack --nocapture
18618+ /// The drl-clamp cell this gate's counter used to gate is no longer gated
18619+ /// here: it is covered by
18620+ /// [`every_drl_index_the_new_mv_pricer_offers_is_one_the_writer_can_signal`],
18621+ /// which enumerates the pricer's offer set against the writer's rule (see
18622+ /// its doc). The clamp needs a stack that shrinks between search and
18623+ /// write, which is what a 128x128 superblock's visit order would do -- but
18624+ /// the pricer never offers an index this tree's `write_drl_idx` cannot
18625+ /// signal, so no clip can provoke it (lane-av1recipehunt: 153 attempts, 0;
18626+ /// widening the pricer to `0..5` fires the counter immediately, reverting
18627+ /// silences it). `drl_clamp_hits` is kept as the tripwire for that fix.
18628+
1862018629 /// lane-b128: the 128x128 `PARTITION_NONE` root -- one block, one mode
1862118630 /// and one motion vector where the four 64x64 roots below spend four of
1862218631 /// each (cen3's L1). The counter is the gate on the fixture (class
lanes/av1recipehunt.report.mdmodified+105 -0
@@ -407,3 +407,108 @@ test result: ok. 3 passed; 0 failed
407407 `EC_PROBE_OUT` writes u8 and every sample then differs from ffmpeg's
408408 `yuv420p10le` raw -- a 220438-byte "defect" that is purely a dump-format
409409 mismatch.
410+
411+---
412+
413+# r2 -- gate 1 disposed of, and the three pins re-verified on merged main
414+
415+Base moved: rebased onto `aa0ac8c2` ("lanes: merge-wave-2 clean-checkout
416+census"), 58 commits past this lane's original `a21f3680`. One conflict, in the
417+two 1:4 gates' comment slot, and it is worth recording because **two lanes
418+reached the same two facts independently**: `lane-av1pins` had already re-run
419+both 1:4 gates in RELEASE on the seven-lane tree and recorded that the pixel
420+blocker was gone and the recipe never fired; this lane then found why and closed
421+them. Both records are kept side by side in the resolved comment rather than
422+either being dropped -- `lane-av1pins`' measurement is the merge-main evidence
423+that the stale mandelbrot-defect claim was dead, and this lane's is the
424+mechanism.
425+
426+## Gate 1: DELETED, and the coverage claim moved to where it is asserted
427+
428+**Decision: delete.** The evidence that decided it, in the order it was
429+gathered:
430+
431+1. **The precondition is unreachable**, not merely unprovoked -- established in
432+ r1 (per-mode offer-set table, the existing invariant test, 153 attempts, and
433+ the `0..3 -> 0..5` mutation proof).
434+2. **The pixel half is not unique to the gate.** The deleted test's second half
435+ -- decode the encoded stream and compare every frame/plane against the
436+ encoder's own reconstruction, on a 1280x768 `force_sb128(true)` sequence --
437+ is already made **four times over** at the same geometry by
438+ `a_128_superblock_clip_whose_root_search_codes_128x128_blocks_decodes_exact`,
439+ `a_128_root_block_with_a_real_residual_decodes_exact_through_both_decoders`,
440+ `a_128_root_residual_block_under_a_per_unit_cdef_list_decodes_exact` and
441+ `a_rect128_half_with_a_real_residual_decodes_exact_through_both_decoders`
442+ (all four verified: same `force_sb128(true)`, same own-reconstruction
443+ compare, same ffmpeg compare).
444+
445+So deletion loses no coverage on **either** half. That is the point on which
446+"delete vs keep" turned: had the pixel compare been unique, keeping the test
447+with a fact-stating ignore string would have been the honest call, because
448+`#[ignore]` is cheap and a deleted unique assertion is not recoverable from the
449+report. It was not unique, so the gate was pure dead weight in `--list`.
450+
451+**Why the surviving invariant test is strictly better coverage, not a
452+substitute.** It enumerates the pricer's whole offer set against
453+`signalled_drl_idx` for stack sizes 0..=4, and 0..=4 bounds the DOMAIN rather
454+than sampling it: `best_new_mv_syntax` breaks at `entries.len() <= idx` for
455+`idx > 0`, so indices 3 and 4 are unreachable at *any* stack size, and a stack
456+larger than 4 only adds entries neither pricer offers. A clip gate could only
457+ever have sampled that space; this test closes it.
458+
459+**Where the disposition is visible.** The cell is not tracked in
460+`gate_coverage.rs` or `refusal_inventory.rs` (grepped: no `drl_clamp`,
461+`sb128b` or `write_time_stack` entry in either), so the claim lives on the test
462+that now carries the coverage, at
463+**`crates/ec-av1/src/encode.rs:15689`**, in
464+`every_drl_index_the_new_mv_pricer_offers_is_one_the_writer_can_signal`'s doc
465+comment. It names the deleted gate, both substitutes, the measurement and the
466+mutation proof. A second pointer was added at
467+**`crates/ec-av1/src/encode.rs:18618`** on the sb128 gate whose own doc had a
468+`cargo test` run-line still naming the deleted test -- a stale instruction left
469+by the deletion, caught by grepping for the name after the cut.
470+
471+**What was deliberately NOT removed.** `note_drl_clamp` and `DRL_CLAMP_HITS`
472+stay. They are unreachable today, but they are the tripwire for the owning fix
473+(`deferred(unblock: the DRL owner widens `best_new_mv_syntax`'s offer set past
474+the writer's `start + 2` ceiling, or retires the counter)`): the invariant test
475+goes red the instant the offer set is widened, and `tile::drl_clamp_hits()`
476+(printed by `enc_probe`) then shows the clamp on real content. Deleting the
477+counter would have made the fix silent. The `#[cfg(test)]`
478+`take_drl_clamp_hits()` had no reader left and WAS removed -- the
479+non-destructive `drl_clamp_hits()` is the accessor that survives.
480+
481+## Re-verification of the three pins on merged main
482+
483+Run on the rebased tree at `aa0ac8c2` + this lane, RELEASE, **plain pass (no
484+`--ignored`)**, with a private `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-rh`
485+and `touch` on the three edited sources first (the census/source-scan trap).
486+
487+```
488+test encode::tests::every_drl_index_the_new_mv_pricer_offers_is_one_the_writer_can_signal ... ok
489+a_real_aomenc_inter_sequence_with_an_intra_1to4_strip_decodes_pixel_exact (8-bit): 6 frames
490+ pixel-exact, intra 1:4 strips in inter frames 64x16=0 16x64=0 32x8=8 8x32=11
491+ (--enable-1to4-partitions=0 control: 0/0/0/0), stream 35179 B fnv1a64=86f8d1e5a221162a
492+test stream::tests::a_real_aomenc_inter_sequence_with_an_intra_1to4_strip_decodes_pixel_exact ... ok
493+a_real_aomenc_stream_..._horz_vert_partition_and_delta_q_decodes_pixel_exact: 4 frames
494+ pixel-exact, sb_rect_hits=40, rect64_qidx_drift_hits=17 (--deltaq-mode=0 control: 0),
495+ stream 8384 B fnv1a64=3d91a21680063ef6
496+test stream::tests::..._and_delta_q_decodes_pixel_exact ... ok
497+a_real_aomenc_inter_sequence_with_an_intra_1to4_strip_decodes_pixel_exact_10bit (10-bit):
498+ 6 frames pixel-exact, intra 1:4 strips in inter frames 64x16=0 16x64=0 32x8=12 8x32=7
499+ (--enable-1to4-partitions=0 control: 0/0/0/0), stream 34727 B fnv1a64=ecf9455bc20d60f0
500+test stream::tests::..._1to4_strip_decodes_pixel_exact_10bit ... ok
501+test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 737 filtered out; finished in 4.71s
502+```
503+
504+* **`0 ignored`** -- the three gates now run in a plain pass, as they must once
505+ the recipes carry the coverage.
506+* Every pin byte-identical to r1 after the rebase onto 58 new commits:
507+ 8384 B / `3d91a21680063ef6`, 35179 B / `86f8d1e5a221162a`,
508+ 34727 B / `ecf9455bc20d60f0`. Wave 2 did not perturb aomenc's output on any
509+ of these three cells, which is the point of pinning.
510+* Each gate printed its self-evidencing line with the counter AND its control
511+ arm in the same line, so a reader can see from one line that the precondition
512+ fires and that the feature flag is what fires it.
513+* `cargo check --release -p ec-av1 --all-targets` clean on the rebased tree, no
514+ warnings.