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
ci(cua-driver): publish releases from the Release Please tag after an automatic E2E gate (#4092)
Francesco Bonacci6d4bad535660
diff --git a/.github/scripts/tests/test_cua_driver_release_safety_wiring.py b/.github/scripts/tests/test_cua_driver_release_safety_wiring.pyindex a60f2f2f6c..56fe2d744b 100644--- a/.github/scripts/tests/test_cua_driver_release_safety_wiring.py+++ b/.github/scripts/tests/test_cua_driver_release_safety_wiring.py@@ -26,10 +26,11 @@ CD = REPO_ROOT / ".github/workflows/cd-rust-cua-driver.yml"SIGNATURES = REPO_ROOT / ".github/workflows/cua-driver-release-signatures.yml"SELF_TEST = REPO_ROOT / ".github/workflows/ci-cua-driver-release-signatures.yml"DO_NOTARIZE = "${{ startsWith(github.ref, 'refs/tags/cua-driver-rs-v') || inputs.notarize == true }}"-CAN_PUBLISH = (- "${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')) "- "|| (github.event_name == 'workflow_dispatch' && inputs.publish == true) }}"-)+# Only the Release Please tag push can publish; there is no manual publish input.+TAG_PUSH = "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')"+CAN_PUBLISH = "${{ " + TAG_PUSH + " }}"+E2E_GATES = {"e2e-linux", "e2e-windows", "e2e-macos", "e2e-standalone-browsers"}+SIGNATURE_GATES = {"verify-macos-release-signatures", "verify-windows-release-signatures"}STATUS_OVERRIDES = ("always()", "failure()", "cancelled()", "!cancelled()")@@ -104,11 +105,10 @@ def test_publishing_without_notarization_fails_before_any_build(cd: dict) -> Nondef test_every_publishing_path_is_a_notarized_path(cd: dict) -> None:"""The release job's trigger must imply CAN_PUBLISH, which implies DO_NOTARIZE via the guard."""release = cd["jobs"]["release"]- condition = release["if"]- assert condition in (- "github.event_name == 'workflow_dispatch' && inputs.publish == true",- "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')",- )+ assert release["if"] == TAG_PUSH+ dispatch = cd[True]["workflow_dispatch"]["inputs"]+ assert "publish" not in dispatch+ assert "inputs.publish" not in CD.read_text(encoding="utf-8")guard = release["steps"][0]assert guard["name"] == "Refuse to publish unverified or unnotarized artifacts"assert guard["env"]["DO_NOTARIZE"] == DO_NOTARIZE@@ -136,11 +136,9 @@ def test_signature_jobs_verify_exact_candidate_archives(cd: dict) -> None:def test_release_job_needs_signature_verification(cd: dict) -> None:release = cd["jobs"]["release"]- assert {- "verify-release-artifacts",- "verify-macos-release-signatures",- "verify-windows-release-signatures",- } <= needs(release)+ assert {"verify-release-artifacts"} | SIGNATURE_GATES | E2E_GATES <= needs(release)+ for gate in E2E_GATES:+ assert cd["jobs"][gate]["if"] == TAG_PUSHassert not any(override in release["if"] for override in STATUS_OVERRIDES)publish = step(release, "Publish the verified Release Please draft")assert release["steps"].index(step(release, "Refuse to publish unverified or unnotarized artifacts")) < release["steps"].index(publish)diff --git a/.github/scripts/tests/test_cua_driver_release_wiring.py b/.github/scripts/tests/test_cua_driver_release_wiring.pyindex e0fbc212c0..d80b5a1c39 100644--- a/.github/scripts/tests/test_cua_driver_release_wiring.py+++ b/.github/scripts/tests/test_cua_driver_release_wiring.py@@ -693,14 +693,14 @@ fiself.assertIn("https://cua.ai/driver/install.ps1", windows_skill)self.assertNotIn("/releases/latest/download/install.ps1", windows_skill)- def test_driver_cd_can_recover_an_existing_tag_with_cross_targets(self) -> None:+ def test_driver_cd_builds_the_exact_tag_with_cross_targets(self) -> None:workflow = self.read(".github/workflows/cd-rust-cua-driver.yml")- immutable_ref = (- "github.event_name == 'workflow_dispatch' && inputs.publish && "- "format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref"- )- self.assertEqual(workflow.count(immutable_ref), 7)+ # Every candidate build checks out the tag (or the nightly source ref);+ # there is no dispatch path that retargets an older tag for publication.+ self.assertEqual(workflow.count("ref: ${{ inputs.source_ref || github.ref }}"), 6)+ self.assertNotIn("inputs.publish", workflow)+ self.assertNotIn("format('refs/tags/cua-driver-rs-v{0}', inputs.version)", workflow)self.assertIn("name: Ensure Rust target is installed\n"" working-directory: libs/cua-driver/rust",@@ -712,7 +712,6 @@ fi" aarch64-apple-darwin x86_64-apple-darwin",workflow,)- self.assertIn("inputs.publish == true", workflow)self.assertIn('--tag "${{ steps.version.outputs.tag }}"', workflow)self.assertIn('--sha "${{ steps.version.outputs.sha }}"', workflow)@@ -808,16 +807,69 @@ fiself.assertIn(" id-token: write\n", workflow)self.assertIn("uses: ./.github/workflows/cd-rust-cua-driver.yml", workflow)- def test_driver_tag_build_cannot_publish_before_manual_e2e_gate(self) -> None:+ def test_driver_tag_push_publishes_only_after_automatic_e2e_gate(self) -> None:workflow = self.read(".github/workflows/cd-rust-cua-driver.yml")- self.assertIn(- "if: github.event_name == 'workflow_dispatch' && inputs.publish == true",- workflow,- )- self.assertNotIn(- "if: startsWith(github.ref, 'refs/tags/cua-driver-rs-v') || inputs.publish == true",- workflow,- )+ tag_push = (+ "github.event_name == 'push' && "+ "startsWith(github.ref, 'refs/tags/cua-driver-rs-v')"+ )++ # No manual publish input or dispatch path exists.+ dispatch = workflow.split(" workflow_dispatch:\n", 1)[1].split("\npermissions:", 1)[0]+ self.assertNotIn("publish:", dispatch)+ self.assertNotIn("inputs.publish", workflow)+ self.assertNotIn("publish recovery", workflow.lower())++ # The Release Please tag push calls every canonical hosted E2E suite+ # against the exact tag SHA, after the attribution preflight.+ gates = {+ "e2e-linux": ("e2e-rust-linux.yml", "ref: ${{ github.sha }}"),+ "e2e-windows": ("e2e-rust-windows.yml", "ref: ${{ github.sha }}"),+ "e2e-macos": ("e2e-rust-macos.yml", "source_sha: ${{ github.sha }}"),+ "e2e-standalone-browsers": (+ "e2e-rust-standalone-browsers.yml",+ "ref: ${{ github.sha }}",+ ),+ }+ for job, (called, sha_input) in gates.items():+ block = workflow.split(f"\n {job}:\n", 1)[1].split("\n\n", 1)[0]+ self.assertIn(" needs: release-attribution-preflight\n", block)+ self.assertIn(f" if: {tag_push}\n", block)+ self.assertIn(f" uses: ./.github/workflows/{called}\n", block)+ self.assertIn(sha_input, block)+ self.assertIn(" actions: read\n", block)+ self.assertNotIn("secrets", block)+ called_workflow = self.read(f".github/workflows/{called}")+ trigger = called_workflow.split("\npermissions:", 1)[0]+ self.assertIn(" workflow_call:\n", trigger)+ self.assertIn(" workflow_dispatch:\n", trigger)++ # The release job runs on that same tag push only after every build,+ # release check, and E2E gate succeeds (no always() bypass).+ release = workflow.split("\n release:\n", 1)[1]+ needs, steps = release.split(" steps:\n", 1)+ for job in (+ "build-linux",+ "build-windows",+ "build-macos-universal",+ "verify-windows-node-runtime",+ "verify-release-artifacts",+ "verify-mcp-client-discovery",+ "build-hyprland-plugin-source",+ *gates,+ ):+ self.assertIn(f" - {job}\n", needs)+ self.assertIn(f" if: {tag_push}\n", needs)+ self.assertNotIn("always()", needs)+ self.assertIn("ref: ${{ github.ref }}", steps)+ self.assertIn('if [[ "$SHA" != "$GITHUB_SHA" ]]; then', steps)++ # E2E evidence shares the run, so release-bound downloads are scoped.+ self.assertIn('pattern: "{cua-driver-rs-*,cua-hyprland-plugin-source}"', steps)+ verify = workflow.split("\n verify-release-artifacts:\n", 1)[1].split(+ "\n verify-mcp-client-discovery:\n", 1+ )[0]+ self.assertIn("pattern: cua-driver-rs-*", verify)linux = self.read(".github/workflows/e2e-rust-linux.yml")self.assertIn('name: "Linux / install-local.sh smoke"', linux)@@ -847,10 +899,17 @@ fiself.assertIn("verify_cua_driver_release_archives.py", workflow)self.assertIn("ref: ${{ github.workflow_sha }}", workflow)self.assertIn(- "[build-linux, build-windows, build-macos-universal, "- "verify-windows-node-runtime, "- "verify-release-artifacts, verify-mcp-client-discovery, build-hyprland-plugin-source, "- "verify-macos-release-signatures, verify-windows-release-signatures]",+ " needs:\n"+ " - build-linux\n"+ " - build-windows\n"+ " - build-macos-universal\n"+ " - verify-windows-node-runtime\n"+ " - verify-release-artifacts\n"+ " - verify-mcp-client-discovery\n"+ " - build-hyprland-plugin-source\n"+ " - verify-macos-release-signatures\n"+ " - verify-windows-release-signatures\n"+ " - e2e-linux\n",workflow,)diff --git a/.github/scripts/tests/test_cua_perception_pr_review_trigger.py b/.github/scripts/tests/test_cua_perception_pr_review_trigger.pyindex 2860897531..7390cec38e 100644--- a/.github/scripts/tests/test_cua_perception_pr_review_trigger.py+++ b/.github/scripts/tests/test_cua_perception_pr_review_trigger.py@@ -169,7 +169,18 @@ def test_macos_direct_lume_registration_is_manual_and_not_pr_event_chained() ->_, workflow = load_workflow(TRIGGER)assert "macos" not in workflow["jobs"]entry_text, entry_workflow = load_workflow(MACOS_ENTRY)- assert set(triggers(entry_workflow)) == {"workflow_dispatch"}+ entry_triggers = triggers(entry_workflow)+ assert set(entry_triggers) == {"workflow_dispatch", "workflow_call"}+ # The release-gate call exposes only the hosted source SHA; direct Lume+ # registration stays a manual dispatch.+ assert set(entry_triggers["workflow_call"]["inputs"]) == {"source_sha"}+ assert entry_workflow["jobs"]["register-lume"]["if"] == "inputs.mode == 'lume'"+ callers = sorted(+ path.name+ for path in (ROOT / ".github/workflows").glob("*.yml")+ if "uses: ./.github/workflows/e2e-rust-macos.yml" in path.read_text(encoding="utf-8")+ )+ assert callers == ["cd-rust-cua-driver.yml"]assert "pull_request:" not in entry_text and "pull_request_target" not in entry_textassert "live-jev-perception" not in entry_workflow["jobs"]assert "authorized-live-jev-macos-evidence.yml" not in entry_textdiff --git a/.github/scripts/tests/test_e2e_rust_linux_workflow.py b/.github/scripts/tests/test_e2e_rust_linux_workflow.pyindex 3a2debcb43..c23f094500 100644--- a/.github/scripts/tests/test_e2e_rust_linux_workflow.py+++ b/.github/scripts/tests/test_e2e_rust_linux_workflow.py@@ -9,13 +9,22 @@ def test_canonical_certification_is_fail_closed_and_complete() -> None:workflow = WORKFLOW.read_text(encoding="utf-8")certification = workflow.split("\n certify:\n", 1)[1]- assert (- "if: success() && github.event_name == 'workflow_dispatch' && inputs.lane == 'all'"- in certification- )+ # Manual dispatches and stable-tag release-gate calls both certify.+ assert "if: success() && inputs.lane == 'all'" in certificationassert "needs: [source, shared, native, capture, installer]" in certificationassert 'schema "cua-driver/e2e-certification/v1"' in certificationassert 'platform "linux"' in certificationfor job in ("shared", "native", "capture", "installer"):assert f'{job}: "success"' in certificationassert "name: rust-linux-e2e-certification" in certification+++def test_release_gate_call_matches_dispatch_and_ignores_caller_artifacts() -> None:+ workflow = WORKFLOW.read_text(encoding="utf-8")+ trigger = workflow.split("\npermissions:", 1)[0]+ call, dispatch = trigger.split(" workflow_call:\n", 1)[1].split(" workflow_dispatch:\n", 1)+ for name in ("ref:", "lane:", "cell_filter:"):+ assert name in call+ assert name in dispatch+ assert "github.event.inputs" not in workflow+ assert "pattern: rust-linux-*" in workflowdiff --git a/.github/scripts/tests/test_e2e_rust_windows_workflow.py b/.github/scripts/tests/test_e2e_rust_windows_workflow.pyindex 0c969b6233..78018e73f7 100644--- a/.github/scripts/tests/test_e2e_rust_windows_workflow.py+++ b/.github/scripts/tests/test_e2e_rust_windows_workflow.py@@ -20,10 +20,8 @@ def test_canonical_certification_is_fail_closed_and_github_hosted() -> None:workflow = WORKFLOW.read_text(encoding="utf-8")certification = workflow.split("\n certify:\n", 1)[1]- assert (- "if: success() && github.event_name == 'workflow_dispatch' && inputs.lane == 'all'"- in certification- )+ # Manual dispatches and stable-tag release-gate calls both certify.+ assert "if: success() && inputs.lane == 'all'" in certificationassert "needs: [source, shared, native, capture, installer]" in certificationassert "windows-latest|windows-2022|windows-2025" in certificationassert "class=github-hosted" in certification@@ -33,6 +31,18 @@ def test_canonical_certification_is_fail_closed_and_github_hosted() -> None:assert "name: rust-windows-e2e-certification" in certification+def test_release_gate_call_matches_dispatch_and_ignores_caller_artifacts() -> None:+ workflow = WORKFLOW.read_text(encoding="utf-8")+ trigger = workflow.split("\npermissions:", 1)[0]+ call, dispatch = trigger.split(" workflow_call:\n", 1)[1].split(" workflow_dispatch:\n", 1)+ for name in ("ref:", "runner:", "lane:"):+ assert name in call+ assert name in dispatch+ assert 'default: "windows-latest"' in call+ assert "github.event.inputs" not in workflow+ assert "pattern: rust-windows-*" in workflow++def test_matrix_summary_recovers_results_when_lane_summary_is_missing(tmp_path: Path) -> None:artifact = tmp_path / "artifacts/rust-windows-native"artifact.mkdir(parents=True)diff --git a/.github/scripts/tests/test_macos_hosted_e2e_workflow.py b/.github/scripts/tests/test_macos_hosted_e2e_workflow.pyindex e4514935c4..f48566d963 100644--- a/.github/scripts/tests/test_macos_hosted_e2e_workflow.py+++ b/.github/scripts/tests/test_macos_hosted_e2e_workflow.py@@ -1,4 +1,8 @@-"""Contract tests for the manually dispatched GitHub-hosted macOS E2E lane."""+"""Contract tests for the GitHub-hosted macOS E2E lane.++Maintainers dispatch it for pull request evidence, and the stable Cua Driver+tag run calls it as an automatic release gate.+"""from pathlib import Path@@ -15,6 +19,7 @@ def test_hosted_macos_probe_is_manual_exact_sha_and_least_privilege() -> None:trigger = workflow.split("permissions:", 1)[0]assert "workflow_dispatch:" in trigger+ assert "workflow_call:" in triggerassert "pull_request:" not in triggerassert "push:" not in triggerassert "source_sha:" in trigger@@ -44,6 +49,15 @@ def test_hosted_macos_probe_is_manual_exact_sha_and_least_privilege() -> None:assert "live_jev_perception" not in workflowassert "authorized-live-jev-macos-evidence.yml" not in workflowassert "secrets: inherit" not in workflow+ # A called workflow has no mode input; hosted jobs run unless lume is chosen.+ assert workflow.count(" if: inputs.mode != 'lume'\n") == 2+ assert " if: ${{ always() && inputs.mode != 'lume' }}\n" in workflow+ assert " if: inputs.mode == 'lume'\n" in workflow+ # Manual dispatches never queue into (and replace) a release-gate call.+ assert (+ "group: e2e-rust-macos-hosted-${{ github.event_name }}-${{ inputs.source_sha }}"+ in workflow+ )for action in ("actions/checkout", "actions/upload-artifact"):line = next(line for line in workflow.splitlines() if f"uses: {action}@" in line)@@ -89,7 +103,8 @@ def test_hosted_macos_probe_fails_closed_before_gui_capture() -> None:for requirement in ('GITHUB_ACTIONS:-}" == true','RUNNER_ENVIRONMENT:-}" == github-hosted',- 'GITHUB_EVENT_NAME:-}" == workflow_dispatch',+ 'GITHUB_EVENT_NAME:-}" != workflow_dispatch',+ '"${GITHUB_EVENT_NAME:-}" == push && "${GITHUB_REF:-}" == refs/tags/cua-driver-rs-v*',"current user must be runner","console user must be runner","SSH sessions cannot seed or certify hosted TCC state",@@ -146,7 +161,8 @@ def test_hosted_macos_runner_is_strict_and_uses_the_canonical_matrix() -> None:for requirement in ('GITHUB_ACTIONS:-}" == true',- 'GITHUB_EVENT_NAME:-}" == workflow_dispatch',+ 'GITHUB_EVENT_NAME:-}" != workflow_dispatch',+ '"${GITHUB_EVENT_NAME:-}" == push && "${GITHUB_REF:-}" == refs/tags/cua-driver-rs-v*','RUNNER_ENVIRONMENT:-}" == github-hosted','ImageOS:-}" == macos26','CURRENT_USER}" == runner',diff --git a/.github/scripts/tests/test_nightly_release_wiring.py b/.github/scripts/tests/test_nightly_release_wiring.pyindex ff1bda6ab6..c2abf33931 100644--- a/.github/scripts/tests/test_nightly_release_wiring.py+++ b/.github/scripts/tests/test_nightly_release_wiring.py@@ -6,6 +6,7 @@ from pathlib import PathROOT = Path(__file__).resolve().parents[3]WORKFLOWS = ROOT / ".github/workflows"+TAG_PUSH = "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')"def source(name: str) -> str:@@ -15,11 +16,30 @@ def source(name: str) -> str:def test_driver_stable_publish_gate_and_workflow_name_are_frozen():driver = source("cd-rust-cua-driver.yml")assert driver.startswith('name: "CD: Cua Driver (cross-platform)"')- assert "if: github.event_name == 'workflow_dispatch' && inputs.publish == true" in driver+ release = driver.split("\n release:\n", 1)[1].split(" steps:\n", 1)[0]+ # Only the stable tag push publishes. Nightly workflow_call runs inherit+ # the caller's schedule/workflow_dispatch event and can never match.+ assert (+ " if: github.event_name == 'push' && "+ "startsWith(github.ref, 'refs/tags/cua-driver-rs-v')\n"+ ) in release+ assert "inputs.publish" not in driversdk = source("cd-py-cua-driver.yml")assert 'workflows: ["CD: Cua Driver (cross-platform)"]' in sdk+def test_driver_nightly_grants_reusable_e2e_gate_permissions_without_running_it():+ nightly = source("nightly-cua-driver.yml")+ driver = source("cd-rust-cua-driver.yml")+ # The builder declares stable-tag E2E gate jobs with actions: read; the+ # nightly caller must grant it even though those jobs are skipped.+ assert "permissions:\n # actions: read" in nightly+ assert "\n actions: read\n" in nightly+ for job in ("e2e-linux", "e2e-windows", "e2e-macos", "e2e-standalone-browsers"):+ block = driver.split(f"\n {job}:\n", 1)[1].split("\n\n", 1)[0]+ assert f" if: {TAG_PUSH}" in block++def test_lume_stable_publish_gate_remains_tag_only():lume = source("cd-swift-lume.yml")assert "if: startsWith(github.ref, 'refs/tags/lume-v')" in lumediff --git a/.github/workflows/cd-py-cua-driver.yml b/.github/workflows/cd-py-cua-driver.ymlindex 5137cf3470..4e87b3094b 100644--- a/.github/workflows/cd-py-cua-driver.yml+++ b/.github/workflows/cd-py-cua-driver.yml@@ -51,10 +51,8 @@ jobs:fiTAG="cua-driver-rs-v$VERSION"else- # Publish dispatches run from main, so workflow_run.head_sha is the- # workflow revision rather than the immutable release tag. Resolve- # those runs from the exact metadata artifact produced by the- # successful release job.+ # Resolve the version from the exact metadata artifact produced by+ # the release job of the stable tag run that published the draft.if ! echo "$RUN_ID" | grep -qE '^[0-9]+$'; thenecho "Invalid workflow run ID: $RUN_ID" >&2exit 1@@ -78,9 +76,9 @@ jobs:VERSION="${RELEASE_VERSIONS[0]}"TAG="cua-driver-rs-v$VERSION"else- # Tag-triggered candidate builds do not run the release job and- # therefore have no release metadata artifact. Preserve the tag- # SHA fallback so those runs continue to skip until publication.+ # Build-only runs skip the release job and therefore have no+ # release metadata artifact. Fall back to the tag at the run's+ # SHA; the published-release check below still gates publishing.if ! echo "$HEAD_SHA" | grep -qE '^[0-9a-f]{40}$'; thenecho "Invalid SHA format: $HEAD_SHA" >&2exit 1diff --git a/.github/workflows/cd-rust-cua-driver.yml b/.github/workflows/cd-rust-cua-driver.ymlindex a409b077e2..34f48466a3 100644--- a/.github/workflows/cd-rust-cua-driver.yml+++ b/.github/workflows/cd-rust-cua-driver.yml@@ -9,6 +9,13 @@ name: "CD: Cua Driver (cross-platform)"# Bare binaries let curlable installers do# `curl -L .../cua-driver-rs-vN-darwin-universal-binary.tar.gz | tar -xz`# without needing to unpack a directory structure first.+#+# Stable releases follow Release Please with no manual publish step. Merging+# the release pull request creates the `cua-driver-rs-v*` tag and a draft+# release. That tag push runs this workflow, which builds every artifact, runs+# the canonical desktop E2E suites against the exact tag SHA, and publishes the+# draft only when the builds, release checks, and E2E gates all pass.+# Nightly workflow_call runs and manual dispatches build candidates only.on:workflow_call:@@ -64,11 +71,6 @@ on:required: falsetype: booleandefault: true- publish:- description: "Publish an existing immutable version tag after successful builds"- required: false- type: boolean- default: falsepermissions:contents: write@@ -82,9 +84,8 @@ concurrency:jobs:# Certify PR-first attribution from the exact immutable candidate before- # starting any platform build. Publish recovery dispatches use current- # release-control tooling while keeping all release inputs pinned to the tag.- # Manual non-publishing builds intentionally remain available for iteration.+ # starting any platform build. Manual build-only dispatches intentionally+ # remain available for iteration and skip this check.release-attribution-preflight:name: release attribution preflightruns-on: ubuntu-latest@@ -97,7 +98,7 @@ jobs:# install. Fail before any build instead of discovering it afterwards.- name: Refuse to publish without macOS notarizationenv:- CAN_PUBLISH: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')) || (github.event_name == 'workflow_dispatch' && inputs.publish == true) }}+ CAN_PUBLISH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v') }}DO_NOTARIZE: ${{ startsWith(github.ref, 'refs/tags/cua-driver-rs-v') || inputs.notarize == true }}run: |echo "can publish: ${CAN_PUBLISH}; notarize macOS: ${DO_NOTARIZE}"@@ -124,7 +125,7 @@ jobs:- uses: actions/checkout@v4with:fetch-depth: 0- ref: ${{ inputs.source_ref || github.event_name == 'workflow_dispatch' && inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}+ ref: ${{ inputs.source_ref || github.ref }}- name: Check out release control toolinguses: actions/checkout@v4@@ -140,8 +141,6 @@ jobs:set -euo pipefailif [[ "$GITHUB_REF" == refs/tags/cua-driver-rs-v* ]]; thenVERSION="${GITHUB_REF#refs/tags/cua-driver-rs-v}"- elif [[ "${{ inputs.publish }}" == "true" ]]; then- VERSION="${{ inputs.version }}"elseecho "No immutable release candidate requested; skipping attribution preflight."exit 0@@ -240,7 +239,7 @@ jobs:libxkbcommon-dev- uses: actions/checkout@v4with:- ref: ${{ inputs.source_ref || github.event_name == 'workflow_dispatch' && inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}+ ref: ${{ inputs.source_ref || github.ref }}- name: Stage nightly artifact versionif: inputs.channel == 'nightly'run: python3 .github/scripts/release_channels.py apply-version --component cua-driver-rs --version "${{ inputs.version }}"@@ -331,7 +330,7 @@ jobs:steps:- uses: actions/checkout@v4with:- ref: ${{ inputs.source_ref || github.event_name == 'workflow_dispatch' && inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}+ ref: ${{ inputs.source_ref || github.ref }}- name: Stage nightly artifact versionif: inputs.channel == 'nightly'shell: bash@@ -512,7 +511,7 @@ jobs:steps:- uses: actions/checkout@v4with:- ref: ${{ inputs.source_ref || github.event_name == 'workflow_dispatch' && inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}+ ref: ${{ inputs.source_ref || github.ref }}- uses: actions/setup-node@v4with:node-version: "22"@@ -580,7 +579,7 @@ jobs:steps:- name: Assert notarization for publishable buildsenv:- CAN_PUBLISH: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')) || (github.event_name == 'workflow_dispatch' && inputs.publish == true) }}+ CAN_PUBLISH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v') }}run: |if [[ "$GITHUB_REF" == refs/tags/cua-driver-rs-v* && "$DO_NOTARIZE" != "true" ]]; thenecho "::error title=Release safety::Tag builds must notarize the macOS artifacts."@@ -593,7 +592,7 @@ jobs:echo "notarize macOS: ${DO_NOTARIZE}"- uses: actions/checkout@v4with:- ref: ${{ inputs.source_ref || github.event_name == 'workflow_dispatch' && inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}+ ref: ${{ inputs.source_ref || github.ref }}- name: Preflight Computer History provisioning profileif: env.DO_NOTARIZE == 'true'env:@@ -976,19 +975,20 @@ jobs:# Source/build-kit assets only: native plugin certification is a separate gate.# Nightly builds rewrite Cargo versions in the worktree, so they cannot supply# a committed, stable-version source archive under the same provenance contract.+ # Only the stable tag push publishes, so only that run generates these assets.+ # Nightly workflow_call runs inherit the caller's non-push event name.build-hyprland-plugin-source:name: pinned Hyprland plugin sourceneeds: release-attribution-preflightif: >-- inputs.channel != 'nightly' &&- (startsWith(github.ref, 'refs/tags/cua-driver-rs-v') ||- (github.event_name == 'workflow_dispatch' && inputs.publish == true))+ github.event_name == 'push' &&+ startsWith(github.ref, 'refs/tags/cua-driver-rs-v')runs-on: ubuntu-lateststeps:- uses: actions/checkout@v4with:fetch-depth: 0- ref: ${{ inputs.source_ref || github.event_name == 'workflow_dispatch' && inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}+ ref: ${{ inputs.source_ref || github.ref }}- uses: actions/setup-python@v5with:python-version: "3.12"@@ -1009,7 +1009,7 @@ jobs:SOURCE_VERSION=$(git show "${SHA}:libs/cua-driver/rust/Cargo.toml" | \python3 -c 'import sys, tomllib; print(tomllib.loads(sys.stdin.read())["workspace"]["package"]["version"])')test "$VERSION" = "$SOURCE_VERSION"- # Historical tags predating the bundler retain Driver-only recovery.+ # Sources predating the bundler keep Driver-only assets.# An existing helper that fails generation is never silently skipped.if ! git cat-file -e "${SHA}:libs/cua-driver/hyprland-plugin/packaging/release/bundle.py"; thenecho "Legacy source has no plugin bundler; preserving Driver-only release."@@ -1039,10 +1039,8 @@ jobs:steps:- uses: actions/checkout@v4with:- # Keep the verifier available when maintainers recover an older- # immutable tag that predates this script. Candidate artifacts still- # come from that exact tag; the release control comes from the commit- # that defined this workflow run.+ # Candidate artifacts come from the exact source; the verifier comes+ # from the commit that defined this workflow run.ref: ${{ inputs.source_ref || github.workflow_sha }}- name: Determine version@@ -1060,6 +1058,8 @@ jobs:- name: Download candidate archivesuses: actions/download-artifact@v4with:+ # E2E release gates upload evidence into this same run.+ pattern: cua-driver-rs-*path: artifacts- name: Verify installer-facing archive contract@@ -1130,6 +1130,59 @@ jobs:CUA_DRIVER_EXPECTED_VERSION: ${{ steps.version.outputs.version }}run: npm run verify+ # ── Automatic desktop E2E release gate ─────────────────────────────────────+ # The stable tag push certifies the exact tag SHA with the canonical hosted+ # desktop suites before `release` may publish. These jobs call the same+ # workflows maintainers dispatch for pull request evidence. They start after+ # the attribution preflight and run in parallel with the artifact builds.+ # Under a tag push, github.sha is the tagged commit; `release` re-verifies+ # that the published tag resolves to that same SHA. Nightly workflow_call+ # runs inherit the caller's non-push event name and skip the gate.+ e2e-linux:+ name: release gate / Linux E2E+ needs: release-attribution-preflight+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')+ permissions:+ actions: read+ contents: read+ uses: ./.github/workflows/e2e-rust-linux.yml+ with:+ ref: ${{ github.sha }}++ e2e-windows:+ name: release gate / Windows E2E+ needs: release-attribution-preflight+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')+ permissions:+ actions: read+ contents: read+ uses: ./.github/workflows/e2e-rust-windows.yml+ with:+ ref: ${{ github.sha }}++ e2e-macos:+ name: release gate / macOS hosted E2E+ needs: release-attribution-preflight+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')+ permissions:+ actions: read+ contents: read+ pull-requests: read+ uses: ./.github/workflows/e2e-rust-macos.yml+ with:+ source_sha: ${{ github.sha }}++ e2e-standalone-browsers:+ name: release gate / standalone browser E2E+ needs: release-attribution-preflight+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')+ permissions:+ actions: read+ contents: read+ uses: ./.github/workflows/e2e-rust-standalone-browsers.yml+ with:+ ref: ${{ github.sha }}+# ── Release signature gate ──────────────────────────────────────────────────# Release safety (#4109): verify the exact uploaded archives the way the# operating systems do, on their own runners, before the release job can@@ -1159,15 +1212,28 @@ jobs:verify_windows: true# ── Release ──────────────────────────────────────────────────────────────────- # Tag pushes build immutable candidate artifacts only. Publishing is an- # explicit second step after the exact tag SHA passes the interactive E2E- # matrices and install-local smokes. This keeps Release Please from making a- # GitHub release (and therefore PyPI/npm SDK packages) public before that- # evidence exists.+ # The stable tag push that Release Please creates publishes its own draft+ # release. No manual dispatch is involved: `release` runs only on that tag+ # push and only after every build, release check, and E2E gate succeeds, so+ # the GitHub release (and therefore the PyPI/npm SDK packages) never becomes+ # public before that evidence exists. Nightly and manual build-only runs skip+ # it.release:needs:- [build-linux, build-windows, build-macos-universal, verify-windows-node-runtime, verify-release-artifacts, verify-mcp-client-discovery, build-hyprland-plugin-source, verify-macos-release-signatures, verify-windows-release-signatures]- if: github.event_name == 'workflow_dispatch' && inputs.publish == true+ - build-linux+ - build-windows+ - build-macos-universal+ - verify-windows-node-runtime+ - verify-release-artifacts+ - verify-mcp-client-discovery+ - build-hyprland-plugin-source+ - verify-macos-release-signatures+ - verify-windows-release-signatures+ - e2e-linux+ - e2e-windows+ - e2e-macos+ - e2e-standalone-browsers+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/cua-driver-rs-v')runs-on: ubuntu-latestoutputs:version: ${{ steps.version.outputs.version }}@@ -1187,12 +1253,10 @@ jobs:- uses: actions/checkout@v4with:fetch-depth: 0- ref: ${{ github.event_name == 'workflow_dispatch' && inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}+ ref: ${{ github.ref }}- # Recovery dispatches may target an immutable tag created before the- # current release tooling existed. Keep release inputs pinned to that tag,- # but run orchestration helpers from the exact workflow revision that was- # dispatched.+ # Release inputs stay pinned to the tag checkout above; orchestration+ # helpers run from the workflow revision in a separate checkout.- name: Check out release control toolinguses: actions/checkout@v4with:@@ -1203,11 +1267,11 @@ jobs:- name: Determine versionid: versionrun: |- if [[ "$GITHUB_REF" == refs/tags/cua-driver-rs-v* ]]; then- VERSION="${GITHUB_REF#refs/tags/cua-driver-rs-v}"- else- VERSION="${{ inputs.version }}"+ if [[ "$GITHUB_REF" != refs/tags/cua-driver-rs-v* ]]; then+ echo "Publication requires a cua-driver-rs-v* tag push, got $GITHUB_REF" >&2+ exit 1fi+ VERSION="${GITHUB_REF#refs/tags/cua-driver-rs-v}"TAG="cua-driver-rs-v${VERSION}"SHA=$(git rev-parse HEAD)TAG_SHA=$(git rev-list -n 1 "$TAG")@@ -1215,13 +1279,20 @@ jobs:echo "Checked-out source $SHA does not match $TAG ($TAG_SHA)" >&2exit 1fi+ # The E2E gates certified github.sha; publish only that exact commit.+ if [[ "$SHA" != "$GITHUB_SHA" ]]; then+ echo "$TAG ($SHA) is not the E2E-certified commit ($GITHUB_SHA)" >&2+ exit 1+ fiecho "version=$VERSION" >> "$GITHUB_OUTPUT"echo "tag=$TAG" >> "$GITHUB_OUTPUT"echo "sha=$SHA" >> "$GITHUB_OUTPUT"- - name: Download all artifacts+ # Download only release candidates; E2E gate evidence shares this run.+ - name: Download candidate release artifactsuses: actions/download-artifact@v4with:+ pattern: "{cua-driver-rs-*,cua-hyprland-plugin-source}"path: artifacts- name: Verify checked-in release versions@@ -1315,7 +1386,7 @@ jobs:cmp "$EXPECTED" "release-upload/$(basename "$EXPECTED")"doneelse- # Legacy tag recovery has no plugin source job or plugin assets.+ # Legacy sources without the bundler have no plugin assets.test "${#PLUGIN_ASSETS[@]}" -eq 0fidiff --git a/.github/workflows/ci-distro-compat-cua-driver.yml b/.github/workflows/ci-distro-compat-cua-driver.ymlindex 5b16181738..52d46ba682 100644--- a/.github/workflows/ci-distro-compat-cua-driver.yml+++ b/.github/workflows/ci-distro-compat-cua-driver.yml@@ -42,9 +42,10 @@ on:paths:- ".github/workflows/ci-distro-compat-cua-driver.yml"release:- # The Cua Driver release train separates immutable tag creation from an- # explicitly dispatched publication step. Wait for publication so the- # released-binary matrix never races a draft release.+ # Release Please creates the Cua Driver tag and a draft release; the+ # tag-triggered CD run publishes that draft only after its builds and+ # E2E gates pass. Wait for publication so the released-binary matrix+ # never races a draft release.types: [published]workflow_dispatch:inputs:diff --git a/.github/workflows/e2e-rust-linux.yml b/.github/workflows/e2e-rust-linux.ymlindex 6db0610e11..631223f232 100644--- a/.github/workflows/e2e-rust-linux.yml+++ b/.github/workflows/e2e-rust-linux.yml@@ -1,6 +1,24 @@name: "E2E: Rust Linux interactive"on:+ # Stable Cua Driver tag runs call this matrix as a release gate. Keep the+ # inputs in sync with workflow_dispatch; only `inputs.*` is read below.+ workflow_call:+ inputs:+ ref:+ description: "Full 40-character commit SHA to certify"+ required: true+ type: string+ lane:+ description: "Diagnostic lane; release gates use all"+ required: false+ type: string+ default: all+ cell_filter:+ description: "Optional shared-cell substring for targeted diagnostics"+ required: false+ type: string+ default: ""workflow_dispatch:inputs:ref:@@ -274,6 +292,8 @@ jobs:- name: Download lane resultsuses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4with:+ # Release gates share the caller's run; skip its build artifacts.+ pattern: rust-linux-*path: artifacts- name: Publish matrix summaryshell: bash@@ -353,8 +373,9 @@ jobs:certify:# success() requires every job this one depends on to have succeeded;# combined with the lane=='all' check this keeps certification fail-closed- # against both lane failures and diagnostic-lane dispatches.- if: success() && github.event_name == 'workflow_dispatch' && inputs.lane == 'all'+ # against both lane failures and diagnostic-lane dispatches. Manual+ # dispatches and release-gate calls certify the same complete matrix.+ if: success() && inputs.lane == 'all'needs: [source, shared, native, capture, installer]name: "Linux / canonical certification"runs-on: ubuntu-latestdiff --git a/.github/workflows/e2e-rust-macos.yml b/.github/workflows/e2e-rust-macos.ymlindex 7883436306..ffc7bb4d3d 100644--- a/.github/workflows/e2e-rust-macos.yml+++ b/.github/workflows/e2e-rust-macos.yml@@ -1,6 +1,17 @@name: "E2E: Rust macOS hosted"on:+ # Stable Cua Driver tag runs call the hosted matrix as a release gate. A+ # called workflow has no `mode` input, so the hosted jobs run unless a manual+ # dispatch selects `lume`. Under workflow_call, `github.sha` is the caller's+ # tag commit, so the caller passes that same SHA as `source_sha` and the+ # workflow-ref check below still proves the harness matches the source.+ workflow_call:+ inputs:+ source_sha:+ description: "Full 40-character commit SHA to certify"+ required: true+ type: stringworkflow_dispatch:inputs:source_sha:@@ -34,12 +45,14 @@ permissions:pull-requests: readconcurrency:- group: e2e-rust-macos-hosted-${{ inputs.source_sha }}+ # Separate release-gate calls from manual dispatches so a queued manual run+ # can never replace (cancel) a pending release gate for the same SHA.+ group: e2e-rust-macos-hosted-${{ github.event_name }}-${{ inputs.source_sha }}cancel-in-progress: falsejobs:probe:- if: inputs.mode == 'hosted'+ if: inputs.mode != 'lume'name: hosted environment proberuns-on: macos-26timeout-minutes: 20@@ -108,7 +121,7 @@ jobs:retention-days: 14matrix:- if: inputs.mode == 'hosted'+ if: inputs.mode != 'lume'needs: probename: hosted ${{ matrix.lane }} laneruns-on: macos-26@@ -188,7 +201,7 @@ jobs:retention-days: 14certify:- if: ${{ always() && inputs.mode == 'hosted' }}+ if: ${{ always() && inputs.mode != 'lume' }}needs: [probe, matrix]name: hosted certification resultruns-on: ubuntu-latestdiff --git a/.github/workflows/e2e-rust-standalone-browsers.yml b/.github/workflows/e2e-rust-standalone-browsers.ymlindex 179683b400..ef9a9f4510 100644--- a/.github/workflows/e2e-rust-standalone-browsers.yml+++ b/.github/workflows/e2e-rust-standalone-browsers.yml@@ -1,6 +1,13 @@name: "E2E: Rust standalone browsers"on:+ # Stable Cua Driver tag runs call these suites as a release gate.+ workflow_call:+ inputs:+ ref:+ description: "Full 40-character commit SHA to certify"+ required: true+ type: stringworkflow_dispatch:inputs:ref:diff --git a/.github/workflows/e2e-rust-windows.yml b/.github/workflows/e2e-rust-windows.ymlindex ee594046b4..d3b9531022 100644--- a/.github/workflows/e2e-rust-windows.yml+++ b/.github/workflows/e2e-rust-windows.yml@@ -1,6 +1,24 @@name: "E2E: Rust Windows interactive"on:+ # Stable Cua Driver tag runs call this matrix as a release gate. Keep the+ # inputs in sync with workflow_dispatch; only `inputs.*` is read below.+ workflow_call:+ inputs:+ ref:+ description: "Full 40-character commit SHA to certify"+ required: true+ type: string+ runner:+ description: "Runner label; release gates use the GitHub-hosted default"+ required: false+ type: string+ default: "windows-latest"+ lane:+ description: "Diagnostic lane; release gates use all"+ required: false+ type: string+ default: allworkflow_dispatch:inputs:ref:@@ -318,6 +336,8 @@ jobs:- name: Download lane resultsuses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4with:+ # Release gates share the caller's run; skip its build artifacts.+ pattern: rust-windows-*path: artifacts- name: Publish matrix summaryshell: bash@@ -458,7 +478,8 @@ jobs:# policy check below additionally refuses to certify an Azure RDP parity# replay: per scripts/ci/README.md that replay is not itself a source of# behavioral truth, only the GitHub-hosted preflighted-interactive lane is.- if: success() && github.event_name == 'workflow_dispatch' && inputs.lane == 'all'+ # Manual dispatches and release-gate calls certify the same matrix.+ if: success() && inputs.lane == 'all'needs: [source, shared, native, capture, installer]name: "Windows / canonical certification"runs-on: ubuntu-latestdiff --git a/.github/workflows/nightly-cua-driver.yml b/.github/workflows/nightly-cua-driver.ymlindex 642145042d..34760c9fae 100644--- a/.github/workflows/nightly-cua-driver.yml+++ b/.github/workflows/nightly-cua-driver.yml@@ -16,6 +16,9 @@ on:type: booleanpermissions:+ # actions: read lets the reusable builder declare its stable-tag E2E gate+ # jobs; nightly runs skip those jobs and never publish a stable release.+ actions: readcontents: writeid-token: writeissues: writediff --git a/docs/release-attribution-and-announcements-plan.md b/docs/release-attribution-and-announcements-plan.mdindex 506a3b0bea..c35c7dc51f 100644--- a/docs/release-attribution-and-announcements-plan.md+++ b/docs/release-attribution-and-announcements-plan.md@@ -568,7 +568,7 @@ GitHub release: draftTarget SHA: the merged release pull request commit```-The Cua Driver CD workflow starts from the tag and builds immutable candidate artifacts, but a tag push cannot publish the draft. A maintainer first dispatches the Linux, Windows, and macOS interactive E2E matrices against that exact tag SHA; the Linux and Windows matrices also exercise `install-local.sh` and `install-local.ps1` in isolated namespaces, while the canonical macOS Lume matrix installs through `install-local.sh` under the stable TCC identity. Only after that evidence passes does a `workflow_dispatch` with `publish: true` rebuild the same tag, upload the release assets, and finalize the draft. The attribution check confirms `@alice` as the pull request author and `@bob` as the linked issue reporter.+The tag push starts the Cua Driver CD workflow, which builds the release artifacts from the exact tagged commit. The same run then calls the canonical Linux, Windows, macOS hosted, and standalone-browser E2E suites against that tag SHA; the Linux and Windows matrices also exercise `install-local.sh` and `install-local.ps1` in isolated namespaces. When the builds, the release artifact checks, and every E2E suite pass, the run's release job uploads the assets and publishes the draft. Nobody dispatches a workflow to publish. The attribution check confirms `@alice` as the pull request author and `@bob` as the linked issue reporter.#### Final GitHub release body@@ -840,9 +840,9 @@ The cloud repository should consume the release manifest only after the core wor### Publication-1. Let the tag-triggered CD workflow build candidate artifacts from the exact tagged commit; it must not publish the draft.-2. Dispatch the canonical interactive E2E matrices with the full tag SHA. Require the Linux shared, native, capture, and `install-local.sh` lanes; the Windows interactive lanes on a GUI runner plus the hosted `install-local.ps1` lane; and the macOS Lume matrix, which includes its own signed `install-local.sh` and TCC checks.-3. After those runs pass, dispatch the Cua Driver CD workflow for the immutable version with `publish: true`.+1. Let the tag-triggered CD workflow build candidate artifacts from the exact tagged commit.+2. In that same run, call the canonical E2E workflows with the tag SHA: the Linux shared, native, capture, and `install-local.sh` lanes; the Windows interactive lanes plus the `install-local.ps1` lane on the GitHub-hosted runner; the macOS hosted matrix; and the standalone-browser suites. The macOS Lume matrix stays pre-merge evidence and is not part of this automatic gate.+3. Run the release job on the tag push only after the builds, the release artifact checks, and every E2E suite pass. No maintainer dispatch is required.4. List GitHub releases, include drafts, and match the unique draft by `tag_name`; retain its release ID and upload URL.5. Upload packages and checksums by release ID without writing the body, changing the draft flag, or creating a second release. Remove `softprops/action-gh-release` from these two CD paths unless a pinned version is fixture-proven to reuse the same draft safely.6. Attach the attribution manifest and optional visual to the same release ID.diff --git a/libs/cua-driver/hyprland-plugin/packaging/release/README.md b/libs/cua-driver/hyprland-plugin/packaging/release/README.mdindex 38c590ee2a..c602680896 100644--- a/libs/cua-driver/hyprland-plugin/packaging/release/README.md+++ b/libs/cua-driver/hyprland-plugin/packaging/release/README.md@@ -101,12 +101,12 @@ only two uniquely named archives:- `cua-hyprland-plugin-DRIVER_VERSION-COMMIT_SHA-build-kit.tar.gz`: `PKGBUILD`,`SOURCE-PROVENANCE.json`, operator `README.md`, `lifecycle.py`, and `SHA256SUMS`.-The Driver release workflow generates these assets for stable component tag-builds and publishing dispatches, with the same source override as the native-Driver builds. The tag and committed Cargo version must match that source.-Nightly and manual build-only runs do not generate plugin release assets.-Recovery of historical tags that contain no bundler produces Driver-only-assets. If a tag contains a bundler but generation fails, publication is blocked.+The Driver release workflow generates these assets for the stable component+tag push, which is also the run that publishes the release, from the same+source as the native Driver builds. The tag and committed Cargo version must+match that source. Nightly and manual build-only runs do not generate plugin+release assets. A source that contains no bundler produces Driver-only assets.+If a tag contains a bundler but generation fails, publication is blocked.Publication waits for this job and includes both archives in the componentrelease checksums. The kit's `SHA256SUMS` remains inside its archive to avoidcolliding with other release assets. Existing output directories are refused.diff --git a/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.py b/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.pyindex ed5655ae2e..97513ca640 100644--- a/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.py+++ b/libs/cua-driver/hyprland-plugin/packaging/release/test_workflow.py@@ -19,27 +19,27 @@ class WorkflowTest(unittest.TestCase):self.assertIn("needs: release-attribution-preflight", self.job)self.assertIn(" if: >-\n"- " inputs.channel != 'nightly' &&\n"- " (startsWith(github.ref, 'refs/tags/cua-driver-rs-v') ||\n"- " (github.event_name == 'workflow_dispatch' && inputs.publish == true))",+ " github.event_name == 'push' &&\n"+ " startsWith(github.ref, 'refs/tags/cua-driver-rs-v')\n",self.job,)- # Every publishing dispatch runs the source job. Manual build-only and- # nightly invocations skip both publication and this stable source job.+ # The stable tag push is the only publishing run and always runs the+ # source job. Manual build-only and nightly invocations skip both.needs, steps = self.release.split(" steps:\n", 1)- self.assertIn("build-hyprland-plugin-source]", needs)- self.assertIn("if: github.event_name == 'workflow_dispatch' && inputs.publish == true", needs)+ self.assertIn(" - build-hyprland-plugin-source\n", needs)+ self.assertIn(+ "if: github.event_name == 'push' && "+ "startsWith(github.ref, 'refs/tags/cua-driver-rs-v')",+ needs,+ )+ self.assertNotIn("inputs.publish", self.workflow)self.assertNotIn("always()", needs)self.assertIn('if [[ "$SHA" != "$TAG_SHA" ]]; then', steps)self.assertIn("python3 .github/scripts/validate_release_versions.py --product driver", steps)def test_source_override_is_checked_and_assets_remain_namespaced(self):self.assertIn("fetch-depth: 0", self.job)- self.assertIn(- "ref: ${{ inputs.source_ref || github.event_name == 'workflow_dispatch' && "- "inputs.publish && format('refs/tags/cua-driver-rs-v{0}', inputs.version) || github.ref }}",- self.job,- )+ self.assertIn("ref: ${{ inputs.source_ref || github.ref }}", self.job)self.assertIn('--repo . --revision "$(git rev-parse HEAD)"', self.job)self.assertIn('--driver-version "$VERSION" --release-assets', self.job)self.assertIn("path: plugin-release-assets/*.tar.gz", self.job)@@ -54,7 +54,7 @@ class WorkflowTest(unittest.TestCase):def test_downloaded_plugin_assets_are_verified_before_checksums_and_publication(self):verify = self.release.index("- name: Verify staged plugin source assets")checksums = self.release.index("- name: Generate SHA256 checksums")- self.assertLess(self.release.index("- name: Download all artifacts"), verify)+ self.assertLess(self.release.index("- name: Download candidate release artifacts"), verify)self.assertLess(verify, checksums)step = self.release[verify:checksums]self.assertIn('test "${#PLUGIN_ASSETS[@]}" -eq 2', step)diff --git a/rfcs/3096-immutable-nightly-release-channels.md b/rfcs/3096-immutable-nightly-release-channels.mdindex 21ccb8d8a5..10def65f06 100644--- a/rfcs/3096-immutable-nightly-release-channels.md+++ b/rfcs/3096-immutable-nightly-release-channels.md@@ -83,8 +83,9 @@ published-version pointers.Release Please owns independent Cua Driver and Lume stable versions in[`release-please-config.json`](../release-please-config.json). Cua Driver's-cross-platform workflow builds candidates on a tag and publishes only after an-explicit dispatch. Lume signs, notarizes, and publishes after a stable tag.+cross-platform workflow builds candidates on a stable tag and publishes from+that same tag run after its automatic desktop E2E gate passes. Lume signs,+notarizes, and publishes after a stable tag.The Driver's fielded Rust update checker accepts any SemVer tag under`cua-driver-rs-v`. The Lume shell installer has historically used a broaddiff --git a/scripts/ci/README.md b/scripts/ci/README.mdindex b5d14b0738..68c7f7281c 100644--- a/scripts/ci/README.md+++ b/scripts/ci/README.md@@ -168,6 +168,18 @@ the tested SHA*, not a certification result or a waiver of the complete stablecandidate matrix. Keep the earlier exact-SHA result and account for eachsubsequent change in the PR review record.+### Automatic release gate++Stable Cua Driver releases need no manual E2E or publish dispatch. The+`cua-driver-rs-v*` tag that Release Please creates starts+`.github/workflows/cd-rust-cua-driver.yml`, which calls the Linux, Windows,+hosted macOS, and standalone-browser E2E workflows through `workflow_call`+against the exact tag SHA. The draft release is published only when those+suites, the builds, and the release artifact checks pass. Nightly builds skip+this gate. The logged-in macOS Lume matrix is not part of the automatic gate;+it remains pre-merge evidence. Manual dispatch of the same workflows stays the+way to certify a pull request candidate.+### Quick development feedback`CI: Cua Driver quick feedback (non-certifying)` runs on relevant pull requestsdiff --git a/scripts/ci/macos/probe-hosted-runner.sh b/scripts/ci/macos/probe-hosted-runner.shindex ce23e98fac..338eeadf77 100755--- a/scripts/ci/macos/probe-hosted-runner.sh+++ b/scripts/ci/macos/probe-hosted-runner.sh@@ -91,7 +91,13 @@ run_with_deadline() {[[ "${GITHUB_ACTIONS:-}" == true ]] || fail "GITHUB_ACTIONS must be true"[[ "${RUNNER_ENVIRONMENT:-}" == github-hosted ]] || fail "runner must be GitHub-hosted"[[ "${CI:-}" == true ]] || fail "CI must be true"-[[ "${GITHUB_EVENT_NAME:-}" == workflow_dispatch ]] || fail "probe must be manually dispatched"+# Only maintainer-controlled events may seed hosted TCC state: a manual+# dispatch, or the stable Cua Driver tag push whose CD run calls this matrix+# as its release gate. Pull request events are never accepted.+if [[ "${GITHUB_EVENT_NAME:-}" != workflow_dispatch ]]; then+ [[ "${GITHUB_EVENT_NAME:-}" == push && "${GITHUB_REF:-}" == refs/tags/cua-driver-rs-v* ]] \+ || fail "probe must be manually dispatched or run by a stable cua-driver-rs tag release gate"+fi[[ "${SOURCE_SHA}" =~ ^[0-9a-fA-F]{40}$ ]] || fail "source SHA must contain 40 hexadecimal characters"[[ -z "${SSH_CONNECTION:-}${SSH_CLIENT:-}${SSH_TTY:-}" ]] || fail "SSH sessions cannot seed or certify hosted TCC state"diff --git a/scripts/ci/macos/run-hosted-rust-e2e.sh b/scripts/ci/macos/run-hosted-rust-e2e.shindex d797501e5e..d5e39c5bff 100755--- a/scripts/ci/macos/run-hosted-rust-e2e.sh+++ b/scripts/ci/macos/run-hosted-rust-e2e.sh@@ -166,8 +166,12 @@ capture_command_output() {[[ "$(uname -s)" == Darwin ]] || fail "requires macOS"[[ "${GITHUB_ACTIONS:-}" == true ]] || fail "requires GitHub Actions"-[[ "${GITHUB_EVENT_NAME:-}" == workflow_dispatch ]] \- || fail "runs only from workflow_dispatch"+# Manual dispatch, or the stable Cua Driver tag release gate. Pull request+# events never seed hosted TCC state.+if [[ "${GITHUB_EVENT_NAME:-}" != workflow_dispatch ]]; then+ [[ "${GITHUB_EVENT_NAME:-}" == push && "${GITHUB_REF:-}" == refs/tags/cua-driver-rs-v* ]] \+ || fail "runs only from workflow_dispatch or a stable cua-driver-rs tag release gate"+fi[[ "${RUNNER_ENVIRONMENT:-}" == github-hosted ]] \|| fail "requires a GitHub-hosted runner"[[ "${RUNNER_OS:-}" == macOS ]] || fail "requires RUNNER_OS=macOS"