Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix(cua-driver): install the last signed macOS release (#4150)
Francesco Bonaccifb7e9726d4ca
diff --git a/.github/release-state/cua-driver-rs-published-version b/.github/release-state/cua-driver-rs-published-versionindex b79f04f44d..a37255a85b 100644--- a/.github/release-state/cua-driver-rs-published-version+++ b/.github/release-state/cua-driver-rs-published-version@@ -1 +1 @@-0.28.3+0.28.2diff --git a/.github/release-state/cua-driver-rs-withdrawn-versions b/.github/release-state/cua-driver-rs-withdrawn-versionsnew file mode 100644index 0000000000..4185bb6b18--- /dev/null+++ b/.github/release-state/cua-driver-rs-withdrawn-versions@@ -0,0 +1,3 @@+# Cua Driver releases that must never be installed, baked, or certified.+# One exact x.y.z version per line; text after "#" is the reason.+0.28.3 # macOS CuaDriver.app published unsigned (notarization disabled); see #4109diff --git a/.github/scripts/tests/test_validate_release_versions.py b/.github/scripts/tests/test_validate_release_versions.pyindex c4985c06e2..e963a5c3a7 100644--- a/.github/scripts/tests/test_validate_release_versions.py+++ b/.github/scripts/tests/test_validate_release_versions.py@@ -182,3 +182,28 @@ def test_driver_validation_rejects_installer_version_ahead_of_source(tmp_path: Pwith pytest.raises(VersionError, match="ahead of source release"):validate(tmp_path, "driver")+++def test_withdrawn_release_can_never_be_baked(tmp_path: Path):+ copy_release_sources(tmp_path)+ published = (+ tmp_path / ".github/release-state/cua-driver-rs-published-version"+ ).read_text().strip()+ withdrawn = tmp_path / ".github/release-state/cua-driver-rs-withdrawn-versions"+ validate(tmp_path, "driver")+ withdrawn.write_text(f"{published} # unsigned macOS app\n", encoding="utf-8")+ with pytest.raises(VersionError, match=rf"withdrawn release {re.escape(published)}: unsigned macOS app"):+ validate(tmp_path, "driver")+++def test_checked_in_withdrawn_versions_are_exact_and_explained():+ path = REPO_ROOT / ".github/release-state/cua-driver-rs-withdrawn-versions"+ entries = [+ line for line in path.read_text(encoding="utf-8").splitlines()+ if line.strip() and not line.lstrip().startswith("#")+ ]+ assert entries+ for line in entries:+ version, _, reason = line.partition("#")+ assert re.fullmatch(r"[0-9]+\.[0-9]+\.[0-9]+", version.strip())+ assert reason.strip(), f"withdrawn {version.strip()} needs a reason"diff --git a/.github/scripts/validate_release_versions.py b/.github/scripts/validate_release_versions.pyindex 5e9f363ac4..c6dc6b049d 100644--- a/.github/scripts/validate_release_versions.py+++ b/.github/scripts/validate_release_versions.py@@ -59,6 +59,22 @@ def driver_installer_versions(root: Path) -> dict[str, str]:}+def driver_withdrawn_versions(root: Path) -> dict[str, str]:+ """Releases that must never be installed, baked, or certified."""+ path = root / ".github/release-state/cua-driver-rs-withdrawn-versions"+ if not path.exists():+ return {}+ withdrawn: dict[str, str] = {}+ for line in path.read_text(encoding="utf-8").splitlines():+ version, _, reason = line.partition("#")+ version = version.strip()+ if not version:+ continue+ stable_version_tuple(version)+ withdrawn[version] = reason.strip() or "withdrawn"+ return withdrawn++def driver_versions(root: Path) -> tuple[str, dict[str, str]]:base = root / "libs/cua-driver"docs = root / "docs/content/docs/reference/cua-driver"@@ -178,6 +194,12 @@ def validate(root: Path, product: str) -> None:installers = driver_installer_versions(root)installer_version = next(iter(installers.values()))require_equal("Cua Driver baked installers", installer_version, installers)+ withdrawn = driver_withdrawn_versions(root)+ if installer_version in withdrawn:+ raise VersionError(+ f"Cua Driver baked installers advertise withdrawn release {installer_version}: "+ f"{withdrawn[installer_version]}"+ )if stable_version_tuple(installer_version) > stable_version_tuple(expected):raise VersionError(f"Cua Driver baked installers advertise {installer_version}, "diff --git a/.github/workflows/ci-cua-driver-installer-compat.yml b/.github/workflows/ci-cua-driver-installer-compat.ymlindex e1b4ff2f5d..e9b028b0ae 100644--- a/.github/workflows/ci-cua-driver-installer-compat.yml+++ b/.github/workflows/ci-cua-driver-installer-compat.yml@@ -41,13 +41,21 @@ jobs:"repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/files?per_page=100" \--jq '.[].filename')if ! grep -Eq \- '^(\.github/scripts/verify_cua_driver_release_archives\.py|\.github/scripts/tests/test_verify_cua_driver_release_archives\.py|\.github/workflows/(cd-rust-cua-driver|ci-cua-driver-installer-compat)\.yml|libs/cua-driver/scripts/(_install-common|_install-rust|install)\.sh|libs/cua-driver/scripts/install\.ps1|release-please-config\.json)$' \+ '^(\.github/release-state/cua-driver-rs-(published-version|withdrawn-versions)|\.github/scripts/verify_cua_driver_release_archives\.py|\.github/scripts/tests/test_verify_cua_driver_release_archives\.py|\.github/workflows/(cd-rust-cua-driver|ci-cua-driver-installer-compat)\.yml|libs/cua-driver/scripts/(_install-common|_install-rust|install)\.sh|libs/cua-driver/scripts/install\.ps1|release-please-config\.json)$' \<<< "$CHANGED_FILES"; thenSHOULD_RUN=falsefifiecho "should_run=$SHOULD_RUN" >> "$GITHUB_OUTPUT"+ - name: Read withdrawn versions+ if: steps.scope.outputs.should_run == 'true'+ uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4+ with:+ sparse-checkout: .github/release-state+ sparse-checkout-cone-mode: false+ persist-credentials: false+- name: Resolve released versionsid: versionsif: steps.scope.outputs.should_run == 'true'@@ -60,16 +68,21 @@ jobs:sed '/^$/d' |jq -Rsc 'split("\n") | map(select(length > 0)) | unique')else+ WITHDRAWN=$(sed -e 's/#.*//' -e 's/[[:space:]]//g' -e '/^$/d' \+ .github/release-state/cua-driver-rs-withdrawn-versions |+ jq -Rsc 'split("\n") | map(select(length > 0))')VERSIONS=$(gh api --paginate --slurp \"repos/$GITHUB_REPOSITORY/releases?per_page=100" |- jq -c '[+ jq -c --argjson withdrawn "$WITHDRAWN" '[.[][]| select(.draft == false)| .tag_name| select(startswith("cua-driver-rs-v"))| ltrimstr("cua-driver-rs-v")+ | select(. as $v | $withdrawn | index($v) | not)][0:2]')fi+ echo "Withdrawn versions skipped: $(sed -e 's/#.*//' -e '/^[[:space:]]*$/d' .github/release-state/cua-driver-rs-withdrawn-versions | tr -d ' ' | paste -sd, -)"if [[ "$(jq 'length' <<< "$VERSIONS")" -eq 0 ]]; thenecho "No published Cua Driver release was found" >&2diff --git a/libs/cua-driver/scripts/_install-rust.sh b/libs/cua-driver/scripts/_install-rust.shindex 5b1e3b2151..0ffbc79b75 100644--- a/libs/cua-driver/scripts/_install-rust.sh+++ b/libs/cua-driver/scripts/_install-rust.sh@@ -615,7 +615,7 @@ done# asset — see the recovery at the download step below.## ~~~ BAKED_VERSION: auto-updated after release publication — do not edit ~~~-CUA_DRIVER_RS_BAKED_VERSION="0.28.3" # published-installer-version+CUA_DRIVER_RS_BAKED_VERSION="0.28.2" # published-installer-version# ~~~ END_BAKED_VERSION ~~~# Run API requests with an optional token. Keep the header construction herediff --git a/libs/cua-driver/scripts/install.ps1 b/libs/cua-driver/scripts/install.ps1index 57bc82da8a..34ca1450ea 100644--- a/libs/cua-driver/scripts/install.ps1+++ b/libs/cua-driver/scripts/install.ps1@@ -123,7 +123,7 @@ $ThemeBinaryName = "cua-cursor-theme.exe"# where the baked line hasn't been updated yet.## ~~~ BAKED_VERSION: auto-updated after release publication — do not edit ~~~-$Script:CuaDriverRsBakedVersion = "0.28.3" # published-installer-version+$Script:CuaDriverRsBakedVersion = "0.28.2" # published-installer-version# ~~~ END_BAKED_VERSION ~~~$CursorThemeRequiredFrom = [version]"0.12.7"