forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to lanes/av1oracleSkip.report.mdClear filter

2026-09-29

gate_coverage: the oracle-presence scan — the class can no longer reopen silentlyAhmet Kaan Gümüş · 693b415
gate_coverage: the oracle-presence scan — the class can no longer reopen silently

r2 closed the bare `aomdec_path().is_file()` class on the current tree but left
the anti-regression procedural, and that is how the five r2 sites got there in
the first place: a guard written the old way compiles, passes review and
re-opens the hole. This adds the mechanical check, in the crate's existing
source-scan shape (include_str! over stream.rs/decode.rs/encode.rs, next to the
recipe re-derivation that already scans stream.rs).

The rule: a tool presence check (aomenc/aomdec/affine `_path().is_file()`,
plain or inverted) may appear only inside the probe that owns that path
(have_aomenc, aomdec_available, have_affine_aomenc), inside an assert!, or in
a comment. The scan derives each probe's line span from its fn opener to the
first column-0 brace and asserts it found all three, so a moved probe reds
instead of silently exempting the crate. Anything else fails naming file:line,
the line text, and the fix. Current state: 7 sites inspected, 7 allowed, 0
offenders.

Two floors, because a total alone hides a single broken matcher: a structural
total (MIN_SITES = 5 = three probes + two asserts, so prose churn is not
load-bearing) and a PER-PATTERN floor requiring each of the three path patterns
to match at least once. The per-pattern floor earned its place on its first
run by catching a real bug in the matcher one line above it —
`affine_aomenc_path().is_file()` CONTAINS `aomenc_path().is_file()`, so a
first-match scan credited the affine probe's line to the aomenc pattern; the
matcher now takes the longest match.

Mutations, both reverted (git diff on stream.rs empty, scan green):
- a bare `if aomdec_path().is_file()` injected into gate_444_lossy_live_exact
  -> RED naming `stream.rs:7634`;
- one pattern replaced by a non-matching `aomdec_path().exists()` -> RED on the
  per-pattern floor ("matched NOTHING … the gates it was meant to police would
  pass unreviewed"). With only a total floor this one PASSES: the other two
  patterns still add up to 6 sites.
`touch` on every scanned source before every run — these scans read
compile-time text.

Acceptance: gate_coverage + refusal_inventory 27 passed, 0 failed; the gates
the review named still pass with the oracle present (5 passed).
ec-av1: r2 — route the five guards that merged in after r1, close the classAhmet Kaan Gümüş · 1f8005c
ec-av1: r2 — route the five guards that merged in after r1, close the class

The merge review measured the CURRENT tree (9b2f6c9d), not r1's base: 21
`aomdec_path().is_file()` occurrences there, of which 18 were bare guard
sites. Six gates that merged after r1 branched were added with the same silent
shape and reported GREEN with the compare skipped under EC_AV1_REQUIRE_AOMENC=1.
The lesson is the stale base: a class sweep run against a base that is still
moving is a snapshot of the past, so the fix has to leave the decision in ONE
place rather than in thirteen.

All five remaining guards now call `aomdec_available`, including the inverted
`if !aomdec_path().is_file() { … return; }` in
a_444_lossless_sb64_intrabc_rect_chroma_walks_4x4_units. Seven redundant
`else { eprintln!("… pixel arm skipped") }` arms are deleted (six scripted,
one found by running the gates and seeing two SKIP lines for one skip), so a
skip prints exactly one line, from the probe. 18 bare guard sites -> 0; the
presence check survives in the probe, two hard asserts and two doc comments.

Red-before re-proven on the current tree (r2 reverted, r1 as rebased) with
EC_AV1_AOMDEC=/nonexistent/oracle/aomdec EC_AV1_REQUIRE_AOMENC=1:
  before: ok. 3 passed — a_444_lossless_sb64_intrabc… "no oracle aomdec at
          /nonexistent/oracle/aomdec, pixel arm skipped",
          a_lossless_block_clips_its_transform_grid… SKIP, and the rect4-strip
          gate printing one skip per pinned fixture
  after:  FAILED. 0 passed; 3 failed — each naming the gate, the missing path
          and the env that should have caught it.
Oracle present: the six plus the two superres-mode gates that share
a_444_superres_arm pass (7 passed). Absent with the env unset: one SKIP per
gate, developer-only convenience, unchanged.
Acceptance: cargo test -p ec-av1 --lib -- gate_coverage refusal_inventory ->
26 passed, 0 failed (the enable-rect-tx staleness r1 reported is retired
upstream).

Report corrections in the same commit: the r1 header cited commit ee4f2d55,
which does not exist (git cat-file: fatal) — replaced with 644bdbb8, the real
rebased commit; and "thirteen gates" is thirteen CALL SITES across twelve
distinct gates (a_444_lossy_rect4_inter_stream_decodes_pixel_exact calls the
probe twice, for its 4:4:4 stream and its 4:2:0 control).
ec-av1: the oracle SKIP class — 13 gates could skip their pixel compare SILENTLYAhmet Kaan Gümüş · 1f09dc0
ec-av1: the oracle SKIP class — 13 gates could skip their pixel compare SILENTLY

lane-av1gates444's three live 4:4:4 gates reported green having measured
nothing on a host without the oracle: encode_444_lossy_live returned an empty
Vec and gate_444_lossy_live_exact turned it into a second, silent early return,
so "no oracle" and "aomenc produced nothing" were the same value at the call
site. One exit now, Option instead of an empty-Vec sentinel, and the SKIP names
the env var that would make it a failure.

The sweep behind it found a worse instance of the same class that nobody had
named: THIRTEEN gates wrapped their oracle arm in a bare
`if aomdec_path().is_file()`, with NO env escape at all. With
EC_AV1_REQUIRE_AOMENC=1 set and aomdec absent they encoded, decoded, asserted
their geometry and their counters, skipped the compare and reported green —
four of the thirteen printed nothing at all. New probe `aomdec_available`, in
the have_ffmpeg shape (probe, assert LAST, env escape), now guards all
thirteen and prints its own SKIP; the nine ad-hoc `else` SKIP branches are
deleted so the notice and the assert cannot drift apart.

Proven in both directions with absence simulated through the crate's own path
overrides (EC_AV1_AOMENC / EC_AV1_AOMDEC -> /nonexistent/oracle/...):
- oracle present: the three gates pass (13/12/24 own-extent gathers) and the
  eleven re-routed pinned gates still pass — nothing about what they measure
  changed;
- aomdec absent + EC_AV1_REQUIRE_AOMENC=1: RED on the parent commit ("ok. 3
  passed", compare never run, one gate silent), 3 FAILED here with a message
  naming the gate, the path and the fix;
- absent + env unset: SKIP printed naming the path and the escape hatch, gate
  still green — a developer-only convenience, stated as such in the text so no
  batch can mistake it for evidence.

The ~445 `if !have_aomenc()` / `if !have_ffmpeg()` early-return SKIPs are
REPORTED, not changed: both probes already assert last with the env escape, so
those sites already fail under the REQUIRE vars. Full per-site table in
lanes/av1oracleSkip.report.md, which also records a PRE-EXISTING red on this
base that is not this lane's: gate_coverage's enable-rect-tx entries are stale
because a gate merged in 7f8817cb passes --enable-rect-tx=1.