From 9df6d92e69211bea689d10e8c959722b08adf6aa Mon Sep 17 00:00:00 2001 From: npub1cc3ha7z055mu0rwwu7806t2wt8mj3pvu0uv5mfp2c50dahaqhczshdalg6 Date: Thu, 9 Jul 2026 00:33:06 -0400 Subject: [PATCH] test(desktop): widen classifier attribution window to +/-1 frame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two rAF loops (fixture sampler + hook) interleave in an order we don't control, and a late WebKit RO appends a frame after the reflow paints. A tight [prev, this) window mis-labeled all 4 fast-corpus survivors UNATTRIBUTED when the attempt had appended one frame late. Widening to [prev, next) resolves them to their true class. Fast jitter corpus, WebKit: all 4 survivors classify SKIP (fired=false, signedShift=0.0, dScroll=0.0) — the momentum-skip gate suppressed the write on a coalesced-momentum still frame, so the reflow renders uncorrected. Neither GROW (absorption) nor SHRINK (Max's band): the lever is the skip gate. Co-authored-by: Tyler Longwell Signed-off-by: Tyler Longwell --- desktop/tests/e2e/upscroll-slow-scroll.perf.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/desktop/tests/e2e/upscroll-slow-scroll.perf.ts b/desktop/tests/e2e/upscroll-slow-scroll.perf.ts index cacec49ea7..24e722c4db 100644 --- a/desktop/tests/e2e/upscroll-slow-scroll.perf.ts +++ b/desktop/tests/e2e/upscroll-slow-scroll.perf.ts @@ -252,9 +252,17 @@ test("W4a slow-scroll: reversal distribution in the felt low-velocity regime", a const rowMove = b.top - a.top; const dScroll = b.scrollTop - a.scrollTop; if (rowMove > -REVERSAL_PX) continue; - // Attempts appended in this frame's window; pick the one whose |signedShift| - // is largest (the dominant reflow this frame drives the felt motion). - const window = corrections.slice(a.probeLen, b.probeLen); + // Attribution window. The hook's correction attempt for the reflow that + // produced this reversal can append across a ±1-frame span relative to our + // sampler: the two rAF loops interleave in an order we don't control, and on + // WebKit a late RO appends a frame after the reflow paints. So the window is + // [prev-frame probeLen, NEXT-frame probeLen) — attempts from the frame + // before through the frame after. A reversal with NO attempt anywhere in + // that span is genuinely unattributed (the corrector did not run a mid- + // history attempt on those frames at all — e.g. re-pick guard or null cur), + // which is itself a distinct diagnosis from a fired-then-clamped write. + const next = frames[i + 1] ?? b; + const window = corrections.slice(a.probeLen, next.probeLen); let attempt: (typeof corrections)[number] | null = null; for (const c of window) { if (