Skip to content

feat(computer): the probe's fixture records the same effects on macOS as on Linux - #483

Merged
earakely-scale merged 4 commits into
mainfrom
edgararakelyan/fd-5184-b4-a-conformance-fixture-that-knows-the-platform-so-a-macos
Nov 4, 2026
Merged

earakely-scale merged 4 commits into
mainfrom
edgararakelyan/fd-5184-b4-a-conformance-fixture-that-knows-the-platform-so-a-macos

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

FD-5184. The conformance probe's Fixture Desk was written for X11's Tk. On macOS, cua-driver failed four full-probe checks because of how Aqua's Tk reports keys and the wheel, not because of the driver. The fixture now records the same effects under X11, Aqua and Windows. The probe's checks are unchanged.

What changes

In computer/conformance/fixture.py:

  • Keysyms: Aqua's Tk names , and space by their character. The fixture records them under X11's names, comma and space.
  • Select-all: Tk binds Ctrl+/ to select-all on X11 only; Aqua's is Cmd+A. The fixture binds Ctrl+/ itself.
  • The wheel:
    • Tk 8.6 on X11 reports buttons 4 and 5, as before.
    • Aqua, Windows and Tk 9 report <MouseWheel>. It is counted by its delta: 120 a notch where Tk scales it, else 1 a unit.
    • Tk 9 reports a scroll posted in pixels, which is how a macOS driver posts it, as <TouchpadScroll>. It is counted by the lines it moves, 10 px a line, because macOS coalesces quick scrolls into one event.
  • Windowing system: layout.json records which one the fixture ran under.

How it was tested

  • macOS, cua-driver. Cua's agentenv-cua plugin at the head of feat(agentenv-cua): AgentEnv plugin for macOS VMs (lume provider, cua-driver macOS driver) trycua/cua#6405, on a bench image built with its recipe from Cua's base, ghcr.io/trycua/macos:26-20261021-fca2193 (macOS 26.5.2, Tk 9 in the driver's Python). It ran on an EC2 mac2-m2.metal, with the full probe through a loopback relay.
    • Released protocol (0.1.449): 44 passed and 4 failed. The failures were typed key events, the select-all chord, a repeated key, and wheel directions.
    • This branch: 47 passed, 1 failed, 1 not applicable. Every wheel and trackpad check passes, in five runs on three boots.
    • The one steady failure left is the driver's. A raw log of every Tk event showed each typed character's key-down with the right key, but its key-up with keycode 0, the A key. So an app sees "a" released after each character.
      • Keys cua-driver presses (Backspace, Return, Tab, Control) release correctly, so the check keeps failing it.
    • The drag check also failed on 3 of 7 first probes after a boot, its start 3 to 9 px off. It never failed on a later probe.
      • The raw log shows the pointer entering the pad at the drag's start, (50, 50). The driver's mouse-down then arrived 0.5 s later at (56, 55), already along the path. Tk reports each event's own coordinates, so this is the driver's timing, not the platform.
      • One of those runs also missed a first click on the button.
  • Linux, on an EC2 VM (c8i.4xlarge, Ubuntu 24.04, Tk 8.6):
    • ruff check passed;
    • the protocol's conformance unit tests: 55 passed, including the new tests of the wheel's and the trackpad's step counts, at the deltas macOS gave;
    • integration: the reference driver's image passing the probe at full, and cua-driver's gate 3 on the desktop computer: 2 passed.

🤖 Generated with Claude Code

earakely-scale and others added 3 commits November 3, 2026 23:36
…1, macOS and Windows

The Fixture Desk was written for X11's Tk, so a macOS driver failed four checks for the platform, not the driver. It
now records Aqua's "," and " " keysyms under X11's names, binds Ctrl+/ to select-all itself (Tk does on X11 alone;
Aqua's is Cmd+A), and counts <MouseWheel> events by their delta where Tk reports the wheel so (Aqua, Windows, Tk 9),
X11's buttons 4 and 5 where Tk 8.6 does. layout.json's state says which windowing system it ran under.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Python may have none

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ixels

Tk 9 reports a scroll posted in pixels, as a macOS driver posts it, as <TouchpadScroll>, not <MouseWheel>, so the
Fixture Desk's wheel saw none of cua-driver's scrolls on macOS. It now counts those by the lines they move, 10 pixels a
line, since macOS coalesces quick scrolls into one event.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 4, 2026 08:08
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale merged commit 2dd1dc2 into main Nov 4, 2026
27 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/fd-5184-b4-a-conformance-fixture-that-knows-the-platform-so-a-macos branch November 4, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant