Repository navigation
fix(computer): the probe's P4 waits for the frame, and a reference driver click lands before the next input - #464
Merged
earakely-scale merged 3 commits intoNov 3, 2026
Conversation
The fixture saves a click to its state before Tk repaints the cell, so the one screenshot P4 took after the state showed the click could still be white. It now retakes the screenshot until the cell shows, within SETTLE_S, as it already waits for the state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er has replayed it xfwm4 holds a click on a window under its passive Button1 grab until it replays it to the app, while key events reach the focused app at once. Under load the replay came hundreds of milliseconds late, so keys sent right after a click reached the app before it (P6's chord and repeat checks failed) and the next clicks' presses carried an earlier click's position, which Tk read as double clicks (P4's 16 clicks). Input that lets go of a button now waits, up to 5 s, until the pointer state shows the button up, which happens only once the window manager has let the click through. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4 with the last pixel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-4630-reference-driver-probe-input-checks-p4-click-shows-in-the
branch
November 3, 2026 18:41
earakely-scale
added a commit
that referenced
this pull request
Nov 3, 2026
…nce driver's click lands first (#464) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FD-4630. Two of the conformance probe's input checks flaked on the reference driver: P4 ("a click in frame space hits its cell, and the next frame shows it") and P6 ("a chord selects all, and Backspace clears it"). This PR fixes both. It changes one check and the reference driver.
What changed
SETTLE_S, just as it already waits for the state.Probe.untiltakes an optional reader for this. The check is renamed "a click in frame space hits its cell, and a frame shows it".pointer_upeach wait, for up to 5 s, until the pointer state shows the button released. Only after that do they release modifiers and return.The P6 cause: xfwm4's grab lets keys overtake a click
xfwm4 4.18 holds a passive Button1 grab on client windows. On every click into a window, it takes the press under a synchronous grab, focuses and raises the window, and only then replays the press to the app with
XAllowEvents(ReplayPointer). Until it does, the press and the release queued behind it wait in the server. Keys don't wait: they go straight to the focused window. The driver used to return as soon as XTEST had queued the click, so under load the keys that followed reached Tk first.The harness traced the order of events in the fixture's name field. In every P6 failure, the keys arrived carrying
Button1Mask(the server still had the button down), and the click'sButtonPressarrived after them. In one repeat-check failure, the click came about 750 ms late, aftera b c dhad been typed. That late click landing on the field again made Tk read it as a double click, which selected the word, so the two Backspaces left''.The laptop sighting fits the same story. "Hello, Wörld! 東京 AC" means Control+/ selected all and moved the cursor to the end. The late click then cleared the selection and put the cursor between
bandC(index 19, where the probe clicks), so Backspace removed only theb.The two causes the issue suggested don't apply:
/was on its own keycode. The Unicode check's remaps used spare keycodes 222, 230 and 248 and left it alone.The same grab broke P4's "16 clicks sent at once all land" (9 or 10 of 16). Presses for different cells reached Tk with an earlier click's
x_root/y_root, 1–2 ms apart. Tk reads presses within 5 px and 500 ms as a double click, so<Double-Button-1>swallowed their<Button-1>. Since each click now waits for its own release, clicks no longer pile up behind the grab.Loop counts
Setup:
desktopcomputer, the integration tests' one-appnotescomputer (a Tkbootapp), and the chromium test bundle's computer, all composed through gate 3.fullthree times, as the integration test does. That's 17 rounds, or 51 probes, per computer and arch.Failed probes out of 51:
Other flakes from the Nov 3 Mac test
data/getfile race: that's a separate path, the knownBrowserMetricsrace inwebsite_browser_test. Left alone.Gate 3: rerun a failed input check before failing the build?
This is your decision; it isn't implemented here. The options:
failed.agent-env env buildagain.retriedentry with the failed checks.Recommendation: option 1, for now. Measured on main, failures were 1 in 102 first probes on an idle box and 13 in 102 under contention. With this PR they're 0 in 102 under the same contention. A rerun at this point would mainly mask regressions like this one. If flakes come back on real hosts, adopt option 2 with the first report kept.
Testing
All on two agent-environments-admin VMs (about $0.90, both terminated):
make unit-testat e25a1b2: 12,635 passed, 7 skipped and 2 failed. The two failures needunzip, which the VM lacks (test_chromium_app.py::…unpacks_the_archive…andrun_docker_container_test.py::…context_zip…); both fail the same way on main there. CI'sunitjob passed.StaleFramefake driver, whose first capture after a click is from before the click, passes atfull.pointer_upeach return only after it replays, and the click's Shift is released after that.StaleFramewhose frames never show the click fails P4, and the report names the last pixel.test_computer_conformance.py: 24 passed.tst/integration/computer/computer_env_test.py,computer_app_test.py,desktop_example_test.py,chromium_app_test.pyandwebsite_browser_test.py: 21 passed, 1 skipped (model_endpoint_configured).fullfor all six composed images on both arches, before and after the change.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge, with no outstanding findings.Summary
The PR waits for P4's frame to show the click and waits for button release before the reference driver returns.
Reviews (2) · Last reviewed commit: "test(computer): frames that never show a..." · Reviewed by Greptile