Skip to content

Size the cursor test's settle on what wayvnc actually does - #548

Open
sibson wants to merge 1 commit into
mainfrom
claude/suspicious-kare-492b08
Open

sibson wants to merge 1 commit into
mainfrom
claude/suspicious-kare-492b08

Conversation

@sibson

@sibson sibson commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Cuts the cursor tests' unexplained pause 0.5 to a measured CURSOR_SETTLE = 0.2, saving about 7s of the fleet job.

The pause exists for wayvnc alone, which the spec table listed as never painting: it composites the pointer on a move and removes it 60–80ms later. Pairs were dirty 20/20 at 0.06s and clean 0/20 from 0.08s. Every other fleet server was clean with no pause at all. The pause is not a detection window for a server that paints: a painted pointer shows up within the capture's own round trip.

Measured locally against the Docker fleet, which CI doesn't do; specs/cursor.md has the tables. The two 0.5s pauses in utils.py also run on the Windows os-servers, which weren't measured, so they're unchanged.

🤖 Generated with Claude Code

`at_each()` carries a `pause 0.5` before every capture that nothing in the
repo explains; it arrived with the helper in #508. Measured on the fleet,
the pause serves one server: wayvnc composites the pointer on the move and
takes it back out again between 60ms and 80ms later. Near/far pairs over one
connection, as `at_each()` takes them, carried a pointer 12/20 with the
pause omitted and 20/20 at 0.05 and 0.06, then 0/20 at every pause from 0.08
to 0.5. Separate connections per capture gave the same edge. Every other
fleet server was clean 10/10 with no pause at all.

What the pause looks like it must be for -- the detection window for a
server that starts painting again -- it is not. With x11vnc and
libvncserver-example forced back into painting by `--cursor server`, the
first full capture after the move already carried the pointer over 30 moves
each, at a median 16ms and 61ms, which is the capture round trip itself
(20ms and 59ms with nothing moving); the CLI comparison caught the painted
pointer 15/15 at every pause tried, including none.

So CURSOR_SETTLE is 0.2, a little over twice what wayvnc needs, with room
for slower hardware. The cursor module drops from 23.5s to 16.1s locally,
green over five consecutive runs. `CursorShapeOffered` and
`CursorPositionIndependent` keep their 0.5s: both also run against the
Windows servers of the os-servers workflow, which none of this measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.82%. Comparing base (0ea136a) to head (db55708).
⚠️ Report is 1 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #548   +/-   ##
=======================================
  Coverage   90.82%   90.82%           
=======================================
  Files          36       36           
  Lines        3509     3509           
  Branches      429      429           
=======================================
  Hits         3187     3187           
  Misses        239      239           
  Partials       83       83           
Flag Coverage Δ
fleet 77.22% <ø> (ø)
unit 86.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants