Stability: note-bars-motion.spec.ts:71 @throttled longest-task gate flakes at 6x CPU (Style sheet, Attach menu; also on dev) #1115

Open
opened 2026-11-13 21:27:13 +00:00 by kayg · 2 comments
Owner

Found by the full Playwright run of the #861 stack head 9a3d38586, project throttled-390 (run through a temporary untracked config that keeps only the throttled projects, so no dependency closure runs).

  • Spec: apps/web/e2e/note-bars-motion.spec.ts:71, variants "rest to Style sheet, and back" and "rest to Attach menu, and back", at 6x CPU throttle.
  • First run on branch: 2 of 5 throttled-390 tests failed, longest main-thread task expected < 250 ms, received 257.7 ms (Style sheet) and one Attach menu run.
  • Repro, --repeat-each=10 for e2e/note-bars-motion.spec.ts:71, throttled-390, one worker, run one after the other on the same VM:
    • branch 9a3d38586: 5 of 20 failed, longest task 257 to 361 ms;
    • dev 796d80cba: 3 of 20 failed, longest task about 272 ms.

Verdict: fails on branch and on dev, so pre-existing. It is a timing gate on a shared VM with other lanes running, and it is not a clean signal for #861. This issue is a stability fix: make the gate measure the page without host contention (or run it alone), and keep the 250 ms limit unless kayg says otherwise. Perf numbers for #861 typing are in #861 comments, not here.

Found by the full Playwright run of the #861 stack head `9a3d38586`, project `throttled-390` (run through a temporary untracked config that keeps only the throttled projects, so no dependency closure runs). - Spec: `apps/web/e2e/note-bars-motion.spec.ts:71`, variants "rest to Style sheet, and back" and "rest to Attach menu, and back", at 6x CPU throttle. - First run on branch: 2 of 5 throttled-390 tests failed, `longest main-thread task` expected < 250 ms, received 257.7 ms (Style sheet) and one Attach menu run. - Repro, `--repeat-each=10` for `e2e/note-bars-motion.spec.ts:71`, `throttled-390`, one worker, run one after the other on the same VM: - branch `9a3d38586`: 5 of 20 failed, longest task 257 to 361 ms; - dev `796d80cba`: 3 of 20 failed, longest task about 272 ms. Verdict: fails on branch and on dev, so pre-existing. It is a timing gate on a shared VM with other lanes running, and it is not a clean signal for #861. This issue is a stability fix: make the gate measure the page without host contention (or run it alone), and keep the 250 ms limit unless kayg says otherwise. Perf numbers for #861 typing are in #861 comments, not here.
Author
Owner

Full-suite lane, 14 Nov: throttled-390 note-bars-motion.spec.ts:71 failed on the first run of 4f0b58327 (run alone, not on a quiet host). Repeat x10 alone on dev-01: branch 20/20 pass, dev 796d80cba 2 of 18 fail. Same flakiness on dev, so not a regression.

Full-suite lane, 14 Nov: throttled-390 `note-bars-motion.spec.ts:71` failed on the first run of 4f0b58327 (run alone, not on a quiet host). Repeat x10 alone on dev-01: branch 20/20 pass, dev 796d80cba 2 of 18 fail. Same flakiness on dev, so not a regression.
Author
Owner

Stability lane (15 Nov), dev 42c219afd: measured; the product sits at the limit on x86, the gate is a wall-clock number

e2e/note-bars-motion.spec.ts:71, throttled-390 --no-deps, --workers=1, one slot job:

  • dev-01 (x86, load average ~23): 20 of 40 fail (there.longestMs 253 to 508 ms; Style sheet 172 to 508, Attach menu 160 to 410 in the logged runs); a quieter moment, 1 of 20 fails (260 ms).
  • dev-02 (aarch64): longest task 34 to 86 ms, 0 of 20 fail: the CPU throttle does not scale the task there, so that host cannot run this gate.
  • In a scratch copy I read the trace's thread time (tdur) next to the wall time (dur) of the longest task: on x86 they are equal (the throttler burns the time, it does not sleep), so using thread CPU time would not remove the host's noise.
    So the median (about 190 ms at 6x, 75 % of the 250 ms limit) is the page's own cost and the limit is crossed by whatever the host adds. A fix has to be product work (a smaller first task when the Style sheet or the Attach menu opens) or a calibrated gate, and I did not change either: the limit stays 250 ms as you asked, and this is a hot-path decision for you. Not fixed.
## Stability lane (15 Nov), dev `42c219afd`: measured; the product sits at the limit on x86, the gate is a wall-clock number `e2e/note-bars-motion.spec.ts:71`, `throttled-390 --no-deps`, `--workers=1`, one slot job: - dev-01 (x86, load average ~23): **20 of 40 fail** (`there.longestMs` 253 to 508 ms; Style sheet 172 to 508, Attach menu 160 to 410 in the logged runs); a quieter moment, 1 of 20 fails (260 ms). - dev-02 (aarch64): longest task **34 to 86 ms**, 0 of 20 fail: the CPU throttle does not scale the task there, so that host cannot run this gate. - In a scratch copy I read the trace's thread time (`tdur`) next to the wall time (`dur`) of the longest task: on x86 they are equal (the throttler burns the time, it does not sleep), so using thread CPU time would not remove the host's noise. So the median (about 190 ms at 6x, 75 % of the 250 ms limit) is the page's own cost and the limit is crossed by whatever the host adds. A fix has to be product work (a smaller first task when the Style sheet or the Attach menu opens) or a calibrated gate, and I did not change either: the limit stays 250 ms as you asked, and this is a hot-path decision for you. Not fixed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#1115
No description provided.