forge
Explore
Log in

Don't you dare go Hollow

A 1:4 strip read its neighbour MODE from a 16px-coarse band -- four 8px strips alias onto one cell, and the tile-edge cell holds a sibling

Browse files at this commit

8029745ffb9ff8713e6064990745f192e4d3f579Ahmet Kaan GümüşParent: c8cc7ef
  • fix
    • a 1:4 strip read its neighbour MODE from a 16px-coarse band -- four 8px strips alias onto one cell, and the tile-edge cell holds a sibling
Show full message
fix(av1): a 1:4 strip read its neighbour MODE from a 16px-coarse band -- four 8px strips alias onto one cell, and the tile-edge cell holds a sibling

lane-rectsplitx r2. The r1 "the depth-1 rect transform unit mismatches
ffmpeg" premise is DISPROVED: the rect unit itself is right. The band
fixture's desync starts at the `mode` symbol of mi(4,8) (8-bit, cq 12,
seed 42), where the entry range matches aomdec (38331) but the value
differs (ours 11 / rng 52576, libaom 12 / rng 34624) -- a different
`kf_y_mode` CDF row, i.e. a wrong neighbour mode, not a wrong transform.

Two causes, both in the neighbour bands:
  * `decode_block_rect4` never recorded the mi-exact mode/uv_mode maps in
    its UNSPLIT arm (only the split arm did, through
    `record_mi_luma_rect`), so `mode_left_mi` answered None and the coarse
    16x16 cell -- holding the LAST of the four 32x8 strips -- stood in for
    the strip at the reader's own mi row.
  * the coarse band is also read where libaom has NO neighbour at all: at
    tile column 0 the four strips of one HORZ_4 share one `left_mode`
    cell, so strip 2 read strip 1's mode as its "left". New
    `Neighbours::modes_above_left_mi` is mi-exact AND availability-correct
    (`mi_r > tile_row0_mi` / `mi_c > tile_col0_mi` -> DC_PRED), and the
    class is swept into `decode_leaf_rect` and `decode_leaf8` too.
  * `decode_block_rect4` asked `smooth_uv_neighbour` at the SUB cell's
    top-left mi, not the strip's real mi -- a chroma-only defect (chroma
    edge-filter strength) that seed 43's VERT_4 exposed with luma
    bit-exact.

With all three, the depth-1 rect unit decodes BIT-EXACT vs aomdec on both
orientations of the fixture (seed 42 HORZ_4 and seed 43 VERT_4, 8-bit
cq 12/17, tx-size-search on, luma+U+V). The refusals are lifted and the
gate now HARD-asserts both split depths.

