forge
Explore
Log in

Don't you dare go Hollow

wip(av1): deblocking gate flake -- localize selection mechanism, not currently reproducible

Browse files at this commit

66f249979b2bf320bc85aa22edde703d2a8758dfAhmet Kaan GümüşParent: 30b9833
Root cause of the SELECTION MECHANISM (not the decoder bug itself):
the test's source fixture is genuinely nondeterministic run-to-run.
`ffmpeg -f lavfi -i gradients=...:seed=42` does NOT honor `seed` for
its c0..c7 colors (they default to "random", drawn from an unseeded
RNG independent of the filter's own `seed` option) -- confirmed by
sha256-hashing 5 consecutive y4m generations with identical args: all
5 differ, and a byte-level cmp shows the first divergence inside the
pixel data (not the header). So every test run encodes genuinely
different frame content through aomenc, which is itself a second,
compounding nondeterminism source (cq=55/cpu-used=0 RD search hashes
differently run-to-run even with --threads=1, confirmed separately).
This is NOT the documented parallel-flake-is-attempt-selection class
(no seed loop exists in this test at all) -- it's fixture-content
variance, a new mechanism for the same flake family.

Added EC_AV1_GATE_DUMP (env-gated, mirrors EC_AV1_PIN/EC_AV1_PIN_N
convention) to dump the exact encoded stream this test decoded, for
pinning a future failure without re-deriving the mechanism.

Could NOT reproduce the mismatch this round: 1503 attempts of the
single filtered test (parallel, EC_AV1_GATE_DUMP capturing every
stream) plus 3 full `cargo test -p ec-av1 --release --lib` runs, all
green, 0 failures. The ledger's "reproduced 2x at 9/10 rate on 95e9170
(post chroma fix)" note does not hold at this HEAD in this environment
-- P(0 failures in 1503 trials | true rate 10%) is astronomically
small, so either the historical 9/10 estimate was from a much smaller
sample (2 failures observed over some earlier N, not a measured 10%),
or e74ceb5's chroma tx_type inherit fix (which reads an actual CDF
symbol per inter chroma block) incidentally closed a desync that was
also reachable from specific luma-only content -- unconfirmed,
flagged as the next hypothesis to chase if a failing stream ever
surfaces again. Class: stale-premise lanes (5th instance) --
re-measure the claimed rate before trusting a lane charter's numbers.
crates/ec-av1/src/stream.rsmodified+3 -0
@@ -1764,6 +1764,9 @@ mod tests {
1764 String::from_utf8_lossy(&out.stderr)1764 String::from_utf8_lossy(&out.stderr)
1765 );1765 );
1766 let stream = out.stdout;1766 let stream = out.stdout;
1767+ if let Ok(dump) = std::env::var("EC_AV1_GATE_DUMP") {
1768+ std::fs::write(dump, &stream).expect("dump stream");
1769+ }
1767 let before = decode::deblock_hits();1770 let before = decode::deblock_hits();
1768 let frames = match decode_stream(&stream) {1771 let frames = match decode_stream(&stream) {
1769 Ok(frames) => frames,1772 Ok(frames) => frames,