Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

ci: sync every release PR and accept the bumped Perception golden (#4130)

Francesco Bonacci5ad26f996133
diff --git a/.github/scripts/tests/test_cua_driver_release_wiring.py b/.github/scripts/tests/test_cua_driver_release_wiring.py
index 24c16fbf41..aa1d4a1031 100644
--- a/.github/scripts/tests/test_cua_driver_release_wiring.py
+++ b/.github/scripts/tests/test_cua_driver_release_wiring.py
@@ -275,7 +275,8 @@ fi
self.assertIn("5c625bfb5d1ff62eadeeb3772007f7f66fdcf071", workflow)
self.assertIn("validate_release_please_tags.py --target HEAD", workflow)
self.assertIn('-p cua-driver --precise "$DRIVER_VERSION"', workflow)
- self.assertIn(
+ self.assertIn('--search "head:release-please--branches--"', workflow)
+ self.assertNotIn(
"gh pr list --state open --base main --limit 100 --json number",
workflow,
)
@@ -296,6 +297,11 @@ fi
)
self.assertIn("sync_lume_release_docs.py", workflow)
self.assertIn("chore(lume): synchronize release documentation", workflow)
+ self.assertIn(
+ "npx --yes [email protected] --dir docs install --frozen-lockfile --ignore-scripts",
+ workflow,
+ )
+ self.assertIn("runner.ts --library sandbox", workflow)
self.assertNotIn("if: steps.release.outputs.prs_created == 'true'", workflow)
self.assertNotIn("RELEASE_PRS: ${{ steps.release.outputs.prs }}", workflow)
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index 14b174835b..a5d8332530 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -313,6 +313,13 @@ jobs:
COMMIT_MESSAGE="chore(lume): synchronize release documentation"
else
python3 .github/scripts/validate_release_versions.py --product sandbox
+ # The Sandbox reference records the package version, so regenerate
+ # it with the release version. Lifecycle scripts stay disabled
+ # because this step holds the release app token.
+ npx --yes [email protected] --dir docs install --frozen-lockfile --ignore-scripts
+ node docs/node_modules/tsx/dist/cli.mjs scripts/docs-generators/runner.ts --library sandbox
+ git add docs/content/docs/reference/sandbox-sdk/runtime-support.mdx \
+ docs/content/docs/reference/sandbox-sdk/os-image-catalog.mdx
COMMIT_MESSAGE="chore(sandbox): synchronize release metadata"
fi
if git diff --cached --quiet; then
@@ -324,7 +331,12 @@ jobs:
git push --force-with-lease="refs/heads/$BRANCH:$REMOTE_HEAD" \
origin "HEAD:refs/heads/$BRANCH"
fi
- done < <(gh pr list --state open --base main --limit 100 --json number --jq '.[].number')
+ # Search by head branch: an unfiltered list returns only the newest
+ # 100 open pull requests and can silently skip an older release PR.
+ done < <(gh pr list --state open --base main \
+ --search "head:release-please--branches--" --limit 100 \
+ --json number,headRefName \
+ --jq '.[] | select(.headRefName | startswith("release-please--branches--")) | .number')
- name: Verify repository release versions
run: python3 .github/scripts/validate_release_versions.py --product all
diff --git a/docs/content/docs/reference/sandbox-sdk/os-image-catalog.mdx b/docs/content/docs/reference/sandbox-sdk/os-image-catalog.mdx
index 5a365b36c9..af152abd92 100644
--- a/docs/content/docs/reference/sandbox-sdk/os-image-catalog.mdx
+++ b/docs/content/docs/reference/sandbox-sdk/os-image-catalog.mdx
@@ -19,12 +19,12 @@ immutable artifact; it does not change those client mappings.
{/* GENERATED:sandbox-image-catalog:start */}
| OS | Distribution / version / architecture | Desktop / window manager | Image kind / runtime | Registry image or source | Evidence / limits |
| --- | --- | --- | --- | --- | --- |
-| Linux | Ubuntu 24.04; artifact architecture not established by SDK mapping | Artifact-dependent; not specified by SDK mapping | Fleet containerDisk; local bare-metal QEMU | `public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:main-38352d34` | `Image.linux()` mapping in `cua-sandbox` 0.7.0; versioned tag, not a digest pin. [SDK checks](/reference/sandbox-sdk/runtime-support#evidence-and-limits) establish selection, not a live pull, boot, or guest-service check. |
+| Linux | Ubuntu 24.04; artifact architecture not established by SDK mapping | Artifact-dependent; not specified by SDK mapping | Fleet containerDisk; local bare-metal QEMU | `public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:main-38352d34` | `Image.linux()` mapping in `cua-sandbox` 0.8.0; versioned tag, not a digest pin. [SDK checks](/reference/sandbox-sdk/runtime-support#evidence-and-limits) establish selection, not a live pull, boot, or guest-service check. |
| Linux | Ubuntu 24.04 | XFCE runtime mapping | Local Docker container | `public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:docker-latest` | Local container selector; mutable tag, not the Fleet VM disk. |
| Linux | Omarchy 4.0.2-1 (Arch Linux-based), amd64 | Hyprland / Wayland | Fleet containerDisk | `public.ecr.aws/k5j5w0x5/cua-omarchy-workspace@sha256:dd09f70f8cd35eca7871dff000538302baad63688a3008803f2238492802d743` | Deployment qualification recorded boot and readiness for `server:8000` and `mcp:3000`. The guest contains `cua-computer-server` 0.3.46 with embedded Driver 0.22.2; direct Driver qualification used 0.26.1. These image-specific results do not change the published client mapping or certify every operation and desktop configuration. |
| Linux | NixOS; release and architecture not recorded in the publication summary | StumpWM | Published candidate image | `public.ecr.aws/k5j5w0x5/cua-nixos-stumpwm:git-ee87f38043c043831a8761016015d6ef5ae783d9` | [Publication summary](https://github.com/trycua/cua/pull/3585) reports computer-server and Cua Driver included, guest tests and CI anonymous-pull checks passed. Component versions, service ports, and Fleet claim checks are not recorded there. Commit-named candidate tag, not a digest pin or `latest`; no built-in SDK mapping. |
| Linux | NixOS; release and architecture not recorded in the publication summary | Xfce / Xfwm4 | Published candidate image | `public.ecr.aws/k5j5w0x5/cua-nixos-xfce:git-ee87f38043c043831a8761016015d6ef5ae783d9` | [Publication summary](https://github.com/trycua/cua/pull/3585) reports computer-server and Cua Driver included, guest tests and CI anonymous-pull checks passed. Component versions, service ports, and Fleet claim checks are not recorded there. Commit-named candidate tag, not a digest pin or `latest`; no built-in SDK mapping. |
-| Windows | Server 2022; artifact architecture not established by SDK mapping | Native Windows desktop | Fleet containerDisk; local Hyper-V or QEMU | `public.ecr.aws/k5j5w0x5/cua-windows-2022:main-bac7daa3` | `Image.windows()` mapping in `cua-sandbox` 0.7.0; Fleet selects EFI. Versioned tag, not a digest pin. [SDK checks](/reference/sandbox-sdk/runtime-support#evidence-and-limits) establish selection and firmware, not a live pull, boot, or guest-service check. |
+| Windows | Server 2022; artifact architecture not established by SDK mapping | Native Windows desktop | Fleet containerDisk; local Hyper-V or QEMU | `public.ecr.aws/k5j5w0x5/cua-windows-2022:main-bac7daa3` | `Image.windows()` mapping in `cua-sandbox` 0.8.0; Fleet selects EFI. Versioned tag, not a digest pin. [SDK checks](/reference/sandbox-sdk/runtime-support#evidence-and-limits) establish selection and firmware, not a live pull, boot, or guest-service check. |
| macOS | Sequoia 15 | Native macOS desktop | Local Lume VM | `ghcr.io/trycua/macos-sequoia-cua:latest` | Compatible Apple silicon host required; mutable tag; no built-in Fleet mapping. |
| macOS | Tahoe 26 | Native macOS desktop | Local Lume VM | `ghcr.io/trycua/macos-tahoe-cua:latest` | Default `Image.macos()` version; compatible Apple silicon host required; mutable tag; no built-in Fleet mapping. |
{/* GENERATED:sandbox-image-catalog:end */}
diff --git a/docs/content/docs/reference/sandbox-sdk/runtime-support.mdx b/docs/content/docs/reference/sandbox-sdk/runtime-support.mdx
index 46053940e5..07aab88f06 100644
--- a/docs/content/docs/reference/sandbox-sdk/runtime-support.mdx
+++ b/docs/content/docs/reference/sandbox-sdk/runtime-support.mdx
@@ -4,7 +4,7 @@ description: Versioned image, runtime, customization, and transport support for
---
{/* GENERATED:sandbox-package-facts:start */}
-This reference describes the Python Sandbox SDK in `cua-sandbox` **0.7.0**, exported
+This reference describes the Python Sandbox SDK in `cua-sandbox` **0.8.0**, exported
by `cua` **0.1.6**. An accepted image specification or generated Fleet template is
evidence of SDK behavior, not proof that a guest boots on every host or deployment.
{/* GENERATED:sandbox-package-facts:end */}
@@ -123,12 +123,12 @@ constants. They describe the clients built and published from this repository;
they are separate from the versions observed in a deployment-qualified image.
{/* GENERATED:sandbox-evidence:start */}
-- `cua-sandbox` 0.7.0 source: image constructors, registry mappings, runtime
+- `cua-sandbox` 0.8.0 source: image constructors, registry mappings, runtime
selection, pool claims, Fleet validation, firmware, and services.
- `cua` 0.1.6 source: public Python exports.
- `cua-fleet` 0.1.17 package mapping: Python bound-claim service requests.
- `@trycua/fleet` 0.1.2 package mapping: TypeScript service requests.
-- `cua-sandbox[driver]` 0.7.0 maps direct Driver use to `cua-driver`
+- `cua-sandbox[driver]` 0.8.0 maps direct Driver use to `cua-driver`
0.27.0. This client mapping is not the Driver version inside a particular
published or deployment-qualified guest image.
{/* GENERATED:sandbox-evidence:end */}
diff --git a/libs/cua-driver/rust/crates/cua-perception/tests/protocol.rs b/libs/cua-driver/rust/crates/cua-perception/tests/protocol.rs
index efadeb0388..88c3506103 100644
--- a/libs/cua-driver/rust/crates/cua-perception/tests/protocol.rs
+++ b/libs/cua-driver/rust/crates/cua-perception/tests/protocol.rs
@@ -179,12 +179,47 @@ fn zero_length_frame_is_recoverable() {
assert_eq!(read_json_frame(&mut stdout)["request_id"], "after-empty");
}
+/// Compare JSON numbers by value. Release Please bumps the version in the
+/// response golden by re-serializing it with `JSON.stringify`, which writes
+/// `1.0` as `1`; serde_json would otherwise treat those as different values.
+fn numbers_as_f64(value: Value) -> Value {
+ match value {
+ Value::Number(number) => number
+ .as_f64()
+ .and_then(serde_json::Number::from_f64)
+ .map_or(Value::Number(number), Value::Number),
+ Value::Array(items) => Value::Array(items.into_iter().map(numbers_as_f64).collect()),
+ Value::Object(fields) => Value::Object(
+ fields
+ .into_iter()
+ .map(|(key, value)| (key, numbers_as_f64(value)))
+ .collect(),
+ ),
+ other => other,
+ }
+}
+
#[test]
fn fixture_parse_matches_the_checked_in_golden() {
- let actual = response(FIXTURE_REQUEST);
- let expected: Value = serde_json::from_str(FIXTURE_RESPONSE).expect("parse response golden");
+ let actual = numbers_as_f64(response(FIXTURE_REQUEST));
+ let expected =
+ numbers_as_f64(serde_json::from_str(FIXTURE_RESPONSE).expect("parse response golden"));
assert_eq!(actual, expected);
- assert_eq!(response(FIXTURE_REQUEST), expected);
+ assert_eq!(numbers_as_f64(response(FIXTURE_REQUEST)), expected);
+}
+
+#[test]
+fn response_golden_survives_release_please_reserialization() {
+ // Release Please's JSON updater writes integral floats without their
+ // fraction, so the bumped golden says `1` where the worker emits `1.0`.
+ let reserialized = FIXTURE_RESPONSE.replace("\"confidence\": 1.0", "\"confidence\": 1");
+ assert_ne!(
+ reserialized, FIXTURE_RESPONSE,
+ "golden should contain a float confidence"
+ );
+ let expected =
+ numbers_as_f64(serde_json::from_str(&reserialized).expect("parse reserialized golden"));
+ assert_eq!(numbers_as_f64(response(FIXTURE_REQUEST)), expected);
}
#[test]