ci(cua-driver): add distro-compat smoke-test workflow (CUA-606) - #1960
Conversation
…e deps Add .github/workflows/ci-distro-compat-cua-driver.yml from PR #1959 (f/cua-599-nixos-cua-driver-test-suite-has-blind-spots-for-real-distro) with a fix for the X11 runtime dependency issue. The workflow smoke-tests the released cua-driver-rs binary across 5 distros (debian:12, ubuntu:22.04, ubuntu:24.04, rockylinux:9, fedora:41) to catch glibc ABI floor regressions. **Fix from original PR:** The pkg_install matrix entries now include the required X11 runtime libs (libx11-6 libxi6 libxtst6 libxext6 on Debian/Ubuntu; libX11 libXi libXtst libXext on Rocky/Fedora). Without these, the cua-driver binary fails with exit 127 (dynamic linker cannot resolve libXi.so.6 etc.) before main() even runs -- which the smoke-test correctly interprets as an ABI failure. The cua-driver-rs-v0.5.8 release (published 2026-06-21) provides the binary assets this workflow downloads. The binary URL pattern matches: https://github.com/trycua/cua/releases/download/cua-driver-rs-v{VERSION}/ cua-driver-rs-{VERSION}-linux-x86_64-binary.tar.gz Fixes: CUA-606 Related: CUA-599, PR #1959
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
📝 WalkthroughWalkthroughA new GitHub Actions workflow ( ChangesDistro Compatibility Smoke-Test Workflow
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-distro-compat-cua-driver.yml:
- Around line 223-229: The exit code validation in the smoke gate test is
incomplete. Currently, the condition starting with `if [[ $EXIT_CODE -eq 127 ||
$EXIT_CODE -eq 126 ]]` only rejects those two specific exit codes, but allows
other non-zero exits (like 132, 134, 139 from signal terminations) to pass as
success. You need to add an additional validation after the existing check to
ensure that only exit codes 0 or 1 are treated as success, explicitly rejecting
all other non-zero exit codes. This will align the code behavior with the stated
intent in the comment that follows.
- Around line 82-84: The GitHub API query for the cua-driver-rs release version
only retrieves the first page of releases (30 per page by default), but with 528
total releases in the repository, cua-driver-rs-v* tags could exist on later
pages. Add pagination to the gh api call by including the --paginate flag to
retrieve all releases across multiple pages before filtering with jq. This
ensures the VERSION variable gets populated correctly even when matching tags
are beyond the first page, preventing the workflow from silently skipping the
matrix job.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6a574403-1036-4123-a42f-d8413fe04d17
📒 Files selected for processing (1)
.github/workflows/ci-distro-compat-cua-driver.yml
| VERSION=$(gh api repos/trycua/cua/releases \ | ||
| --jq '[.[] | select(.tag_name | startswith("cua-driver-rs-v"))] | first | .tag_name | ltrimstr("cua-driver-rs-v")' \ | ||
| 2>/dev/null || echo "") |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd /tmp && find . -type f -name "ci-distro-compat-cua-driver.yml" 2>/dev/null | head -5Repository: trycua/cua
Length of output: 36
🏁 Script executed:
git ls-files | grep -i "ci-distro-compat-cua-driver.yml"Repository: trycua/cua
Length of output: 104
🏁 Script executed:
cat -n .github/workflows/ci-distro-compat-cua-driver.yml | head -100Repository: trycua/cua
Length of output: 5197
🏁 Script executed:
cat -n .github/workflows/ci-distro-compat-cua-driver.yml | sed -n '98,150p'Repository: trycua/cua
Length of output: 3310
🏁 Script executed:
cat -n .github/workflows/ci-distro-compat-cua-driver.yml | tail -80Repository: trycua/cua
Length of output: 4427
🏁 Script executed:
# Check GitHub CLI releases for trycua/cua to understand release distribution
gh api repos/trycua/cua/releases --jq '.[] | {tag_name, draft}' 2>/dev/null | head -40Repository: trycua/cua
Length of output: 1545
🏁 Script executed:
# Count total releases to understand pagination risk
gh api repos/trycua/cua/releases --jq 'length' 2>/dev/nullRepository: trycua/cua
Length of output: 57
🏁 Script executed:
# Check if there are more releases beyond page 1 (need to use --paginate to see)
gh api --paginate repos/trycua/cua/releases --jq '.[] | .tag_name' 2>/dev/null | wc -lRepository: trycua/cua
Length of output: 58
🏁 Script executed:
# Check what the current query actually returns (without pagination)
gh api repos/trycua/cua/releases --jq '[.[] | select(.tag_name | startswith("cua-driver-rs-v"))] | first | .tag_name | ltrimstr("cua-driver-rs-v")' 2>/dev/nullRepository: trycua/cua
Length of output: 60
🏁 Script executed:
# Check if the proposed fix works correctly and would catch more releases
gh api --paginate repos/trycua/cua/releases --jq '.[] | select((.draft | not) and (.tag_name | startswith("cua-driver-rs-v"))) | .tag_name' 2>/dev/null | head -5Repository: trycua/cua
Length of output: 159
🏁 Script executed:
# Test the proposed fix
VERSION=$(gh api --paginate repos/trycua/cua/releases \
--jq '.[] | select((.draft | not) and (.tag_name | startswith("cua-driver-rs-v"))) | .tag_name' \
2>/dev/null | sed -n 's/^cua-driver-rs-v//p' | head -n1)
VERSION="${VERSION:-}"
echo "Proposed fix result: $VERSION"Repository: trycua/cua
Length of output: 81
🏁 Script executed:
# Verify the proposed fix matches current code output
CURRENT=$(gh api repos/trycua/cua/releases \
--jq '[.[] | select(.tag_name | startswith("cua-driver-rs-v"))] | first | .tag_name | ltrimstr("cua-driver-rs-v")' \
2>/dev/null || echo "")
echo "Current code result: $CURRENT"
PROPOSED=$(gh api --paginate repos/trycua/cua/releases \
--jq '.[] | select((.draft | not) and (.tag_name | startswith("cua-driver-rs-v"))) | .tag_name' \
2>/dev/null | sed -n 's/^cua-driver-rs-v//p' | head -n1)
PROPOSED="${PROPOSED:-}"
echo "Proposed fix result: $PROPOSED"
if [[ "$CURRENT" == "$PROPOSED" ]]; then
echo "✓ Results match"
else
echo "✗ Results differ"
fiRepository: trycua/cua
Length of output: 124
Release auto-detection can silently fail when matching tags are off page 1.
Line 82 queries only the first /releases page. With 528 total releases in this repo (default 30 per page), future release patterns could push all cua-driver-rs-v* tags beyond page 1, causing VERSION to become empty. The workflow then reports false-green by skipping the matrix (jobs are conditional on version != 'none' and continue-on-error: true masks the silent failure).
Proposed fix
- VERSION=$(gh api repos/trycua/cua/releases \
- --jq '[.[] | select(.tag_name | startswith("cua-driver-rs-v"))] | first | .tag_name | ltrimstr("cua-driver-rs-v")' \
- 2>/dev/null || echo "")
+ VERSION=$(gh api --paginate repos/trycua/cua/releases \
+ --jq '.[] | select((.draft | not) and (.tag_name | startswith("cua-driver-rs-v"))) | .tag_name' \
+ 2>/dev/null | sed -n 's/^cua-driver-rs-v//p' | head -n1)
+ VERSION="${VERSION:-}"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| VERSION=$(gh api repos/trycua/cua/releases \ | |
| --jq '[.[] | select(.tag_name | startswith("cua-driver-rs-v"))] | first | .tag_name | ltrimstr("cua-driver-rs-v")' \ | |
| 2>/dev/null || echo "") | |
| VERSION=$(gh api --paginate repos/trycua/cua/releases \ | |
| --jq '.[] | select((.draft | not) and (.tag_name | startswith("cua-driver-rs-v"))) | .tag_name' \ | |
| 2>/dev/null | sed -n 's/^cua-driver-rs-v//p' | head -n1) | |
| VERSION="${VERSION:-}" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci-distro-compat-cua-driver.yml around lines 82 - 84, The
GitHub API query for the cua-driver-rs release version only retrieves the first
page of releases (30 per page by default), but with 528 total releases in the
repository, cua-driver-rs-v* tags could exist on later pages. Add pagination to
the gh api call by including the --paginate flag to retrieve all releases across
multiple pages before filtering with jq. This ensures the VERSION variable gets
populated correctly even when matching tags are beyond the first page,
preventing the workflow from silently skipping the matrix job.
| if [[ $EXIT_CODE -eq 127 || $EXIT_CODE -eq 126 ]]; then | ||
| echo "ERROR: cua-driver failed to execute (exit $EXIT_CODE) — likely glibc ABI mismatch" | ||
| exit 1 | ||
| fi | ||
| # Treat 0 (all capabilities present) or 1 (capabilities missing but | ||
| # doctor ran) as success — both mean the binary loaded correctly. | ||
| echo "PASS: doctor ran without ABI error" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd .github/workflows && cat -n ci-distro-compat-cua-driver.yml | sed -n '210,240p'Repository: trycua/cua
Length of output: 1815
🏁 Script executed:
# Check if there are other test/verification steps in the workflow
rg "EXIT_CODE" .github/workflows/ci-distro-compat-cua-driver.yml
# Check if there are other doctor-related checks elsewhere
rg -i "doctor" .github/workflows/ -A 2 -B 2 | head -80Repository: trycua/cua
Length of output: 4726
doctor smoke gate accepts non-zero exits outside 126/127 as success, weakening ABI/runtime validation.
The current check on line 223 only rejects exit codes 126 and 127. This allows crash exits like 132 (SIGILL), 134 (SIGABRT), and 139 (SIGSEGV) to pass, even though the test intent (lines 210–216) is to verify the binary loads and exits with a parseable status—not a crash. The comment on lines 227–228 claims success for exits 0 or 1 only, but the code never validates EXIT_CODE is actually one of those values.
Proposed fix
# Exit codes that indicate glibc/ABI failure (command not found / bad ELF):
if [[ $EXIT_CODE -eq 127 || $EXIT_CODE -eq 126 ]]; then
echo "ERROR: cua-driver failed to execute (exit $EXIT_CODE) — likely glibc ABI mismatch"
exit 1
fi
- # Treat 0 (all capabilities present) or 1 (capabilities missing but
- # doctor ran) as success — both mean the binary loaded correctly.
+ # Treat only 0 (all capabilities present) or 1 (capabilities missing
+ # but doctor ran) as success.
+ if [[ $EXIT_CODE -ne 0 && $EXIT_CODE -ne 1 ]]; then
+ echo "ERROR: cua-driver doctor exited unexpectedly ($EXIT_CODE)"
+ exit 1
+ fi
echo "PASS: doctor ran without ABI error"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if [[ $EXIT_CODE -eq 127 || $EXIT_CODE -eq 126 ]]; then | |
| echo "ERROR: cua-driver failed to execute (exit $EXIT_CODE) — likely glibc ABI mismatch" | |
| exit 1 | |
| fi | |
| # Treat 0 (all capabilities present) or 1 (capabilities missing but | |
| # doctor ran) as success — both mean the binary loaded correctly. | |
| echo "PASS: doctor ran without ABI error" | |
| if [[ $EXIT_CODE -eq 127 || $EXIT_CODE -eq 126 ]]; then | |
| echo "ERROR: cua-driver failed to execute (exit $EXIT_CODE) — likely glibc ABI mismatch" | |
| exit 1 | |
| fi | |
| # Treat only 0 (all capabilities present) or 1 (capabilities missing | |
| # but doctor ran) as success. | |
| if [[ $EXIT_CODE -ne 0 && $EXIT_CODE -ne 1 ]]; then | |
| echo "ERROR: cua-driver doctor exited unexpectedly ($EXIT_CODE)" | |
| exit 1 | |
| fi | |
| echo "PASS: doctor ran without ABI error" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci-distro-compat-cua-driver.yml around lines 223 - 229,
The exit code validation in the smoke gate test is incomplete. Currently, the
condition starting with `if [[ $EXIT_CODE -eq 127 || $EXIT_CODE -eq 126 ]]` only
rejects those two specific exit codes, but allows other non-zero exits (like
132, 134, 139 from signal terminations) to pass as success. You need to add an
additional validation after the existing check to ensure that only exit codes 0
or 1 are treated as success, explicitly rejecting all other non-zero exit codes.
This will align the code behavior with the stated intent in the comment that
follows.
Rocky Linux 9 ships curl-minimal in the base image which conflicts with the full curl package. Use --allowerasing to let dnf replace curl-minimal with the full curl package transparently.
CI Status Update✅ All 5 distros passing with
What was fixed: Added X11 runtime libraries ( Workflow run: https://github.com/trycua/cua/actions/runs/27893070447 |
…nifest typo - Add libwayland-client0 (deb) and libwayland-client (rpm) to pkg_install because the CD workflow links against libwayland-dev (native Wayland backend, added in #1910); without the runtime lib the dynamic linker fails on any distro that doesn't install it by default. - Fix typo: 'manifst' -> 'manifest' in doctor smoke-test comment. - Update comment block to mention Wayland alongside X11 deps.
✅ Review completeReview commit
Follow-up suggestions noted (arm64 matrix, continue-on-error gate, DEBIAN_FRONTEND). Ready for merge. |
🏔️ Hillclimb completeAll CI checks are green ✅ — no fixes were needed.
The new distro-compat smoke test workflow for cua-driver is passing on all target distributions. PR is ready to merge. |
cua-driver distro-compat CI — Release candidate workflow
Creates the distro-compat CI workflow for cua-driver with full X11 + Wayland runtime dependency support across 5 Linux distributions.
Distros
Key fixes
--allowerasingfor curl (conflicts with curl-minimal)Review changes (commit 41d213c)
libwayland-client0(deb) /libwayland-client(rpm) — cua-driver links against native Wayland backend (added in wayland support #1910); missing from minimal containers causes silent linker failuremanifst→manifestFollow-up (tracked in Linear comments)
continue-on-error: trueonce stable