MEASURED RESIDUE, reported not hidden: seed 46 (8-bit, cq 12,
tx-size-search on) still mismatches CHROMA ONLY (luma bit-exact, U 32 /
V 173 samples off by +-1..2, first at chroma (16,8) = the 32x8 strip at
luma (32,16)), so this gate is RED as committed. See
lanes/rectsplitx-r2.report.md for the reproducer and the one-command
fallback to green.
crates/ec-av1/src/decode.rsmodified+65 -34
@@ -3975,6 +3975,33 @@ impl Neighbours {
3975 /// strip path ([`decode_leaf_rect`] took this override in r4; a 32x16 strip3975 /// strip path ([`decode_leaf_rect`] took this override in r4; a 32x16 strip
3976 /// whose left neighbour was a 16x8 leaf still read the stale row and picked3976 /// whose left neighbour was a 16x8 leaf still read the stale row and picked
3977 /// a different CDF for the same mode value).3977 /// a different CDF for the same mode value).
3978+ /// lane-rectsplitx r2: availability-correct above/left luma modes for a
3979+ /// block whose top-left mi is `(mi_r, mi_c)`. libaom reads `above_mbmi`
3980+ /// only when `up_available` and `left_mbmi` only when `left_available`;
3981+ /// the coarse [`SUB`] bands cannot express that, and with 8-px strips they
3982+ /// actively lie -- four 32x8 strips of one `HORZ_4` share ONE 16x16
3983+ /// `left_mode` cell, so the second strip at tile column 0 read the FIRST
3984+ /// strip's mode as its "left neighbour" (measured on the band fixture at
3985+ /// mi(10,0): mode 2 where libaom has DC, a different `kf_y_mode` row).
3986+ fn modes_above_left_mi(
3987+ &self,
3988+ mi_r: usize,
3989+ mi_c: usize,
3990+ fallback: (usize, usize),
3991+ ) -> (usize, usize) {
3992+ let above = if mi_r > self.tile_row0_mi {
3993+ self.mode_above_mi(mi_r, mi_c).unwrap_or(fallback.0)
3994+ } else {
3995+ DC_PRED
3996+ };
3997+ let left = if mi_c > self.tile_col0_mi {
3998+ self.mode_left_mi(mi_r, mi_c).unwrap_or(fallback.1)
3999+ } else {
4000+ DC_PRED
4001+ };
4002+ (above, left)
4003+ }
4004+
3978 fn modes_above_left(&self, r: usize, c: usize) -> (usize, usize) {4005 fn modes_above_left(&self, r: usize, c: usize) -> (usize, usize) {
3979 let (mi_r, mi_c) = (r * (SUB / MI), c * (SUB / MI));4006 let (mi_r, mi_c) = (r * (SUB / MI), c * (SUB / MI));
3980 let above = self.mode_above_mi(mi_r, mi_c).unwrap_or(self.above_mode[c]);4007 let above = self.mode_above_mi(mi_r, mi_c).unwrap_or(self.above_mode[c]);
@@ -4892,12 +4919,6 @@ fn decode_rect_split(
4892 // 32-level 1:4 band fixture (8-bit, cq 12, seed 42). The tables and the4919 // 32-level 1:4 band fixture (8-bit, cq 12, seed 42). The tables and the
4893 // per-unit rect walk stay wired above/below; the round that finds that4920 // per-unit rect walk stay wired above/below; the round that finds that
4894 // defect deletes this refusal and nothing else.4921 // defect deletes this refusal and nothing else.
4895- if tx_w != tx_h {
4896- return Err(unsupported(format!(
4897- "a split intra strip whose transform unit is the rect {tx_w}x{tx_h} (the depth-1 \
4898- step of a 1:4 strip; measured wrong pixels, refused rather than shipped)"
4899- )));
4900- }
4901 let luma_set = txbset_for(tx_w.min(tx_h), reduced_tx_set);4922 let luma_set = txbset_for(tx_w.min(tx_h), reduced_tx_set);
4902 let luma_scan = default_scan(tx_w.min(tx_h));4923 let luma_scan = default_scan(tx_w.min(tx_h));
4903 let zero_tu = vec![0i32; tx_w * tx_h];4924 let zero_tu = vec![0i32; tx_w * tx_h];
@@ -5572,12 +5593,12 @@ fn decode_leaf_rect(
5572 // cannot hold the modes a split (or a pair of strips) leaves behind, so5593 // cannot hold the modes a split (or a pair of strips) leaves behind, so
5573 // when the map holds the block at exactly this strip's above/left mi it5594 // when the map holds the block at exactly this strip's above/left mi it
5574 // is the neighbour libaom's `above_mi`/`left_mi` reads.5595 // is the neighbour libaom's `above_mi`/`left_mi` reads.
5575- if let Some(m) = neighbours.mode_above_mi(leaf_mi.0, leaf_mi.1) {5596+ // lane-rectsplitx r2 (same class as the 1:4 fix): mi-exact AND
5576- above_mode = m;5597+ // availability-correct -- four 16x8 strips share one coarse 16x16
5577- }5598+ // `left_mode` cell too, so the fallback must not stand in for an absent
5578- if let Some(m) = neighbours.mode_left_mi(leaf_mi.0, leaf_mi.1) {5599+ // tile-edge neighbour.
5579- left_mode = m;5600+ let (above_mode, left_mode) =
5580- }5601+ neighbours.modes_above_left_mi(leaf_mi.0, leaf_mi.1, (above_mode, left_mode));
5581 let smooth_neighbor =5602 let smooth_neighbor =
5582 is_smooth_mode(above_mode) || is_smooth_mode(left_mode);5603 is_smooth_mode(above_mode) || is_smooth_mode(left_mode);
5583 if smooth_neighbor {5604 if smooth_neighbor {
@@ -5813,6 +5834,12 @@ fn decode_block_rect4(
5813 left_mode = pmode;5834 left_mode = pmode;
5814 }5835 }
5815 }5836 }
5837+ // lane-rectsplitx r2, ROOT CAUSE of the 1:4 mismatch: mi-exact +
5838+ // availability-correct neighbour modes (see
5839+ // [`Neighbours::modes_above_left_mi`]). The coarse 16x16 bands alias every
5840+ // 8-px strip of a `HORZ_4`/`VERT_4` onto one cell.
5841+ let (above_mode, left_mode) =
5842+ neighbours.modes_above_left_mi(mi_r, mi_c, (above_mode, left_mode));
5816 let (skip, mode, angle_delta_y, uv_mode, angle_delta_uv, alpha, filter_intra) =5843 let (skip, mode, angle_delta_y, uv_mode, angle_delta_uv, alpha, filter_intra) =
5817 read_intra_mode_rect(5844 read_intra_mode_rect(
5818 dec,5845 dec,
@@ -5832,8 +5859,13 @@ fn decode_block_rect4(
5832 if smooth_neighbor {5859 if smooth_neighbor {
5833 SMOOTH_LUMA_HITS.with(|c| c.set(c.get() + 1));5860 SMOOTH_LUMA_HITS.with(|c| c.set(c.get() + 1));
5834 }5861 }
5835- let smooth_neighbor_uv =5862+ // lane-rectsplitx r2: this strip's REAL mi, not the [`SUB`] cell's
5836- neighbours.smooth_uv_neighbour(r * (SUB / MI), c * (SUB / MI), r, c);5863+ // top-left -- a 1:4 strip starts 8 px into a 16-px cell, so
5864+ // `r * (SUB / MI)` names a different mi column and the chroma
5865+ // edge-filter strength was read from the wrong neighbour (measured:
5866+ // seed 43, the last 8x32 strip at luma (152,32), chroma-only mismatch
5867+ // with luma bit-exact).
5868+ let smooth_neighbor_uv = neighbours.smooth_uv_neighbour(mi_r, mi_c, r, c);
5837 if filter_intra.is_some() {5869 if filter_intra.is_some() {
5838 FILTER_INTRA_RECT_HITS.with(|c| c.set(c.get() + 1));5870 FILTER_INTRA_RECT_HITS.with(|c| c.set(c.get() + 1));
5839 }5871 }
@@ -5856,20 +5888,11 @@ fn decode_block_rect4(
5856 // both interleave in every real stream.5888 // both interleave in every real stream.
5857 TX_DEPTH_HITS.with(|c| c.set(c.get() + 1));5889 TX_DEPTH_HITS.with(|c| c.set(c.get() + 1));
5858 let (tx_w, tx_h) = depth_to_tx_wh(bw, bh, depth);5890 let (tx_w, tx_h) = depth_to_tx_wh(bw, bh, depth);
5859- // lane-rectsplitx r1 MEASURED (gate below, 8-bit band fixture, cq5891+ // lane-rectsplitx r2: both depths ship together, as the r1 handoff
5860- // 12..28): depth 1 -- the 2:1 RECT unit -- fires FIRST in every5892+ // predicted -- depth 1 fires FIRST in every attempt that splits at
5861- // attempt that splits at all, and its per-unit walk mismatched5893+ // all, so a depth-2-only lift could never be gated. The r1 mismatch
5862- // ffmpeg, so no attempt ever reaches a pixel-compared depth-2 strip.5894+ // was never the rect unit: it was the neighbour MODE the strip reads
5863- // A depth-2-only lift is therefore ungatable (the handoff predicted5895+ // (see `modes_above_left_mi`).
5864- // exactly this: the two depths interleave and must land together),
5865- // and an ungated lift is not a lift -- both refuse by name until the
5866- // rect-unit defect is found.
5867- if tx_w != tx_h {
5868- return Err(unsupported(format!(
5869- "a 32x32-level 1:4 strip with a split transform (per-unit 4:1 prediction is \
5870- not ported, depth={depth})"
5871- )));
5872- }
5873 let which = if depth == 1 {5896 let which = if depth == 1 {
5874 &RECT4_SPLIT_DEPTH1_HITS5897 &RECT4_SPLIT_DEPTH1_HITS
5875 } else {5898 } else {
@@ -5928,6 +5951,14 @@ fn decode_block_rect4(
5928 neighbours.left_uv_mode[r + cell] = uv_predict_mode;5951 neighbours.left_uv_mode[r + cell] = uv_predict_mode;
5929 neighbours.left_side[r + cell] = bh;5952 neighbours.left_side[r + cell] = bh;
5930 }5953 }
5954+ // ...and the mi-EXACT maps the coarse cells alias away, exactly as
5955+ // [`decode_leaf_rect`] does (the split arm above records these through
5956+ // `record_mi_luma_rect`). Without this an unsplit 32x8 strip left
5957+ // `sub8_mode_row` holding the previous block, and the next 32x32's
5958+ // strips read a stale `kf_y_mode` row (measured: mi(4,8) on the band
5959+ // fixture).
5960+ neighbours.record_mode_mi(mi_r, mi_c, mi_w, mi_h, mode);
5961+ neighbours.record_uv_mode_mi(mi_r, mi_c, mi_w, mi_h, uv_predict_mode);
5931 let (px, py) = (mi_c * MI, mi_r * MI);5962 let (px, py) = (mi_c * MI, mi_r * MI);
5932 let (cpx, cpy) = (px / 2, py / 2);5963 let (cpx, cpy) = (px / 2, py / 2);
5933 let (chroma_w, chroma_h) = (bw / 2, bh / 2);5964 let (chroma_w, chroma_h) = (bw / 2, bh / 2);
@@ -7878,12 +7909,12 @@ fn decode_leaf8(
7878 // `prev_leaf`: one 16x16 slot cannot hold the two different modes its7909 // `prev_leaf`: one 16x16 slot cannot hold the two different modes its
7879 // two 8x8 (or four 4x4) columns leave behind, so a leaf whose above/left7910 // two 8x8 (or four 4x4) columns leave behind, so a leaf whose above/left
7880 // neighbour sits in a split cell read the wrong `kf_y_mode` row.7911 // neighbour sits in a split cell read the wrong `kf_y_mode` row.
7881- if let Some(m) = neighbours.mode_above_mi(leaf_mi.0, leaf_mi.1) {7912+ // lane-rectsplitx r2 swept this arm into
7882- above_mode = m;7913+ // [`Neighbours::modes_above_left_mi`]: the mi-exact map ALSO has to answer
7883- }7914+ // "no neighbour" at a tile edge, where the coarse cell holds the block
7884- if let Some(m) = neighbours.mode_left_mi(leaf_mi.0, leaf_mi.1) {7915+ // above/left of it inside the same 16x16.
7885- left_mode = m;7916+ let (above_mode, left_mode) =
7886- }7917+ neighbours.modes_above_left_mi(leaf_mi.0, leaf_mi.1, (above_mode, left_mode));
7887 let smooth_neighbor = is_smooth_mode(above_mode) || is_smooth_mode(left_mode);7918 let smooth_neighbor = is_smooth_mode(above_mode) || is_smooth_mode(left_mode);
7888 // Chroma's edge-filter type reads the CHROMA neighbour's `uv_mode`7919 // Chroma's edge-filter type reads the CHROMA neighbour's `uv_mode`
7889 // (`get_intra_edge_filter_type`, reconintra.c:974), never the luma mode7920 // (`get_intra_edge_filter_type`, reconintra.c:974), never the luma mode
crates/ec-av1/src/refusal_inventory.rsmodified+0 -2
@@ -34,13 +34,11 @@ const REFUSALS: &[&str] = &[
34 "a coded (non-skip) HORZ_B/VERT_B rect strip below 16x16 (this decoder ports only the skip case at this size)",34 "a coded (non-skip) HORZ_B/VERT_B rect strip below 16x16 (this decoder ports only the skip case at this size)",
35 "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here",35 "a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here",
36 "a split intra strip whose transform unit is {tx_w}x{tx_h} (no luma coefficient tables for that shape here)",36 "a split intra strip whose transform unit is {tx_w}x{tx_h} (no luma coefficient tables for that shape here)",
37- "a split intra strip whose transform unit is the rect {tx_w}x{tx_h} (the depth-1 step of a 1:4 strip; measured wrong pixels, refused rather than shipped)",
38 "a HORZ_A/HORZ_B/VERT_A partition below 16x16 (this decoder codes only the square arms, HORZ, VERT, VERT_B, and a clean split below 16x16)",37 "a HORZ_A/HORZ_B/VERT_A partition below 16x16 (this decoder codes only the square arms, HORZ, VERT, VERT_B, and a clean split below 16x16)",
39 "an inter partition below 8x8 (this decoder codes no inter leaf smaller than 8x8; lane-sub8 scoped to intra)",38 "an inter partition below 8x8 (this decoder codes no inter leaf smaller than 8x8; lane-sub8 scoped to intra)",
40 "a 16x16 block whose true edge cuts through both axes needs a rectangular transform this decoder does not code yet",39 "a 16x16 block whose true edge cuts through both axes needs a rectangular transform this decoder does not code yet",
41 "a 16x16 inter block whose true edge cuts through both axes needs a rectangular transform this decoder does not code yet",40 "a 16x16 inter block whose true edge cuts through both axes needs a rectangular transform this decoder does not code yet",
42 "a 32x32 partition type this decoder does not code (value={part32})",41 "a 32x32 partition type this decoder does not code (value={part32})",
43- "a 32x32-level 1:4 strip with a split transform (per-unit 4:1 prediction is not ported, depth={depth})",
44 "a Golomb tail longer than this decoder reads",42 "a Golomb tail longer than this decoder reads",
45 "a tx_type symbol outside its CDF's own set: {t}",43 "a tx_type symbol outside its CDF's own set: {t}",
46 "an INTER 32x32 partition type this decoder does not code (value={part32})",44 "an INTER 32x32 partition type this decoder does not code (value={part32})",
crates/ec-av1/src/stream.rsmodified+13 -16
@@ -11697,7 +11697,7 @@ mod tests {
11697 /// `encode::tests::every_rect_shape_reaches_what_libaom_says_over_the_whole_superblock`11697 /// `encode::tests::every_rect_shape_reaches_what_libaom_says_over_the_whole_superblock`
11698 /// against libaom's own `has_tr_*`/`has_bl_*` arrays.11698 /// against libaom's own `has_tr_*`/`has_bl_*` arrays.
11699 #[test]11699 #[test]
11700- #[ignore = "lane-rectsplitx r1: the sub16 split-transform refusal is lifted and the stream now decodes, but seed 700 cq 45 mismatches ffmpeg on LUMA with 4 strips and 0 of them reaching -- a defect that refusal was hiding, not this gate's own subject"]11700+ #[ignore = "lane-rectsplitx r2 (re-measured after the neighbour-mode fix): every seed 700..739 attempt now stops at another lane's refusal 'a HORZ_A/HORZ_B/VERT_A partition below 16x16', so the gate reaches no strip at all -- blocked on AB partitions below 16x16, not on this lane"]
11701 fn a_directional_16x8_strip_reads_the_right_above_right_samples() {11701 fn a_directional_16x8_strip_reads_the_right_above_right_samples() {
11702 const NAME: &str = "a_directional_16x8_strip_reads_the_right_above_right_samples";11702 const NAME: &str = "a_directional_16x8_strip_reads_the_right_above_right_samples";
11703 if !have_ffmpeg() {11703 if !have_ffmpeg() {
@@ -14960,7 +14960,7 @@ mod tests {
14960 /// arm's 10-bit encode is a different stream, so they are a widening, not14960 /// arm's 10-bit encode is a different stream, so they are a widening, not
14961 /// a measured firing set for this recipe -- the round that un-ignores14961 /// a measured firing set for this recipe -- the round that un-ignores
14962 /// this gate must re-measure which 10-bit seeds fire it).14962 /// this gate must re-measure which 10-bit seeds fire it).
14963- #[ignore = "lane-rectsplitx r1: the sub16 split-transform refusal is lifted (the pinned 16x8 fixture now decodes its whole frame pixel-exact), but seed 55 mismatches ffmpeg on the U plane -- a chroma defect that refusal was hiding, open"]14963+ #[ignore = "lane-rectsplitx r2 (re-measured after the neighbour-mode fix): still a CHROMA-only defect behind the lifted split refusal -- 10-bit seed 49 frame 0 plane V first diff at row 4 col 60, ours 510 vs ffmpeg 509, filter_intra_rect_sub16_hits=2; sub-16 filter-intra chroma prediction, open"]
14964 #[test]14964 #[test]
14965 fn a_real_aomenc_10bit_filter_intra_on_a_sub16_strip_decodes_pixel_exact() {14965 fn a_real_aomenc_10bit_filter_intra_on_a_sub16_strip_decodes_pixel_exact() {
14966 const NAME: &str = "a_real_aomenc_10bit_filter_intra_on_a_sub16_strip_decodes_pixel_exact";14966 const NAME: &str = "a_real_aomenc_10bit_filter_intra_on_a_sub16_strip_decodes_pixel_exact";
@@ -15104,7 +15104,7 @@ mod tests {
15104 /// itself is pinned by15104 /// itself is pinned by
15105 /// [`a_pinned_aomenc_16x8_strip_reads_its_use_filter_intra_flag`], whose15105 /// [`a_pinned_aomenc_16x8_strip_reads_its_use_filter_intra_flag`], whose
15106 /// `expect_err` must become a pixel compare in that same round.15106 /// `expect_err` must become a pixel compare in that same round.
15107- #[ignore = "lane-rectsplitx r1: the sub16 split-transform refusal is lifted (the pinned 16x8 fixture now decodes its whole frame pixel-exact), but seed 55 mismatches ffmpeg on the U plane -- a chroma defect that refusal was hiding, open"]15107+ #[ignore = "lane-rectsplitx r2 (re-measured after the neighbour-mode fix): still a CHROMA-only defect behind the lifted split refusal -- 10-bit seed 49 frame 0 plane V first diff at row 4 col 60, ours 510 vs ffmpeg 509, filter_intra_rect_sub16_hits=2; sub-16 filter-intra chroma prediction, open"]
15108 #[test]15108 #[test]
15109 fn a_real_aomenc_stream_with_filter_intra_on_a_sub16_horz_vert_strip_decodes_pixel_exact() {15109 fn a_real_aomenc_stream_with_filter_intra_on_a_sub16_horz_vert_strip_decodes_pixel_exact() {
15110 const NAME: &str =15110 const NAME: &str =
@@ -16402,19 +16402,16 @@ mod tests {
16402 // have fired inside an attempt that then compared pixel-exact16402 // have fired inside an attempt that then compared pixel-exact
16403 // (class counter-from-refused-stream -- a global counter would16403 // (class counter-from-refused-stream -- a global counter would
16404 // count strips of attempts that later refused).16404 // count strips of attempts that later refused).
16405- // depth 2 (square TX_8X8 units) is what this round ported and what16405+ // lane-rectsplitx r2: BOTH depths are now decoded, so both are
16406- // the ReelB extract needed; depth 1 (the 2:1 rect unit) is16406+ // HARD-asserted -- depth 1 is the 2:1 rect unit
16407- // refused by name, so it can only show up here as a refusal.16407+ // (`sub_tx_size_map[TX_32X8] == TX_16X8`), depth 2 the square
16408- // Both 1:4 split depths are refused by name (the rect-unit16408+ // TX_8X8, and they interleave across the window; a run that only
16409- // measurement above), so these counters are REPORTED, never16409+ // reached one of them proves half the walk.
16410- // asserted: the tx-size-search half of the window exists to keep16410+ assert!(
16411- // that refusal honest -- the attempts must refuse, never mismatch.16411+ depth1_proved > 0 && depth2_proved > 0,
16412- assert_eq!(16412+ "{NAME}: {bit_depth}-bit: a 1:4 split-transform depth never fired inside a \
16413- depth1_proved + depth2_proved,16413+ pixel-exact attempt (depth1={depth1_proved}, depth2={depth2_proved}) -- the \
16414- 0,16414+ tx-size-search half of the window proved nothing"
16415- "{NAME}: {bit_depth}-bit: a 1:4 split-transform strip decoded \
16416- (depth1={depth1_proved}, depth2={depth2_proved}) although both depths are \
16417- refused -- the refusal above is dead"
16418 );16415 );
16419 eprintln!(16416 eprintln!(
16420 "{NAME}: {bit_depth}-bit split-transform 1:4 strips: depth1={depth1_proved}, \16417 "{NAME}: {bit_depth}-bit split-transform 1:4 strips: depth1={depth1_proved}, \
lanes/COMMON-20260901.mdmodified+11 -0
@@ -89,3 +89,14 @@ NEVER wait with a foreground `until/while ... sleep` loop or `tail --pid`.
89 ## NEVER pkill BY BINARY NAME (2026-09-02: one lane's `pkill -f ec_av1-<hash>` killed another lane's suite)89 ## NEVER pkill BY BINARY NAME (2026-09-02: one lane's `pkill -f ec_av1-<hash>` killed another lane's suite)
90 The test binary hash is identical across worktrees. Kill only by PID you own (`$!`, or the systemd unit90 The test binary hash is identical across worktrees. Kill only by PID you own (`$!`, or the systemd unit
91 name you started). `pkill -f`/`killall` on cargo/ec_av1 patterns is forbidden.91 name you started). `pkill -f`/`killall` on cargo/ec_av1 patterns is forbidden.
92+
93+## NEVER `cargo fmt` IN A LANE (3 lanes lost their diffs to it on 2026-09-02)
94+main is not rustfmt-clean (~6000 lines of churn). Hand-indent; `cargo test --no-run` is the check.
95+If you ran it: extract your own hunks, `git checkout -- crates/`, re-apply.
96+
97+## MEMORY (user order 2026-09-02: an unsteady box fails the job)
98+30 GB box shared by ~10 agents. Every decode/encode/probe invocation runs under
99+`systemd-run --user --scope -q -p MemoryMax=6G <cmd>`; suites under a unit with `-p MemoryMax=10G`;
100+never two suites per lane; film extracts ≤2 s; a watchdog (`ec-memwatch` user unit, log
101+`$HOME/.cache/ec-memwatch.log`) SIGKILLs any codec/test process above 6 GiB RSS or the largest one
102+when MemAvailable < 3 GiB — a killed run means YOUR command exceeded the budget: bound it, do not retry as-is.