fix(next perf gate): an unlit window skips the timed tab switch and new workspace counts
Summary
The perf gate's tabs and new_workspaces scenarios fail debug.tab_switch timed 0 of 40 switches and debug.new_workspace timed 0 of 50 new workspace rows on the PR scheme lane (#23308 run 39584287796, "Perf counter gate"). That runner's window draws no frames (the frame probe saw 8 in 1 s, refresh_ms 0), and the app times each switch and row against the display link: SwitchFrameTimer records nothing without a refresh interval. Every other frame-dependent check is gated by frames_ok and takes the probe's skip there; these two counts were not (f06e1d7 for tabs, 5809c6c / #21825 for new workspaces). Both were already red on 10-19; the gate did not really run until f66b984e5217 stopped a launch-time red from skipping it.
Gate.timed_count makes "no rows on a window that draws no frames" that same skip. Nothing else changes:
- With
--frames required(the GUI host), no frames is still a failure. - A lit window that times fewer rows than it should still fails.
- No budget changes.
Testing
python3 tests/test_cmux_next_perf_gate_unlit.py (new, registered in linux-guard) drives both scenarios with a fake app whose timers record nothing. On huge-blue:
- Red commit c2667e665594: 2 of 3 fail. With
--frames auto, the failures were[tabs] debug.tab_switch timed 0 of 40 switchesand[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rowsrather than the skip. - Fix commit 76aa0d2affce: 3 of 3 pass.
Observed / Not run
- Observed: the red/green unit runs above, and the two failures with
frames_probe8 frames in #23308's perf-gate.json. - Not run: the gate against a real app. CI's scheme lane runs it.
Changelog
none
Agent session: cosmic-gray
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Makes the perf gate skip debug.tab_switch and debug.new_workspace timed counts when the window draws no frames, instead of failing with "timed 0 of N". Those two scenarios previously failed on the unlit CI runner while every other frame-dependent check already took the frame probe's skip.
- Adds
Gate.timed_countto treat no rows on a window that draws no frames as the skip;--frames requiredstill fails on no frames, and a lit window that times fewer counts still fails. - Adds
tests/test_cmux_next_perf_gate_unlit.pycovering the skip, the required-frames failure, and the lit-window failure, and registers it in thelinux-guardlane.