forge
Explore
Log in

Don't you dare go Hollow

lane-av1422lift: the honesty layer -- six prose sites that named readers which do not exist

Browse files at this commit

2eb0e50b871a4cd0cc72674b8cd2d9276f3488c4Ahmet Kaan GümüşParent: 1a0aad1
Refutation pass over `b7a36001` (lane-av1422liftverify, `5ee10c61`) confirmed
the lift's behaviour, its assertion, its three coupled inventory deletions,
its two new pins and all nine pixel gates, and refuted ONE thing: six prose
sites where the lift replaced true "no committed test can read this counter"
statements with false "the corpus gate reads this counter" statements.

No decoder logic, no assertion, no fixture, no gate body changes here. Every
line of the diff is a comment (`git diff -U0 ... | grep -v '^[+-]//'` is
empty), and the 4:2:2 gate set is 10 passed / 0 failed, unchanged.

Measured on this tip with a throwaway in-`mod tests` probe (added, run,
removed; `git status --porcelain` empty and the tree byte-identical to HEAD
before this commit) over all 21 committed 4:2:2 cells:

1. `decode.rs` `SB128RECT_REPLAY_SPAN_MISMATCH_HITS`. It claimed the corpus
   gate asserts it stays zero at 4:2:2. No gate reads it, and it does NOT
   stay zero: `422_intrabc_sb128_strip.obu` and
   `422_intrabc_sb128_strip_notxsearch.obu` each read
   `replay = 72, mismatch = 9`, the other 19 read 0. The first is a pin
   `the_pinned_422_intrabc_sb128_strip_witnesses_decode_pixel_exact` asserts
   BYTE-EXACT against ffmpeg, so a non-zero mismatch is the arm counting its
   own designed case, not a defect. The deleted sentence ("zero on every
   stream this decoder admits, because 4:2:2 is refused by name") was TRUE
   and admitting 4:2:2 genuinely made it fire. The doc now carries the two
   numbers and says plainly that adding the promised zero assert would red a
   provably correct cell.

2. `decode.rs` `RECT_TILED_CHROMA_NXN_HITS`. Claimed the corpus gate reads
   it; nothing does, and it reads 0 on all 21 committed 4:2:2 cells and on
   the 4:2:0 / 4:4:4 cells probed. Now says UNWITNESSED with the number,
   and names the only two readers (both 4:4:4, where `nxn` is interpolated
   into a failure message and never asserted).

3. `decode.rs` `INTRABC_RECT4_OWN_CHROMA422_HITS`. Claimed the corpus gate
   reads its delta per row; the accessor has zero callers in the crate. It
   does fire -- the six corpus cells step it 1..6 -- so the doc carries that
   and states the true half: no committed test reads it.

4. `stream.rs` `sb128rect_chroma_replay_counters` (pub API doc): same false
   attribution, now carries `(72, 9)` and names the two 4:2:0/4:4:4 gates
   that are the actual readers.

5. `stream.rs`, inside BOTH tripwire gates' own comments (the 4:4:4 one and
   the 4:2:0 twin): these were the worst two, because those are the gates
   that DO read the counter, and the text invited a future lane to add the
   missing 4:2:2 zero assert to one of them and land a red on a correct cell.
   Both now carry an explicit "DO NOT copy this zero assert onto a 4:2:2
   stream", the `mismatch = 9` measurement, and the statement of what
   actually holds the per-axis span (the 4:2:2 exactness gates).

6. `refusal_inventory.rs`: the retirement note named
   `a_real_422_stream_decodes_pixel_exact`, which does not exist -- the gate
   is `a_real_422_key_frame_and_inter_sequence_decode_pixel_exact`; and a
   sibling-witness comment still pointed at
   `a_non_420_subsampled_sequence_header_is_refused_by_name`, the test this
   lift deleted. Both re-pointed at gates that exist.

