forge
Explore
Log in

Don't you dare go Hollow

lanes: wave-3b merge report — rawhelper arity, oracleskip routing + r3 scan, three merges

Browse files at this commit

6a556d86ccd85e319d73e5c22c515c27b3bc7713Ahmet Kaan GümüşParent: b4cb053
lanes/av1merge-wave3b.report.mdadded+229 -0
@@ -0,0 +1,229 @@
1+# Merge wave 3b — two branches
2+
3+Integration owner: wave 3b only. Base `main` @ `3eec02c8` (746 lib tests, the
4+wave-3a head). Head after this wave: `b1a462fa` (748 lib tests). **Not pushed.**
5+
6+| # | branch | tip merged | conflicts | landed delta on main |
7+|---|--------|-----------|-----------|----------------------|
8+| 1 | `lane-av1rawhelper` | `cf36ba5d` | none (auto-merged) | `stream.rs` +194/-12, report +305 |
9+| 2 | `lane-av1oracleskip` (r1+r2) | `7bf95961` | **1 file, 2 regions** — `stream.rs` | `stream.rs` +92/-100, report +266 |
10+| 3 | `lane-av1oracleskip` (r3) | `7a865ee7` | **1 file, 2 regions** — `gate_coverage.rs` | `gate_coverage.rs` +167/-0, report +83 |
11+
12+Branch 2 is one branch delivered in two merges because the tip moved mid-wave
13+(`7bf95961` → `7a865ee7`, adding r3). `7bf95961` is an ancestor of `7a865ee7`, so
14+the second merge's base was `7bf95961` and it carried r3 alone — `git merge-tree`
15+confirmed the conflict before either attempt, and `git log` confirms
16+`7bf95961..7a865ee7` is the single r3 commit.
17+
18+Tip drift check: both dispatched tips verified against the live tree before
19+merging. `lane-av1rawhelper` @ `cf36ba5d` as dispatched;
20+`lane-av1oracleskip` was re-read after the update and re-verified before use.
21+
22+## 1. lane-av1rawhelper — the arity strand
23+
24+`git merge-tree` said clean. Per the wave-3a rule that a clean textual merge does
25+not prove a compiling tree, the merged tree was compiled and the call sites
26+audited rather than trusted.
27+
28+**The merged tree compiles.** `cargo check -p ec-av1 --all-targets` clean.
29+
30+**Every call site is 5-arg, and the depths are right.** `assert_rawvideo_matches`
31+gained a `bit_depth: u8` parameter. All four call sites carry it:
32+
33+| site | call | belongs to gate |
34+|------|------|-----------------|
35+| 5232 | `(&obu, &stream, NAME, frames, 10)` | `the_rawvideo_helper_compares_real_samples_at_the_streams_own_bit_depth` (new) |
36+| 5247 | `(&obu, &stream, NAME, frames, 8)` | same gate, 8-bit arm |
37+| 7066 | `(&ctrl, &ctrl_stream, NAME, FRAMES, 10)` | `a_lossless_444_128_root_lossless_stream_reads_chunks_chunk_major` — **main's former `:6889`** |
38+| 7155 | `(&obu, &stream, NAME, FRAMES, 10)` | `a_lossless_block_clips_its_transform_grid_at_the_frame_edge` — **main's former `:6983`** |
39+
40+The two main-side sites moved only by line offset (the merge's insertions); the
41+arguments are otherwise identical to main's, plus the depth.
42+
43+**The depth is verified against the stream, not the gate's doc.** Both main-side
44+sites read the same pin, `ll444_128root_lossless.obu` (63429 B, fnv1a64
45+`0xf07d_47fc_fd51_2658`, which matches `read_pin`'s recorded values). Probed with
46+an independent decoder, not the crate's own helper:
47+
48+```
49+$ ffprobe -v error -show_entries stream=codec_name,profile,pix_fmt -of default=nw=1 \
50+ crates/ec-av1/fixtures/ll444_128root_lossless.obu
51+codec_name=av1
52+profile=High
53+pix_fmt=yuv444p10le
54+```
55+
56+**10-bit**, confirming `10` at both sites. The crate is self-policing besides: the
57+helper asserts the passed depth against the stream's own parsed sequence header, so
58+a wrong depth fails by name rather than packing nothing. The new gate exercises
59+both directions of that check, so it is not a one-way assert.
60+
61+**E0061 red-before, reproduced here rather than taken on report.** Reverting the
62+one stranded site to 4-arg in the merged file:
63+
64+```
65+error[E0061]: this function takes 5 arguments but 4 arguments were supplied
66+```
67+
68+Restored from a saved copy; `git diff` against the merge commit was empty, i.e.
69+byte-identical.
70+
71+## 2. lane-av1oracleskip — the routed-probe class
72+
73+**Conflict shape: genuine two-intent, resolved by composition.** Both sides were
74+right about their own change, in the same `if` statement:
75+
76+- ours (rawhelper): `if aomdec_path().is_file() { assert_rawvideo_matches(..., 10) } else { eprintln!("SKIP ...") }`
77+- theirs (oracleskip): `if aomdec_available(NAME) { assert_rawvideo_matches(...) }`
78+
79+`@both` would have been meaningless here (competing edits of the same lines, not
80+additive). Resolved to **theirs' guard + ours' arity** — the probe owns the skip
81+decision, the depth argument stays:
82+
83+```rust
84+if aomdec_available(NAME) {
85+ assert_rawvideo_matches(&obu, &stream, NAME, FRAMES, 10);
86+}
87+```
88+
89+The `else { eprintln!("SKIP ...") }` arm was **not** carried over: `aomdec_available`
90+owns the single SKIP line, which is the branch's stated design.
91+
92+**The class is closed.** Bare `if aomdec_path().is_file()` guard sites, counted on
93+the branch's own base and on the merged tree:
94+
95+| tree | code guards | doc-comment mentions |
96+|------|-------------|----------------------|
97+| `9b2f6c9d` (base) | **18** | — |
98+| `7bf95961` (branch tip) | 0 | 2 |
99+| `b1a462fa` (merged) | **0** | 2 |
100+
101+The two surviving text matches are both inside `///` doc comments — one in
102+`have_aomenc`'s prose, one inside `aomdec_available`'s own doc explaining the shape
103+it replaced. `aomdec_available(` is called at 19 sites (18 routed + the definition).
104+
105+Five other `aomdec_path().is_file()` uses remain and are **not** the class: two are
106+`assert!(aomdec_path().is_file(), ...)` hard asserts in
107+`gate_444_lossy_live_exact` and `a_distance_weighted_compound_stream_decodes_pixel_exact`
108+(predating this lane, and already failing loudly), and one is `aomdec_available`'s
109+own body.
110+
111+**Routing verified in both directions, on a real missing oracle.** The oracle *is*
112+built on this host, so the missing-oracle path was forced with
113+`EC_AV1_AOMDEC=/nonexistent/aomdec` rather than assumed:
114+
115+- no env var → exactly **one** `SKIP <name>: no oracle aomdec at /nonexistent/aomdec -- the pixel compare is NOT running (set EC_AV1_REQUIRE_AOMDEC=1 to make this a failure)` line, and the gate passes;
116+- `EC_AV1_REQUIRE_AOMDEC=1` → **FAILED**, panicking with
117+ `no oracle aomdec at /nonexistent/aomdec -- the pixel compare this gate exists for would be skipped, and EC_AV1_REQUIRE_AOMDEC/EC_AV1_REQUIRE_AOMENC is set.`
118+
119+That is the required behaviour: under `EC_AV1_REQUIRE_AOMDEC=1` the run **fails
120+rather than skips**. (Note when reading such output: the harness prefixes the test
121+name on the same line as the SKIP, so a `^SKIP` grep misses it. Count the
122+substring, not the line start.)
123+
124+## 3. lane-av1oracleskip r3 — the anti-regression scan, and the add/add
125+
126+r3 adds `gate_coverage::tests::no_tool_presence_check_outside_its_probe`, a source
127+scan over the test-bearing files asserting a tool presence check appears only
128+inside the probe that owns that path, inside an `assert!`, or in a comment. It
129+conflicted with the same file my wave-3a resolver fix lives in, as predicted.
130+
131+**Region 1 — comment-only conflict, took ours.** Two versions of the
132+`enable-tx-size-search` note on `DEFAULT_ON_TOOLS`: ours (txsearch) says the entry
133+is SETTLED and retired on an arrival assert; theirs is the older
134+`lane-av1distwtd r3` note saying the count is a floor of 9 unclassified gates and
135+describing the method that would settle it. The method theirs asks for is
136+`spelling_values` → `bound_values` — which is exactly what landed. Theirs is the
137+pre-settlement text, superseded by the change it requests. **Pure comment
138+conflict; no semantic disagreement existed.** Took ours.
139+
140+**Region 2 — `@both` was WRONG again, resolved by reconstruction.** The two sides
141+were additive at a glance (ours: two `#[test]` fns; theirs: one), and both ended
142+mid-statement:
143+
144+```
145+ours last 3: [' assert!(', ' pinned >= 10,', ' "...found {pinned}"']
146+theirs last 3: [' green without running the oracle compare:\\n {}",', ' offenders.len(),', ' offenders.join("\\n ")']
147+TAIL after >>>: [' );', ' }', '}']
148+```
149+
150+Git had hoisted the shared ` );\n }\n}` out as common context. `@both`
151+would have emitted ours' truncated `assert!(`, then theirs' doc comment **inside an
152+unclosed expression** — not a parse, and not the wave-3a nested-`fn` trap either,
153+just broken text. Rebuilt by construction instead: ours' block closed with its own
154+`);` + `}`, then theirs' block in full with its own `);` + `}`, then the module's
155+`}`. **Both sides kept** — as instructed, the resolver strategy and the scan both
156+survive:
157+
158+- `named_column` closure (my wave-3a strategy (3b)) present at `gate_coverage.rs:800`, wired at `:857`;
159+- the 128x96 mutation case added to `the_resolver_binds_a_format_built_flag_in_both_directions` present at `:1478`;
160+- `print_tx_size_search_census` `:1362`, `the_resolver_binds_…` `:1439`, `no_tool_presence_check_outside_its_probe` `:1565`.
161+
162+**The scan is non-vacuous — proven here, not assumed.** Reverting one routed guard
163+to the bare shape:
164+
165+```
166+1 bare tool presence check(s) outside a probe — each one is a gate that can report
167+green without running the oracle compare:
168+test result: FAILED. 0 passed; 1 failed
169+```
170+
171+Restored; `git diff` against the merge commit empty.
172+
173+Main's warning that the scan's "recognised all three probes" assert would red if a
174+branch renamed or moved a probe: it did not. The scan is green at 29 passed / 0
175+failed, so all three probes were located.
176+
177+## Cross-branch sweep
178+
179+| check | result |
180+|-------|--------|
181+| `cargo check -p ec-av1 --all-targets` after each of the 3 merges | clean, 3 for 3 |
182+| `cargo test -p ec-av1 --lib -- gate_coverage refusal_inventory` | **ok. 29 passed; 0 failed; 0 ignored; 719 filtered out** |
183+| `cargo test -p ec-av1 --lib -- --list \| wc -l` | **750** (748 tests) |
184+| the 3 gates both branches touch | 3/3 `ok. 1 passed; 0 failed` |
185+| `EC_AV1_REQUIRE_AOMDEC=1` + missing oracle | FAILED, naming the path |
186+| missing oracle, no env var | exactly 1 SKIP line, pass |
187+
188+### Gate-count delta and its cause
189+
190+| | lib tests | `wc -l` |
191+|---|---|---|
192+| `3eec02c8` (pre-wave) | 746 | 748 |
193+| `b1a462fa` (after) | 748 | 750 |
194+| **delta** | **+2** | **+2** |
195+
196+Name-set diff, both directions:
197+
198+```
199+ADDED (+2) REMOVED: none
200+ gate_coverage::tests::no_tool_presence_check_outside_its_probe <- oracleskip r3
201+ stream::tests::the_rawvideo_helper_compares_real_samples_at_... <- rawhelper
202+```
203+
204+Cause per branch: **rawhelper +1** (its new two-arm helper gate),
205+**oracleskip r1/r2 +0** (a refactor — it reroutes existing guards and deletes 7
206+redundant `else` arms, adding no gate), **oracleskip r3 +1** (the scan).
207+`gate_coverage + refusal_inventory` moved 28 → 29 purely by the scan.
208+
209+## Deliberately NOT touched
210+
211+- **No push.** Three merges, all local on `main`.
212+- No `rustfmt`, no workspace-wide build, no other crate's tests.
213+- The `else { eprintln!("SKIP ...") }` arms that oracleskip deleted were not
214+ restored in the two conflict regions — the probe owns that line, and reviving
215+ them would put the class back.
216+- The two pre-existing `assert!(aomdec_path().is_file(), …)` hard asserts in
217+ `gate_444_lossy_live_exact` and `a_distance_weighted_compound_stream_decodes_pixel_exact`
218+ were left alone. They are not the routed-probe class (they fail loudly, not
219+ silently) and belong to other lanes.
220+- `stash@{0}` — the foreign `EC_PREDOUT8` edit to `scripts/instrument-aom-oracle.sh`
221+ attributed to `lane-av1cmpaudit` — still in the stash, not applied. Likewise
222+ `stash@{1..3}`.
223+- The `lane-av1rawhelper` worktree showed a transient ` M crates/ec-av1/src/gate_coverage.rs`
224+ at first inspection; it re-hashed clean and the branch tip was unaffected.
225+ Nothing from that worktree was merged.
226+- Every number here was measured in a lane-private
227+ `CARGO_TARGET_DIR=cargo-target-w3b`. The shared `$HOME/.cache/cargo-target`
228+ corrupted three separate readings in wave 3a (see
229+ `skill://counterfactual-ab-target-dir-provenance`, variant 6).