From 098e9a7d5b1c797358405da6c897fa1cf528c790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 29 Aug 2026 06:41:17 +0300 Subject: [PATCH] fix(av1): wii gate -- bound mandelbrot with -t (end_pts never ends; 1h hang), drop vacuous refusal asserts, hard-assert wii_hits (verifier finding); report --- crates/ec-av1/src/stream.rs | 37 +++++++++++++++++-------------- lanes/wii-r1.report.md | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 17 deletions(-) create mode 100644 lanes/wii-r1.report.md diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index a8d241b0..f6a46acf 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -3677,8 +3677,12 @@ mod tests { let source = if attempt % 2 == 0 { format!("gradients=size={width}x{height}:seed={seed}:duration={duration}:rate=25") } else { - format!("mandelbrot=size={width}x{height}:rate=25:end_pts={frame_count}") + // `end_pts` does NOT bound mandelbrot (it generated 300+ + // frames and hung the gate for an hour); `-t` below is the + // real bound, matching every other mandelbrot gate recipe. + format!("mandelbrot=size={width}x{height}:rate=25") }; + let duration_arg = format!("{duration}"); let y4m = Command::new("ffmpeg") .args([ "-v", @@ -3689,6 +3693,8 @@ mod tests { &source, "-pix_fmt", "yuv420p", + "-t", + &duration_arg, "-f", "yuv4mpegpipe", "-", @@ -3773,16 +3779,11 @@ mod tests { msg.contains("unsupported"), "{NAME} failed outright, not a named refusal (seed {seed}): {msg}" ); - assert!( - !msg.contains("wedge"), - "{NAME} refused on wedge (seed {seed}) -- wedge-interintra is ported \ - (lane-wii r2) and this recipe keeps masked-comp off: {msg}" - ); - assert!( - !msg.contains("interintra"), - "{NAME} refused on interintra (seed {seed}) -- interintra and \ - wedge-interintra are both ported: {msg}" - ); + // Verifier note (lane-wii r2): no refusal string containing + // "wedge"/"interintra" exists in the decoder any more, so + // string-forbidding asserts here would be vacuous (class + // gate-blind-to-feature). The proof this gate carries is + // pixel-exact decode plus the wii_hits count printed below. named_refusals += 1; eprintln!("seed {seed} refusal (non-wedge capability): {msg}"); continue; @@ -3810,12 +3811,14 @@ mod tests { matched > 0, "{NAME}: every attempt refused on other capabilities; the gate never exercised wedge-interintra" ); - if crate::decode::wii_hits() == 0 { - eprintln!( - "{NAME}: {matched} pixel-exact matches but zero wedge-interintra blocks fired \ - this run -- encoder never selected wedge; gate soft-skipped, rerun to exercise" - ); - } + // Hardened from a soft-note (verifier: gate-blind-to-feature): the + // recipe fired wedge-interintra on EVERY one of 6 hammer runs + // (wii_hits 2-7), so a zero-hit run is a regression, not sampling. + assert!( + crate::decode::wii_hits() > 0, + "{NAME}: {matched} pixel-exact matches but zero wedge-interintra blocks fired -- \ + the blend is unexercised (recipe fired 2-7 hits per run when landed)" + ); eprintln!( "{NAME}: {named_refusals} other-capability refusals, {matched} pixel-exact matches out of {n_attempts}, wii_hits={}", crate::decode::wii_hits() diff --git a/lanes/wii-r1.report.md b/lanes/wii-r1.report.md new file mode 100644 index 00000000..f4bd2552 --- /dev/null +++ b/lanes/wii-r1.report.md @@ -0,0 +1,44 @@ +# lane-wii report (r1 recon HANDOFF + r2 flash build; orchestrator-verified and finished) + +VERDICT: PASS — wedge-interintra decodes for real; gate fires it live every run (wii_hits 2-7, hard-asserted); 14 pins green; lib 221/0. + +## What landed +- 84a8fa7 (flash r2 build, orchestrator-committed at its cap): both refusals + (16/32 path + 8x8 leaf) replaced. Symbol stream: after use_wedge_interintra + == 1, ONE adapting symbol `wedge_idx[bsize]` (rows 6/9/3 = 16x16/32x32/8x8), + NO sign bit — sign fixed 0 (libaom blockd.h INTERINTRA_WEDGE_SIGN). Blend: + wedge codebook mask replaces the smooth interintra mask in interintra_blend + ((m*intra + (64-m)*inter + 32)>>6, intra weighted); chroma box-averages the + luma-stride mask 2x2 ((m00+m01+m10+m11+2)>>2), exactly blend_a64_mask's + subw==subh==1 path. WII_HITS atomic. +- Gate a_real_aomenc_stream_with_interintra_wedge_decodes_pixel_exact: + gradients/mandelbrot alternating content, --enable-interintra-wedge=1, + masked-comp off. + +## Orchestrator fixes on top of the flash build +- Gate hang: builder's `mandelbrot=...end_pts=24` does NOT bound the source + (300+ frames generated; 1h CPU, pipe deadlock, two hung orphan processes). + Bound with `-t` like every landed mandelbrot recipe. Class instance: + gate's own fixture generation unbounded (kin to gate-loader-slurps-whole-file). +- Verifier finding (opus, claim 5 REFUTED): the gate's forbidden-refusal + strings were vacuous (no "wedge"/"interintra" refusal exists any more) and + wii_hits was only a soft note. Vacuous asserts replaced with a comment; + wii_hits==0 hardened to a HARD assert after 6/6 hammer runs each fired 2-7 + hits. + +## Verification +- Cross-provider: opus source-level verification vs libaom — claims 1-4, 6 + CONFIRMED (symbol order decodemv.c:1549-1554; sign 0 blockd.h:40 — the r1 + charter's SIGN=1 came from an ENCODER search heuristic, compound_type.c:691; + blend blend.h:23-28 + blend_a64_mask.c:251-259; INTERINTRA_HITS move weakens + no gate since the interintra gate pins wedge=0). Claim 5 (gate) refuted and + fixed above. +- Orchestrator re-ran: hardened gate green (wii_hits=3), 6 prior hammer runs + green (hits 6,7,2,6,5,3), 14-pin list green, lib 221/0 (gate excluded run) + + gate separately. + +## Residue +- 25-29/40 gate attempts refuse on non-IDENTITY single-ref GLOBAL MOTION + (mandelbrot pan) — a real, now well-measured capability gap; queue. +- r1 flash round burned its whole cap on recon (zero edits); r2 charter + carried the handoff + two corrections (SIGN=1 error, literal(4) error).