No gate was added. Adding the promised 4:2:2 mismatch assert would red a
byte-exact cell, which is a worse outcome than an honest comment.
crates/ec-av1/src/decode.rsmodified+40 -16
@@ -2857,11 +2857,15 @@ thread_local! {
28572857 /// or 16x64 as two 16x32s).
28582858 static RECT_TILED_CHROMA_1X2_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
28592859 /// Chroma units of the same walk in any other multi-unit grid (2x2 and
2860- /// up). lane-av1422lift: 4:2:2 is DECODED, so this is no longer an arm
2861- /// no admitted stream can reach -- a 4:2:2 block whose chroma plane is
2862- /// wider than tall relative to its luma span lands here. The corpus gate
2863- /// `the_pinned_422_corpus_cells_decode_pixel_exact` reads this counter
2864- /// as a non-vacuity arm; kept so the match above is exhaustive).
2860+ /// up). lane-av1422lift: this used to say "only reachable at 4:2:2, which
2861+ /// is refused, so this stays 0 on every admitted stream", and that was
2862+ /// true. 4:2:2 is decoded now, so the "cannot happen" is gone -- but the
2863+ /// arm is still UNWITNESSED: measured on this branch's tip over all 21
2864+ /// committed 4:2:2 cells and over the 4:2:0 / 4:4:4 cells probed, it
2865+ /// reads 0 on every one of them. No committed gate reads it either (the
2866+ /// only readers of `rect_tiled_chroma_grid_hits()` are two 4:4:4 strip
2867+ /// gates, where `nxn` is interpolated into a failure message and never
2868+ /// asserted). Kept so the match above is exhaustive.
28652869 static RECT_TILED_CHROMA_NXN_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
28662870 }
28672871
@@ -6140,9 +6144,16 @@ thread_local! {
61406144 // lane-av1422luma: the ss (1,0) twin of `INTRABC_RECT4_OWN_CHROMA444_HITS`
61416145 // -- how many intra-BC 1:4 strips at 4:2:2 took the own-chroma (no pair)
61426146 // route. Same caveat as the 4:4:4 counter: it proves REACH and nothing else.
6143-// lane-av1422lift: 4:2:2 is DECODED, so committed tests CAN read this
6144-// counter now; `the_pinned_422_corpus_cells_decode_pixel_exact` reads its
6145-// delta on every corpus row.
6147+// lane-av1422lift: 4:2:2 is DECODED, so this counter is no longer pinned
6148+// behind a header refusal -- and it DOES fire: measured on this branch's tip,
6149+// the six committed corpus cells each read 1 more than the cell before
6150+// (`s422_320x246` 1, `s422_322x240` 2, `s422_322x246` 3, `s422_352x242_10b`
6151+// 4, `s422_416x242_10b` 5, `s422_416x250_10b` 6), and every other committed
6152+// 4:2:2 cell leaves it at 6. **No committed gate reads it**: the accessor
6153+// below has no callers in the crate (the 4:4:4 twin is read at two
6154+// `stream.rs` sites, this one nowhere). The honest sentence is therefore
6155+// "no committed test reads this counter", which is what the 4:4:4 twin's
6156+// doc says about itself -- it does NOT become "the corpus gate reads it".
61466157 thread_local! {
61476158 static INTRABC_RECT4_OWN_CHROMA422_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
61486159 }
@@ -23415,14 +23426,27 @@ thread_local! {
2341523426 /// ... and the number of non-skip 128-root rect BLOCKS whose replay
2341623427 /// height differs from the unit's own LUMA-MI height -- the signature of the
2341723428 /// width passed to both axes (`luma_span` where the in-loop stamp used
23418- /// `luma_span_h`). lane-av1422lift: this used to read zero on every
23419- /// admitted stream because 4:2:2 -- the one format whose two spans differ
23420- /// -- was refused by name at the sequence header. It is DECODED now, so
23421- /// this is a REAL detector, not a defensive arm: a hardcoded 4:2:0 span on
23422- /// a 4:2:2 stream lands here and reads non-zero. The two 4:2:0/4:4:4
23423- /// tripwire gates that assert zero keep asserting zero; the 4:2:2 row of
23424- /// `the_pinned_422_corpus_cells_decode_pixel_exact` asserts it stays zero
23425- /// there too, which is the claim that replaces "it cannot fire".
23429+ /// `luma_span_h`). lane-av1422lift: the doc here used to read "Zero on
23430+ /// every stream this decoder admits ... 4:2:2 ... is refused by name at
23431+ /// the sequence header", and that was TRUE. Admitting 4:2:2 genuinely made
23432+ /// this counter able to fire, and it does fire: measured on this branch's
23433+ /// tip over all 21 committed 4:2:2 cells, `422_intrabc_sb128_strip.obu`
23434+ /// and `422_intrabc_sb128_strip_notxsearch.obu` each read
23435+ /// `replay = 72, mismatch = 9`; the other 19 read 0.
23436+ ///
23437+ /// **Those two pins are byte-exact against ffmpeg**
23438+ /// (`the_pinned_422_intrabc_sb128_strip_witnesses_decode_pixel_exact`, all
23439+ /// five frames, every plane), so a non-zero mismatch is NOT a defect
23440+ /// signature at 4:2:2 -- it is the arm counting its own designed case.
23441+ /// Nothing here asserts zero, and nothing should: adding a zero assert
23442+ /// would red a gate on a cell that is provably correct.
23443+ ///
23444+ /// The only readers of the pair are
23445+ /// [`sb128rect_chroma_replay_hits`]'s two gates, both on 4:4:4 and 4:2:0
23446+ /// streams, where the unit's luma width and height are equal so the
23447+ /// mismatch half is structurally zero. That is the zero this counter is
23448+ /// currently a tripwire FOR, and it is a statement about those two
23449+ /// streams, not about the format.
2342623450 pub(crate) static SB128RECT_REPLAY_SPAN_MISMATCH_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
2342723451 }
2342823452
crates/ec-av1/src/refusal_inventory.rsmodified+6 -6
@@ -84,9 +84,9 @@ const REFUSALS: &[&str] = &[
8484 // pixel-exact vs ffmpeg).
8585 // lane-av1txr: `a sub-8x8 leaf that uses intrabc (…)` is GONE -- the
8686 // capability landed in this lane (4x4 / 4x8 / 8x4 intrabc leaves read the
87- // DV and reconstruct a frame copy + the INTER residual; gates
88- // `a_non_420_subsampled_sequence_header_is_refused_by_name`'s sibling
89- // witnesses and the `warped.obu`/`allintra.obu` traces). Its census gate
87+ // DV and reconstruct a frame copy + the INTER residual; the sub-8x8
88+ // intrabc leaf witnesses in `stream.rs` and the `warped.obu` /
89+ // `allintra.obu` traces). Its census gate
9090 // (`a_sub8_leaf_census_over_intrabc_screen_streams_measures_the_sub8_refusal`)
9191 // still runs: it now reports `reached = 0` with the same non-vacuous
9292 // premise (allow_intrabc frames + decoded sub-8 leaves).
@@ -512,9 +512,9 @@ const PROVEN: &[(&str, &str, Proof)] = &[
512512 // REFUSAL STRING, so it could not fail on a tree where 4:2:2 decode was
513513 // completely broken -- it passed unchanged on the broken tree and would
514514 // have kept passing if the port had been reverted. Its replacement
515- // `a_real_422_stream_decodes_pixel_exact` (and the corpus battery
516- // `the_pinned_422_corpus_cells_decode_pixel_exact`) assert BYTE-EXACT
517- // planes against ffmpeg on real 4:2:2 streams, with the
515+ // `a_real_422_key_frame_and_inter_sequence_decode_pixel_exact` (and the
516+ // corpus battery `the_pinned_422_corpus_cells_decode_pixel_exact`) assert
517+ // BYTE-EXACT planes against ffmpeg on real 4:2:2 streams, with the
518518 // per-plane coefficient-unit census as the non-vacuity arm.
519519 // lane-av1txr-r2 paired, lane-av1-qmatrix RETIRED with its gate: the
520520 // refusal's witness is now
crates/ec-av1/src/stream.rsmodified+26 -17
@@ -318,13 +318,16 @@ pub fn intra128_lossless_counters() -> usize {
318318
319319 /// lane-av1-128rectspan: chroma transform units re-stamped by
320320 /// `decode_block_128rect`'s end-of-block replay, and how many of those
321-/// replays stamped a height that was not the unit's own. lane-av1422lift:
322-/// that mismatch was described as "the 4:2:2 signature -- zero on every
323-/// stream this decoder admits, since 4:2:2 is refused by name at the
324-/// sequence header". 4:2:2 is decoded now, so the mismatch half is a live
325-/// detector on 4:2:2 streams and stays zero only because the per-axis span
326-/// is correct; the 4:2:2 rows of
327-/// `the_pinned_422_corpus_cells_decode_pixel_exact` assert that.
321+/// replays stamped a height that was not the unit's own.
322+/// lane-av1422lift: the second half was described as "the 4:2:2 signature --
323+/// zero on every stream this decoder admits, since 4:2:2 is refused by name
324+/// at the sequence header", and that was TRUE. 4:2:2 is decoded now and the
325+/// mismatch is NOT zero: measured on this branch's tip, the two
326+/// `422_intrabc_sb128_strip*` pins each read `(72, 9)` while the other 19
327+/// committed 4:2:2 cells read `(0, 0)`. Those two pins are byte-exact
328+/// against ffmpeg, so the non-zero half counts the arm's own designed case
329+/// and is not a defect. No 4:2:2 gate reads this pair; the two gates that do
330+/// are on 4:2:0 and 4:4:4 streams, where the half is structurally zero.
328331 pub fn sb128rect_chroma_replay_counters() -> (usize, usize) {
329332 crate::decode::sb128rect_chroma_replay_hits()
330333 }
@@ -9201,13 +9204,16 @@ pub(crate) mod tests {
92019204 // stopped replaying reads 0), and the mismatch half is the 4:2:2
92029205 // signature: this stream is 4:4:4 (ss 0,0), where the unit's luma
92039206 // width and height are equal, so a replay that stamped one axis with
9204- // the other's span would still read 0 here. lane-av1422lift: 4:2:2 is
92059207 // decoded now, so this counter no longer "names the day 4:2:2 is
9206- // admitted" -- the 4:2:2 rows of
9207- // `the_pinned_422_corpus_cells_decode_pixel_exact` read the mismatch
9208- // half on streams where the two spans actually differ, which is what
9209- // stops an 8-row spill below the block from corrupting the next
9210- // block's `txb_skip` silently.
9208+ // admitted" -- it fires there. **DO NOT copy this zero assert onto a
9209+ // 4:2:2 stream**: measured on this branch's tip, the two
9210+ // `422_intrabc_sb128_strip*` pins each read `mismatch = 9` while
9211+ // being byte-exact against ffmpeg, because the mismatch half counts
9212+ // the replay's own designed 4:2:2 case rather than a defect. What
9213+ // stops the 8-row spill below the block from corrupting the next
9214+ // block's `txb_skip` is the per-axis span itself, and the 4:2:2
9215+ // exactness gates (`the_pinned_422_intrabc_sb128_strip_witnesses_
9216+ // decode_pixel_exact`) are what hold it -- not this counter.
92119217 let after_replay = crate::decode::sb128rect_chroma_replay_hits();
92129218 assert!(
92139219 after_replay.0 > before_replay.0,
@@ -10765,10 +10771,13 @@ pub(crate) mod tests {
1076510771 // them over its own luma-mi rows -- the arm the span fix sits on, on
1076610772 // the OTHER admitted ss (1,1). The mismatch half is the 4:2:2
1076710773 // signature; lane-av1422lift: 4:2:2 is decoded now, so this is no
10768- // longer "the tripwire for the day it is not" -- it is a zero this
10769- // gate asserts on the stream in front of it, and the 4:2:2 rows of
10770- // `the_pinned_422_corpus_cells_decode_pixel_exact` assert the same
10771- // zero there.
10774+ // longer "the tripwire for the day it is not". It is a zero this gate
10775+ // asserts about the stream in front of it, and nothing else.
10776+ // **DO NOT carry it to a 4:2:2 stream**: the two
10777+ // `422_intrabc_sb128_strip*` pins read `mismatch = 9` each and are
10778+ // byte-exact against ffmpeg, so a 4:2:2 zero assert would red on a
10779+ // provably correct cell. The 4:2:2 rows of the corpus gate read
10780+ // neither half of this counter.
1077210781 let after_replay = crate::decode::sb128rect_chroma_replay_hits();
1077310782 assert!(
1077410783 after_replay.0 > before_replay.0,