forge
Explore
Log in

Don't you dare go Hollow

gate_coverage: lower the count-vacuity unpinned ceiling 43 -> 2

Browse files at this commit

fbed1b614e7b3bfe63435e9dfe9c81fd442d8c0eAhmet Kaan GümüşParent: 222f4c5
The number the nine stream.rs commits above bring it to, with the two that
survive the round named in the comment. Neither is a count to fix:

  * an_svt_screen_palette_block_with_a_split_transform_decodes_exactly reads
    its stream from the path EC_AV1_SVT1_STREAM names, and that crop is not
    committed to fixtures/ -- so no encode recipe, no --limit, no -frames:v and
    no frame count exists anywhere in the tree for it. The doc comment's
    "12-frame stream" is prose about one capture, and the env var accepts any
    file, so asserting 12 would pin a number nothing can check. Deriving one
    from the stream's own OBU frame headers is left on the table deliberately:
    the gate SKIPs on any box without that env var, so such an assert would
    ship unexercised.
  * the second is a '///' doc comment quoting the pre-r4 body of
    pinned_lr_sgr_stream_call_unique_dump -- the sweep's line-based scan cannot
    tell a doc comment from code. The gate it describes already spends FRAMES
    and asserts pics.len() == FRAMES.

The floor (>= 40 sites) is untouched and the site population is unchanged at
60: the fixes assert the encode's count ABOVE the call rather than spending a
named constant in place of .len(), so each site moves from "not spec-pinned"
to "spec-pinned by a prior assert" instead of vanishing from the class. 41
sites become pinned and 43 - 41 = 2 remain.

Red-before for all 41 at once: with this ceiling and stream.rs reverted to
3b691e13, the guard reds with "43 unpinned count site(s), ceiling is 2". Since
each fix removes exactly one site from the unpinned population, removing any
one of the 41 asserts puts unpinned at 3 and reds this same assert.
crates/ec-av1/src/gate_coverage.rsmodified+23 -1
@@ -2414,8 +2414,30 @@ mod count_vacuity_tests {
24142414 // A CEILING on the unpinned population, so a NEW site cannot be added
24152415 // silently. Lower it as sites are fixed; a fix that does not lower it is
24162416 // still a fix, but a NEW site is an immediate red.
2417+ //
2418+ // lane-av1pinspec: 43 -> 2. Each of the 41 fixes adds the ENCODE's own
2419+ // frame count as an `assert_eq!` ABOVE the `ffmpeg_decode_sequence*`
2420+ // call (`-frames:v 1` / `-vframes 1` / `--limit=N` / a helper's `frames`
2421+ // parameter / the arm tuple's `frame_count` / the wire's own OBU frame
2422+ // headers), so the count handed to the oracle is a value already proven
2423+ // against the encode instead of read off our decode. The two that remain
2424+ // are the two that are not a count to fix:
2425+ // * `an_svt_screen_palette_block_with_a_split_transform_decodes_exactly`
2426+ // reads the path `EC_AV1_SVT1_STREAM` names, and that crop is not
2427+ // committed to `fixtures/`, so no `--limit`, no `-frames:v` and no
2428+ // frame count exists anywhere in the tree for it. The doc comment's
2429+ // "12-frame stream" is prose about one capture and the env var
2430+ // accepts any file, so asserting 12 would pin a number nothing can
2431+ // check. Counting the stream's own OBU frame headers with
2432+ // `Av1Parser` would derive one, and is left on the table
2433+ // deliberately: the gate SKIPs on any box without that env var, so
2434+ // such an assert would ship unexercised.
2435+ // * a `///` DOC COMMENT quoting the pre-r4 body of
2436+ // `pinned_lr_sgr_stream_call_unique_dump`, which this line-based
2437+ // scan cannot tell from code. The gate it describes already spends
2438+ // `FRAMES` and asserts `pics.len() == FRAMES`.
2439+ const UNPINNED_CEILING: usize = 2;
24172440 let unpinned = s.iter().filter(|x| x.pinned_by.is_none()).count();
2418- const UNPINNED_CEILING: usize = 43;
24192441 assert!(
24202442 unpinned <= UNPINNED_CEILING,
24212443 "{unpinned} unpinned count site(s), ceiling is {UNPINNED_CEILING} -- a new one \