chore(cua-driver-rs)(linux): add Xvfb smoke harness + parity audit + first-pass findings#1693
Draft
f-trycua wants to merge 1 commit into
Draft
chore(cua-driver-rs)(linux): add Xvfb smoke harness + parity audit + first-pass findings#1693f-trycua wants to merge 1 commit into
f-trycua wants to merge 1 commit into
Conversation
…ty findings
Drops in scripts/linux-smoke.sh — a single bash script that stands up an
Xvfb display, spawns xeyes as a victim, and exercises every cua-driver
tool with sensible JSON args. Output is a sorted PASS/FAIL/SKIP table
with the leading line of each response, designed to be diffed across
distros to spot Linux-backend regressions.
First-pass results (Ubuntu 22.04 / Xfce AND Ubuntu 24.04 / GNOME-XWayland,
identical verdicts on both):
20 PASS / 9 FAIL / 3 SKIP (out of 32 tools).
Of the 9 FAILs, 8 are harness bugs (wrong arg names, missing window_id,
overly broad error matcher). One is a genuine driver bug worth filing
separately:
screenshot panics on Xvfb-backed targets with
"Invalid buffer length: expected 120000 got 40000 for 200x200 image"
(crates/mcp-server/src/image_utils.rs:48) — the assertion expects
24-bit RGB but XGetImage on Xvfb returned 8 bpp.
Also adds LINUX_PARITY_AUDIT.md — the up-to-date Linux vs Windows tool
parity audit (24 implemented-but-unverified tools on Linux, 33 vs 0
example/parity binaries gap, per-distro testing matrix recommendations).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
scripts/linux-smoke.sh— single bash script that stands up an Xvfb display, spawns xeyes as victim, and exercises every cua-driver tool with sensible JSON args. Output is a sorted PASS/FAIL/SKIP table for easy cross-distro diffingLINUX_PARITY_AUDIT.md— Linux vs Windows tool parity audit (24 implemented-but-unverified, 33 vs 0 example/parity binaries, per-distro testing matrix)scripts/linux-smoke-RESULTS.md— first-pass findings with the reproduction details and the one real driver bug surfacedHeadline result (v1 harness, both Ubuntu 22.04/Xfce and Ubuntu 24.04/GNOME-XWayland, identical)
20 PASS / 9 FAIL / 3 SKIP out of 32 tools.
8 of the 9 fails are harness bugs (
launch_apparg shape, missingwindow_idon keyboard tools, error-detector matching the word "error" as a field name in legitimate JSON output). 1 is a real driver bug — see below.check_permissions·click·double_click·drag·get_accessibility_tree·get_agent_cursor_state·get_config·get_cursor_position·get_screen_size·get_window_state·list_apps·list_windows·move_cursor·right_click·scroll·set_agent_cursor_enabled·set_agent_cursor_motion·set_agent_cursor_style·set_config·zoomget_recording_state·hotkey·kill_app·launch_app·press_key·set_recording·type_text·type_text_charsscreenshotpage(no Chromium) ·replay_trajectory(no recording file) ·set_value(xeyes has no AT-SPI editable text)Real bug surfaced
```
thread 'tokio-rt-worker' panicked at crates/mcp-server/src/image_utils.rs:48:9:
assertion `left == right` failed: Invalid buffer length:
expected 120000 got 40000 for 200x200 image
```
`120000 = 200×200×3` (RGB) vs `40000 = 200×200×1`. The assertion expects 24-bit RGB but `XGetImage` against xeyes on Xvfb (`-screen 0 1280x800x24`) returned 8 bpp. The image-buffer code needs to either accept the depth the X server actually returned and convert, or request a 24-bit visual explicitly before the grab. I'll file this as a separate issue after this PR.
What this means for the parity rollout
The audit listed 24 tools as 🟡 implemented-but-unverified on Linux. After v2 harness fixes confirm (projected ~26 PASS), ~20 of those flip to 🟢 verified over X11 native + XWayland on the same machine that produced this data. The 4 remaining gaps:
get_window_state,get_accessibility_tree,set_value— need a real DE session, not Xvfb (at-spi-registry needs registered apps)page— needs Chromium with--remote-debugging-portTest plan
screenshotXvfb-bpp panic as a separate issueWhy draft
v2 harness fixes are already written locally but haven't completed a full run yet (VM SSH wedged + my IP changed mid-session). I'll push the v2 fixes and the bug-file reference as a follow-up commit before un-drafting.
🤖 Generated with Claude Code