fix(computer-use): delete broken pre-install asset probe; trust the upstream installer — salvage #50855 - #51001
Merged
Merged
Conversation
…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.
Contributor
🔎 Lint report:
|
| 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.
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 |
Closed
4 tasks
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
hermes computer-use installrefused 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()queriedhttps://api.github.com/repos/trycua/cua/releases/latest. Ontrycua/cua:/releases/latestexplicitly skips prereleases.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.shalready resolves the right tag viaCUA_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:install.shdirectly: has the baked tag, errors clean on missing-arch.cua_driver_update_check()shellscua-driver check-update --jsonagainst the installed binary (same source the installer uses).Changes
hermes_cli/tools_config.py— delete_check_cua_driver_asset_for_archand its two call sites; replace with a rationale comment.tests/hermes_cli/test_install_cua_driver.py— drop the obsolete probe tests; addTestArchProbeRemoval(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
test_install_cua_driver.py+ telemetry suitepy_compilecleanInfographic