Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/ci-public-containerdisk-refs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "CI: Public ContainerDisk References"

on:
pull_request:
paths:
- ".github/workflows/ci-public-containerdisk-refs.yml"
- "docs/content/docs/how-to-guides/sandbox/**"
- "docs/superpowers/plans/2026-08-09-periodic-cua-sandbox-live-e2e.md"
- "docs/superpowers/specs/2026-08-09-periodic-cua-sandbox-live-e2e-design.md"
- "infra/fleets-wif-smoke/**"
- "libs/fleet/backend/auth/**"
- "libs/python/cua-sandbox/tests/live/test_fleet_ephemeral.py"
- "tests/test_public_containerdisk_refs.py"

permissions:
contents: read

jobs:
guard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Reject private containerDisk references
run: python3 -m unittest tests.test_public_containerdisk_refs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "fleets_pool" "linux" {
name = "linux-pool"
cpu_cores = 4
memory = "8Gi"
container_disk_image = "296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace-duo:main-38352d34"
container_disk_image = "public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:main-e5d853a9"
runtime = "kubevirt"
firmware = "bios"

Expand Down Expand Up @@ -117,7 +117,7 @@ resource "fleets_pool" "windows" {
name = "windows-pool"
cpu_cores = 4
memory = "4Gi"
container_disk_image = "296062593712.dkr.ecr.us-west-2.amazonaws.com/cua-server-windows:latest"
container_disk_image = "public.ecr.aws/k5j5w0x5/cua-windows-2022:latest"
runtime = "kubevirt"
firmware = "efi"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ from cua_sandbox import Image, Pool


IMAGE = (
"296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace-duo"
"@sha256:5b9cb82f482834f7541901b87be956e7544d0db13fabc0b372cbc5eca5a74180"
"public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04"
"@sha256:82702ebdd32d1f8fc05f2ea409a7c67d0ba9f8f8e4e9f1a89ce40989d5f4475d"
)

POOL_NAME = os.environ.get("CUA_POOL_NAME", "cua-live-main-source-manual")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- Schedule must remain `7/15 * * * *`, running at `:07`, `:22`, `:37`, and `:52` UTC.
- Scheduled runs execute both `main-source` and `published-package`; relevant pushes to `main` execute only `main-source`.
- Manual dispatch accepts `both`, `main-source`, or `published-package`; only manual dispatch may set `force_failure=true`.
- Use image `296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace-duo@sha256:5b9cb82f482834f7541901b87be956e7544d0db13fabc0b372cbc5eca5a74180`.
- Use image `public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04@sha256:82702ebdd32d1f8fc05f2ea409a7c67d0ba9f8f8e4e9f1a89ce40989d5f4475d`.
- Provision with `cpu=4`, `memory_mb=4096`, `server_port=8000`, `time_to_start=900`, `request_timeout=60`, and `telemetry_enabled=False`.
- Authenticate only with `CUA_CLIENT_ID`, `CUA_CLIENT_SECRET`, `CUA_FLEET_BASE_URL=https://run.cua.ai`, and the default Cyclops token endpoint.
- Do not use `CUA_API_KEY`, legacy `/api/keys`, namespace-scoped key creation, repository-private SDK helpers, or mutable image tags.
Expand Down Expand Up @@ -386,8 +386,8 @@ from tests.live.fleet_e2e_support import (
)

IMAGE = (
"296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace-duo"
"@sha256:5b9cb82f482834f7541901b87be956e7544d0db13fabc0b372cbc5eca5a74180"
"public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04"
"@sha256:82702ebdd32d1f8fc05f2ea409a7c67d0ba9f8f8e4e9f1a89ce40989d5f4475d"
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Event-and-lane concurrency serializes each deterministic claim.
Provision with the exact certified image:

```text
296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace-duo@sha256:5b9cb82f482834f7541901b87be956e7544d0db13fabc0b372cbc5eca5a74180
public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04@sha256:82702ebdd32d1f8fc05f2ea409a7c67d0ba9f8f8e4e9f1a89ce40989d5f4475d
```

Use the public SDK with:
Expand Down
2 changes: 1 addition & 1 deletion infra/fleets-wif-smoke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "fleets_pool" "cua_cli_wif_smoke" {
replicas = 0
cpu_cores = 4
memory = "8Gi"
container_disk_image = "296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace-duo:latest"
container_disk_image = "public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04:latest"
readiness_probe_json = jsonencode({ tcpSocket = { port = 8000 } })

service {
Expand Down
4 changes: 2 additions & 2 deletions libs/python/cua-sandbox/tests/live/test_fleet_ephemeral.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
)

IMAGE = (
"296062593712.dkr.ecr.us-west-2.amazonaws.com/desktop-workspace-duo"
"@sha256:5b9cb82f482834f7541901b87be956e7544d0db13fabc0b372cbc5eca5a74180"
"public.ecr.aws/k5j5w0x5/cua-ubuntu-24.04"
"@sha256:82702ebdd32d1f8fc05f2ea409a7c67d0ba9f8f8e4e9f1a89ce40989d5f4475d"
)


Expand Down
47 changes: 47 additions & 0 deletions tests/test_public_containerdisk_refs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import subprocess
import unittest
from pathlib import Path

ROOT = Path(__file__).resolve().parent.parent
PRIVATE_REGISTRY = "296062593712.dkr.ecr.us-west-2.amazonaws.com"
PRIVATE_REPOSITORIES = (
f"{PRIVATE_REGISTRY}/desktop-workspace-duo",
f"{PRIVATE_REGISTRY}/cua-server-windows",
)


class PublicContainerDiskReferenceTests(unittest.TestCase):
def test_tracked_files_do_not_reference_private_containerdisk_repositories(self) -> None:
tracked_files = (
subprocess.run(
["git", "ls-files", "-z"],
cwd=ROOT,
check=True,
capture_output=True,
)
.stdout.decode()
.split("\0")
)
violations = []
for relative_path in tracked_files:
if not relative_path:
continue
path = ROOT / relative_path
if not path.is_file():
continue
try:
text = path.read_text()
except UnicodeDecodeError:
continue
for repository in PRIVATE_REPOSITORIES:
if repository in text:
violations.append(f"{relative_path}: {repository}")
self.assertEqual(
violations,
[],
"Private containerDisk references remain:\n" + "\n".join(violations),
)


if __name__ == "__main__":
unittest.main()
Loading