fix(cua-driver): preserve physical pixels in embedded Windows SDK #2995
Workflow file for this run
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
| name: "CI: Rust Windows unit" | |
| on: | |
| pull_request: | |
| paths: | |
| - "libs/cua-driver/rust/.cargo/**" | |
| - "libs/cua-driver/rust/Cargo.toml" | |
| - "libs/cua-driver/rust/Cargo.lock" | |
| - "libs/cua-driver/rust/crates/cua-driver/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-core/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-sdk/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-testkit/**" | |
| - "libs/cua-driver/rust/crates/cursor-overlay/**" | |
| - "libs/cua-driver/rust/crates/pip-preview/**" | |
| - "libs/cua-driver/rust/crates/platform-windows/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-uia/**" | |
| - "libs/cua-driver/tests/fixtures/**" | |
| - ".github/workflows/ci-rust-windows.yml" | |
| push: | |
| branches: [main] | |
| paths: | |
| - "libs/cua-driver/rust/.cargo/**" | |
| - "libs/cua-driver/rust/Cargo.toml" | |
| - "libs/cua-driver/rust/Cargo.lock" | |
| - "libs/cua-driver/rust/crates/cua-driver/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-core/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-sdk/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-testkit/**" | |
| - "libs/cua-driver/rust/crates/cursor-overlay/**" | |
| - "libs/cua-driver/rust/crates/pip-preview/**" | |
| - "libs/cua-driver/rust/crates/platform-windows/**" | |
| - "libs/cua-driver/rust/crates/cua-driver-uia/**" | |
| - "libs/cua-driver/tests/fixtures/**" | |
| - ".github/workflows/ci-rust-windows.yml" | |
| workflow_dispatch: | |
| inputs: | |
| proxy_idle_seconds: | |
| description: "Idle duration for MCP recovery diagnostic (1-3600 seconds)" | |
| type: number | |
| default: 1 | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-rust-windows-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit: | |
| name: Rust Windows unit and compile | |
| runs-on: windows-latest | |
| timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && inputs.proxy_idle_seconds > 1 && 90 || 30 }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2 | |
| with: | |
| workspaces: "libs/cua-driver/rust -> target" | |
| - name: Record Windows runner session | |
| id: runner-session | |
| shell: pwsh | |
| run: | | |
| $sessionId = (Get-Process -Id $PID).SessionId | |
| "session_id=$sessionId" >> $env:GITHUB_OUTPUT | |
| "Windows runner process session id: $sessionId" | |
| - name: Run Windows Rust tests | |
| working-directory: libs/cua-driver/rust | |
| # Compile every Rust target without executing desktop-dependent integration | |
| # tests; interactive behavior belongs in e2e-rust-windows.yml. | |
| run: cargo test -p cua-driver -p cua-driver-core -p cua-driver-sdk -p cua-driver-testkit -p cursor-overlay -p cursor-theme-cli -p platform-windows -p cua-driver-uia --all-targets --no-run --locked | |
| - name: Run complete desktop-independent core tests | |
| working-directory: libs/cua-driver/rust | |
| run: cargo test -p cua-driver-core --lib --test recording_shutdown_errors --locked | |
| - name: Run deferred text publication regressions | |
| working-directory: libs/cua-driver/rust | |
| run: | | |
| cargo test -p platform-windows post_message_readback_tests:: --lib --locked | |
| if ($LASTEXITCODE -ne 0) { throw "PostMessage read-back tests failed with exit $LASTEXITCODE" } | |
| cargo test -p platform-windows value_write_readback_tests:: --lib --locked | |
| if ($LASTEXITCODE -ne 0) { throw "ValuePattern read-back tests failed with exit $LASTEXITCODE" } | |
| - name: Run pixel click transport regressions | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p platform-windows pixel_click_transport_tests:: --lib --locked" | |
| - name: Run bounded UIA worker regressions | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p platform-windows windows_enum::tests:: --lib --locked" | |
| - name: Run MCP proxy lifecycle regressions | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p cua-driver --bin cua-driver proxy::tests:: --locked" | |
| - name: Run real MCP proxy recovery regression | |
| working-directory: libs/cua-driver/rust | |
| env: | |
| CUA_PROXY_RECOVERY_IDLE_SECONDS: ${{ inputs.proxy_idle_seconds || 1 }} | |
| run: cargo test -p cua-driver --test protocol_proxy_recovery_test --locked -- --nocapture | |
| - name: Test sentinel setup barrier | |
| run: node --test libs/cua-driver/tests/fixtures/apps/cross-platform/electron/preload.test.js | |
| - name: Run named-pipe readiness regression | |
| working-directory: libs/cua-driver/rust | |
| run: cargo test -p cua-driver-testkit stalled_pipe_attempt_is_bounded_and_does_not_block_the_next_probe --lib --locked | |
| - name: Run cross-platform cursor renderer unit tests | |
| working-directory: libs/cua-driver/rust | |
| run: | | |
| cargo test -p cursor-overlay --lib --locked | |
| if ($LASTEXITCODE -ne 0) { throw "cursor renderer tests failed with exit $LASTEXITCODE" } | |
| cargo test -p cursor-theme-cli --locked | |
| if ($LASTEXITCODE -ne 0) { throw "cursor theme compiler tests failed with exit $LASTEXITCODE" } | |
| - name: Run Windows delivery guidance unit tests | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p platform-windows input::delivery::tests:: --lib --locked" | |
| - name: Run Windows installed-app discovery unit tests | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p platform-windows win32::installed_apps::tests:: --lib --locked" | |
| - name: Run Windows app-name lookup tests | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p platform-windows launch_uwp::tests:: --lib --locked" | |
| - name: Run Windows Computer History adapter tests | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p platform-windows history::tests:: --lib --locked" | |
| - name: Validate Windows Computer History uninstall ordering | |
| run: .\libs\cua-driver\scripts\tests\uninstall-windows-history-regression.ps1 | |
| - name: Prove unknown app launch stays bounded and responsive | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p cua-driver --test protocol_tools_call_test launch_unknown_app_is_bounded_and_keeps_mcp_session_responsive --locked -- --exact --nocapture" | |
| - name: Validate desktop AppsFolder launch with Microsoft Edge | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p cua-driver --test protocol_tools_call_test launch_edge_from_apps_folder_registration --locked -- --ignored --exact --nocapture" | |
| - name: Run transport-independent authorization and SDK tests | |
| working-directory: libs/cua-driver/rust | |
| run: | | |
| cargo test -p cua-driver-core session_authorization::tests:: --lib --locked | |
| if ($LASTEXITCODE -ne 0) { throw "session authorization tests failed with exit $LASTEXITCODE" } | |
| cargo test -p cua-driver-sdk abi::tests:: --lib --locked | |
| if ($LASTEXITCODE -ne 0) { throw "SDK ABI tests failed with exit $LASTEXITCODE" } | |
| cargo test -p cua-driver-sdk remote_ --lib --locked | |
| if ($LASTEXITCODE -ne 0) { throw "remote SDK tests failed with exit $LASTEXITCODE" } | |
| cargo test -p cua-driver --bin cua-driver named_pipe_authentication_tests:: --locked | |
| if ($LASTEXITCODE -ne 0) { throw "named-pipe authentication tests failed with exit $LASTEXITCODE" } | |
| # The production binary embeds uiAccess=true and Windows correctly | |
| # refuses to launch it unelevated. Run the same pure security policy | |
| # from the manifest-free library test target. | |
| cargo test -p cua-driver-uia --lib authorization_tests:: --locked | |
| if ($LASTEXITCODE -ne 0) { throw "UIAccess authorization tests failed with exit $LASTEXITCODE" } | |
| cargo test -p platform-windows diagnostics::tests:: --lib --locked | |
| if ($LASTEXITCODE -ne 0) { throw "Windows desktop classification tests failed with exit $LASTEXITCODE" } | |
| - name: Run full SDK unit suite in an interactive runner session | |
| if: steps.runner-session.outputs.session_id != '0' | |
| working-directory: libs/cua-driver/rust | |
| run: cargo test -p cua-driver-sdk --lib --locked -- --test-threads=1 | |
| - name: Prove Session 0 refusal | |
| if: steps.runner-session.outputs.session_id == '0' | |
| working-directory: libs/cua-driver/rust | |
| run: cargo test -p cua-driver-sdk session_zero_refuses_runtime_creation_before_platform_dispatch --lib --locked | |
| - name: Prove metadata commands remain desktop-free | |
| working-directory: libs/cua-driver/rust | |
| run: | | |
| cargo run -p cua-driver --locked -- list-tools | Out-Null | |
| if ($LASTEXITCODE -ne 0) { throw "list-tools failed with exit $LASTEXITCODE" } | |
| cargo run -p cua-driver --locked -- describe click | Out-Null | |
| if ($LASTEXITCODE -ne 0) { throw "describe failed with exit $LASTEXITCODE" } | |
| cargo run -p cua-driver --locked -- dump-docs --type cli | Out-Null | |
| if ($LASTEXITCODE -ne 0) { throw "dump-docs failed with exit $LASTEXITCODE" } | |
| - name: Run Windows browser platform unit tests | |
| working-directory: libs/cua-driver/rust | |
| run: "cargo test -p platform-windows browser_platform::tests:: --lib --locked" | |
| - name: Run Windows protocol schema contract | |
| if: steps.runner-session.outputs.session_id != '0' | |
| working-directory: libs/cua-driver/rust | |
| run: cargo test -p cua-driver --test protocol_schema_test --locked |