forge
Explore
Log in

Don't you dare go Hollow

lanes: merge-wave-3a report — four branches, one tail-append conflict, one cross-branch resolver fix

Browse files at this commit

4abac36710df182e50da0b6d005f22e5f237cc0bAhmet Kaan GümüşParent: db9b45e
lanes/merge-wave-3a.report.mdadded+202 -0
@@ -0,0 +1,202 @@
1+# Merge wave 3a — four branches
2+
3+Integration owner: wave 3a only. Five other wave-3 branches are being reworked and
4+one is do-not-merge pending a one-line fix; they are **not** in this wave and were
5+not touched.
6+
7+Base: `main` @ `9b2f6c9d` (742 lib tests). Head after this wave: `7fa70aac`
8+(746 lib tests). **Not pushed.**
9+
10+## Per-branch
11+
12+| # | branch | tip merged | conflicts | true delta vs merge base | landed delta on main |
13+|---|--------|-----------|-----------|--------------------------|----------------------|
14+| 1 | `lane-av1txsearch` | `4aebe74d` | none (auto-merged) | `gate_coverage.rs` +510/-47, `lanes/av1txsearch.report.md` +238 | `gate_coverage.rs` +463/-47, report +238 |
15+| 2 | `lane-av1leftwit` | `d5ab6ef4` | none (auto-merged, 3 files) | `decode_probe.rs` +9/-2, `decode.rs` +135, `stream.rs` +103/-8, report +277 | +7/-2, +119/-16, +95/-8, +277 |
16+| 3 | `lane-av1pinslive` | `2e5509e9` | none (auto-merged) | 4 fixtures (new blobs), `stream.rs` +246/-65, report +357 | fixtures, `stream.rs` +181/-65, report +357 |
17+| 4 | `lane-av1lossy128x96` | `9ecb36de` | **1 file, 2 regions** — `stream.rs` tail-append, resolved by reconstruction | `stream.rs` +188/-0, report +141 | `stream.rs` +191/-6, report +141 |
18+
19+"Landed delta" is `git show --numstat <merge-commit>` — the change relative to the
20+accumulated pre-merge `main`, which is why it differs from the branch-vs-base
21+number. Both are reported; neither substitutes for the other.
22+
23+### Tip drift on #3 — the dispatched sha is not on the branch
24+
25+The brief dispatched `lane-av1pinslive` @ `1d438c86`. That object exists but is
26+**reachable from no ref and is not an ancestor of `lane-av1pinslive` or of `main`**:
27+
28+```
29+git for-each-ref --contains 1d438c86 -> (empty)
30+git log --oneline -1 1d438c86 -> lanes/av1pins r2: the two pins were still #[ignore]d...
31+git log --oneline -1 7f815aa8 -> lanes/av1pins r2: the two pins were still #[ignore]d... <- same subject
32+git diff --stat 1d438c86 7f815aa8 -> lanes/av1mergecheck.report.md | 177 +++++
33+```
34+
35+It is the pre-amend r2 report commit, superseded by `7f815aa8`. Merging the
36+dispatched sha would have **deleted** `lanes/av1mergecheck.report.md` (177 lines) and
37+dropped r3+r4 entirely — four committed pin fixtures and 224 lines of `stream.rs`.
38+The branch head `2e5509e9` was merged instead.
39+
40+**Unreviewed delta, flagged:** the refutation pass's "un-ignores exactly TWO gates"
41+describes r2. The branch head un-ignores **FIVE**:
42+
43+| gate | r2 (`1d438c86`) | head (`2e5509e9`) |
44+|------|------------------|-------------------|
45+| `pinned_golden3_stream_decodes_pixel_exact` | un-ignored | un-ignored |
46+| `pinned_sbpart_stream_decodes_pixel_exact` | un-ignored | un-ignored |
47+| `pinned_golden4_stream_decodes_pixel_exact` | still ignored | un-ignored |
48+| `pinned_golden7_stream_decodes_pixel_exact` | still ignored | un-ignored |
49+| `pinned_lr_sgr_stream_call_unique_dump` | still ignored | un-ignored |
50+
51+r3 additionally commits the four remaining untracked pin fixtures
52+(`golden4-pin.obu` 137 B, `golden6-mismatch.obu` 452 B,
53+`golden7-forwarding-mismatch.obu` 152 B, `lr-sgr-r7.obu` 192 B — all verified on
54+disk) and adds a `require_pin` helper. r4 gives `pinned_lr_sgr` the pixel asserts it
55+lacked. Zero gates were newly ignored. Per-gate census, base `aa0ac8c2` vs head:
56+5 flips `(test, ignored) -> (test, live)`, 0 flips the other way, 0 tests removed.
57+
58+Per the brief, the branch was **not** pushed toward un-ignoring the three sibling
59+gates its report says it does not cover.
60+
61+### The #4 conflict, and why `@both` was wrong
62+
63+`stream.rs` conflicted in two regions, both the tail-append shape: `leftwit`,
64+`pinslive` and `lossy` all append `#[test] fn`s at the end of the same test module,
65+and git hoisted the shared trailing lines (the `let _gate_lock` / `have_ffmpeg()`
66+prologue, and the module's closing brace) out of the hunks as common context.
67+
68+`@both` would have emitted **ours' gate head, then theirs' gate head, then the one
69+shared body** — nesting the second `fn` inside the first. That parses, so no
70+`cargo check` error would fire, but the outer gate would have an empty body and a
71+meaningless `#[test]` on a nested item: a silently vacuous gate.
72+
73+Resolved by reconstruction instead (tail-append by construction, not marker
74+surgery): HEAD's `stream.rs` with the module's final `}` dropped, the lane's
75+single 188-line contiguous append spliced in, `}` re-added. Verified afterwards:
76+
77+- `git diff --numstat HEAD -- crates/ec-av1/src/stream.rs` = `189 0` — a pure
78+ append, nothing else moved;
79+- both gates present exactly once
80+ (`a_real_aomenc_12bit_stream_with_two_tile_rows_and_a_two_by_two_tile_grid_decodes_pixel_exact`,
81+ `a_real_aomenc_444_whole_64_root_tx_size_search_stream_decodes_pixel_exact_at_128x96`);
82+- the flagged behaviour survives: the 128x96 gate asserts **parsed** `tx_mode` per
83+ arm — `TxMode::Select` on the search arm, `TxMode::Largest` on the control.
84+
85+## Cross-branch defect found by the merge, and fixed here
86+
87+Branches 1 and 4 were each individually green and together red.
88+
89+`lane-av1txsearch` landed `print_tx_size_search_census`, whose `assert_eq!(unresolvable, 0)`
90+exists to go red the moment a gate body builds `--enable-tx-size-search` in a shape
91+the resolver cannot bind. `lane-av1lossy128x96` landed a gate written exactly that
92+way — `for (label, search, want_mode, want_len, want_fnv) in arms`, with the arm
93+table hoisted into `let arms`. The assertion fired, as designed:
94+
95+```
96+assertion `left == right` failed: 1 gate bodies build --enable-tx-size-search into
97+a variable this census cannot bind
98+ left: 1 right: 0
99+```
100+
101+`bound_values` strategy (3) only understood an array spelled **inline** after `in`.
102+With a named collection it read past the `for` line to the next `[` in the body —
103+the gate's unrelated `&[..]` flag list — found no digits, and returned an empty set.
104+Both arms were in the source the whole time.
105+
106+Fixed in `7fa70aac` (integration-authored, not folded into either lane's merge
107+commit): new strategy (3b) follows the `for` line's collection name back to its
108+`let` binding and takes that column. Two details are load-bearing — a word-boundary
109+guard (`let arms_foo` must not answer for `let arms`), and a hop over `=`, because
110+the binding's **type annotation is itself bracketed**
111+(`[(&str, &str, TxMode, usize, u64); 2]`), so scanning for the first `[` after the
112+name returns the type.
113+
114+**Red-before:** with `merge(set)` replaced by `let _ = set;` the new case added to
115+`the_resolver_binds_a_format_built_flag_in_both_directions` fails with
116+`a_real_aomenc_444_whole_64_root_tx_size_search_stream_decodes_pixel_exact_at_128x96:
117+the unmutated body should resolve to both values, got {}`. Restored → green.
118+
119+## Checks
120+
121+`cargo check -p ec-av1 --all-targets` after each merge — clean, no warnings, four for
122+four:
123+
124+| after | result |
125+|-------|--------|
126+| merge 1 `1cc2f250` | Finished, 1.73s |
127+| merge 2 `bd588822` | Finished, 16.90s |
128+| merge 3 `4532caa6` | Finished, 10.14s |
129+| merge 4 `8dd07ed7` (post-resolution) | Finished, 3.77s |
130+
131+Final, after `7fa70aac`:
132+
133+```
134+$ cargo test -p ec-av1 --lib -- gate_coverage refusal_inventory
135+test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 718 filtered out
136+
137+$ cargo test -p ec-av1 --lib -- --list | wc -l
138+748
139+```
140+
141+Census line, proving the resolver now binds the new gate:
142+
143+```
144+a_real_aomenc_444_whole_64_root_tx_size_search_..._at_128x96: =0 and =1 (one arm each) [format! template resolved]
145+enable-tx-size-search over 259 census-selected gate bodies: =0 only 88, =1 only 13, both 20, unresolvable 0, not named 138
146+```
147+
148+### Toolchain caveat that cost three wrong readings
149+
150+`$HOME/.cache/cargo-target` is **shared with concurrent sibling agents on this
151+machine**, and it is keyed by package name+version, not by source path. Three
152+successive `cargo test` runs on an unchanged tree reported 746, then 715 (with
153+`refusal_inventory::tests::every_chroma_unit_a_64_axis_strip_can_present_has_a_coefficient_table`
154+failing "the refusal string is gone from `decode_block_rect64`" — a string that is
155+present at line 19003, inside that function). A sibling worktree built into the
156+same directory had overwritten the test binary. Every number in this report was
157+re-measured in a dedicated `CARGO_TARGET_DIR=cargo-target-w3a-final`; the baseline
158+was measured in a **second** dedicated dir, because sharing even a private dir
159+across two source trees reproduces the same corruption.
160+
161+## Gate-count delta and its cause
162+
163+| | lib tests | `wc -l` |
164+|---|---|---|
165+| `main` @ `9b2f6c9d` (pre-wave) | 742 | 744 |
166+| after wave 3a | 746 | 748 |
167+| **delta** | **+4** | **+4** |
168+
169+Name-set diff, both directions (`comm`), base `9b2f6c9d` vs `7fa70aac`:
170+
171+```
172+ADDED (+4) REMOVED: none
173+ gate_coverage::tests::print_tx_size_search_census <- txsearch
174+ gate_coverage::tests::the_resolver_binds_a_format_built_flag_... <- txsearch
175+ stream::tests::a_committed_4to20_stream_presents_a_one_mi_left_... <- leftwit
176+ stream::tests::a_real_aomenc_444_whole_64_root_tx_size_search_..._128x96 <- lossy128x96
177+```
178+
179+Cause, per branch: **txsearch +2** (the census and its resolver test), **leftwit +1**,
180+**lossy128x96 +1**, **pinslive +0** — pinslive only removes `#[ignore]` attributes
181+and adds a `require_pin` helper, so it moves the *live* count, not the *listed*
182+count. Its five gates went from listed-and-ignored to listed-and-run, which is why
183+the suite executes strictly more work at the same 746.
184+
185+## Deliberately NOT touched
186+
187+- **No push.** All five commits sit on local `main`.
188+- The five wave-3 branches under rework, and the do-not-merge one — not fetched for
189+ merge, not touched.
190+- `crates/ec-av1/fixtures/**` — the four `.obu` blobs are pinslive's, landed
191+ byte-for-byte by the merge; no fixture was regenerated, re-encoded, or renamed.
192+- `lanes/av1mergecheck.report.md` — present (16153 B) and untouched. r2 deleted it
193+ and r3 restored it; merging the branch head leaves it exactly as `main` had it.
194+- `lanes/av1pins.report.md` — the lane's own report, not corrected toward the brief
195+ even where the brief and the report disagree.
196+- `stash@{0}` (a foreign `EC_PREDOUT8` edit to `scripts/instrument-aom-oracle.sh`,
197+ attributed to `lane-av1cmpaudit`, preserved by Agent05-2) — left in the stash, not
198+ applied. Same for `stash@{1..3}`.
199+- `crates/ec-av1/src/stream.rs` in the lossy merge — no whole-file `--theirs`; main's
200+ `a_real_aomenc_inter_sequence_with_an_intra_1to4_strip_decodes_pixel_exact_10bit`
201+ (a main-side test the branch does not have) survives.
202+- No `rustfmt`, no workspace-wide build, no other crate's tests.