Skip to content

fix(computer-use): delete broken pre-install asset probe; trust the upstream installer — salvage #50855 - #51001

Merged
teknium1 merged 2 commits into
mainfrom
salvage/cua-probe-delete-50855
Jun 22, 2026
Merged

fix(computer-use): delete broken pre-install asset probe; trust the upstream installer — salvage #50855#51001
teknium1 merged 2 commits into
mainfrom
salvage/cua-probe-delete-50855

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

hermes computer-use install refused to install on Linux, Windows, and Intel macOS because the pre-install asset probe queried the wrong GitHub endpoint and duplicated tag-resolution the upstream installer already does correctly. Fix: delete the probe and trust the upstream installer.

Salvage of #50855 (@f-trycua) onto current main — his commit preserved, plus one follow-up from us. This supersedes the install-probe portion of #50552 (where we patched the probe instead of removing it); deleting it is the cleaner call per "extend, don't duplicate."

Root cause

_check_cua_driver_asset_for_arch() queried https://api.github.com/repos/trycua/cua/releases/latest. On trycua/cua:

  • cua-driver-rs releases (the binary the installer fetches) are marked prerelease on every cut, and /releases/latest explicitly skips prereleases.
  • The Python package releases (cua-agent, etc.) are non-prerelease and become "latest" instead — agent-v0.8.3, zero binary assets.

The probe saw zero assets, reported "no asset for this arch", and skipped the install on every non-arm64 host — even though cua-driver-rs-v0.6.0 (further down the release list) ships 19 binary assets covering all platforms.

Why delete rather than fix the endpoint

The upstream install.sh already resolves the right tag via CUA_DRIVER_RS_BAKED_VERSION (auto-baked by CD on every release, with an API fallback). Mirroring that in Python is drift-prone duplication. Two paths get the same outcome without the probe:

  1. Fresh installinstall.sh directly: has the baked tag, errors clean on missing-arch.
  2. Upgradecua_driver_update_check() shells cua-driver check-update --json against the installed binary (same source the installer uses).

Changes

  • hermes_cli/tools_config.py — delete _check_cua_driver_asset_for_arch and its two call sites; replace with a rationale comment.
  • tests/hermes_cli/test_install_cua_driver.py — drop the obsolete probe tests; add TestArchProbeRemoval (function stays deleted, fresh-install + upgrade paths don't hit the GitHub API from Python).

Follow-up (ours)

f-trycua's PR predated the cross-platform PR (#50552) and its test file reintroduced two stale tests asserting Linux is unsupported (test_*_non_macos_*). Linux/Windows are supported now, so install proceeds there. Restored main's cross-platform-correct versions (test_*_on_unsupported_platform_* using FreeBSD as the genuine unsupported case).

Validation

Result
test_install_cua_driver.py + telemetry suite 19 pass, 0 fail
Live Linux: fresh install reaches the upstream installer (probe gone) confirmed, no GitHub API call from Python
Telemetry env injection (#50842) still applied confirmed (env var = 0, helper intact)
Touched files py_compile clean

Infographic

delete-the-broken-probe

f-trycua and others added 2 commits June 22, 2026 12:31
…pstream installer

`hermes computer-use install` refused to install on Linux, Windows, and
macOS x86_64 because the pre-install asset probe was hitting the wrong
GitHub endpoint AND duplicating tag-resolution logic the upstream
installer already does correctly.

`_check_cua_driver_asset_for_arch()` queried
`https://api.github.com/repos/trycua/cua/releases/latest`. On trycua/cua:

- cua-driver-rs releases (the binary the installer fetches) are marked
  **prerelease** on every cut. GitHub's `/releases/latest` explicitly
  skips prereleases.
- The Python package releases (`cua-agent`, `cua-computer`, `cua-train`)
  are non-prerelease and end up as the "latest" instead.

Live API check today:

  $ curl -sf https://api.github.com/repos/trycua/cua/releases/latest \
      | jq '{tag:.tag_name, asset_count: (.assets|length)}'
  { "tag": "agent-v0.8.3", "asset_count": 0 }

The probe sees zero assets, prints "Latest CUA release has no Linux
x86_64 asset", and skips install on every Linux / Windows / macOS-x86_64
host — even though the cua-driver-rs-v0.6.0 release ships 19 binary
assets covering all those platforms.

Filtering `/releases?per_page=N` for the `cua-driver-rs-v*` prefix
fixes the bug, but it duplicates tag-resolution logic the upstream
`_install-rust.sh` already does correctly via `CUA_DRIVER_RS_BAKED_VERSION`
(auto-baked by CD on every release, with a `/releases?per_page=N` API
fallback for dev checkouts). The right answer is to trust that
contract instead of mirroring it in Python where it can drift.

Two paths get the same outcome without the probe:

1. **Fresh install**: run `install.sh` directly. It has the baked
   release tag, fetches the right asset, and errors with a clear
   message on missing-arch downloads. No preflight needed.
2. **Upgrade path**: `cua_driver_update_check()` (separately added)
   shells `cua-driver check-update --json` against the installed
   binary, which returns the canonical update answer from the same
   source the installer uses.

- `hermes_cli/tools_config.py`: delete `_check_cua_driver_asset_for_arch`
  and its two call sites in `install_cua_driver`. Replace with an
  inline comment near the top of the module explaining the rationale.
- `tests/hermes_cli/test_install_cua_driver.py`: drop the
  `TestCheckCuaDriverAssetForArch` block. Add `TestArchProbeRemoval`
  with three regressions:

  - `test_probe_function_is_gone` — asserts the deleted helpers stay
    deleted.
  - `test_fresh_install_does_not_call_github_api` — asserts the
    install path doesn't hit GitHub directly from Python anymore.
  - `test_upgrade_with_binary_does_not_call_github_api_directly` —
    same for the upgrade path.

All 9 `test_install_cua_driver` tests pass.

Reported by @teknium1 while testing on a headed Ubuntu host.
f-trycua's #50855 test file predated the cross-platform PR (#50552) and
reintroduced two stale tests asserting Linux is unsupported
(test_*_non_macos_*, patching platform.system="Linux" and expecting a
no-op/warn). Linux + Windows are supported now, so install proceeds on
those platforms. Restore main's cross-platform-correct versions:
test_*_on_unsupported_platform_* using FreeBSD as the genuinely
unsupported case.
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: salvage/cua-probe-delete-50855 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11448 on HEAD, 11446 on base (🆕 +2)

🆕 New issues (2):

Rule Count
unresolved-attribute 2
First entries
run_agent.py:2984: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`

✅ Fixed issues (1):

Rule Count
invalid-assignment 1
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`

Unchanged: 6029 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard labels Jun 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Salvage of #50855 (@f-trycua) onto current main, authorship preserved. Related: #50855 (original), and supersedes the install-probe portion of #50552 (deleting the probe rather than patching its endpoint). The upstream installer already resolves the right tag via the baked CUA_DRIVER_RS_BAKED_VERSION contract.

@teknium1
teknium1 merged commit 0f741ce into main Jun 22, 2026
35 checks passed
@teknium1
teknium1 deleted the salvage/cua-probe-delete-50855 branch June 22, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants