Skip to content

Add AWS Device Farm backend and headless simulator commands#6

Merged
rksm merged 42 commits into
mainfrom
rksm/device-farm-full
Jun 5, 2026
Merged

Add AWS Device Farm backend and headless simulator commands#6
rksm merged 42 commits into
mainfrom
rksm/device-farm-full

Conversation

@rksm

@rksm rksm commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Overview

This branch adds AWS Device Farm Test Grid support to the browser simulator and rounds out the CLI/config surfaces needed to run simulator participants without the TUI.

Implements:

AWS Device Farm backend

  • Adds aws-device-farm as a participant backend kind with device_farm config for project ARN, region, signed URL lifetime, session max duration, idle timeout, and health polling.
  • Uses AWS Device Farm desktop browser testing / Test Grid by creating signed Selenium URLs through aws-sdk-devicefarm, then driving remote Chrome over WebDriver with thirtyfour.
  • Refactors HyperCore/HyperLite frontend automation behind a driver-agnostic BrowserDriver abstraction so Local Chromium and Device Farm WebDriver share the same join/control/state logic.
  • Adds Device Farm session lifecycle handling, WebDriver request URL signing/preservation, state refresh polling, max-duration termination, and best-effort close behavior.
  • Adds focused mock-WebDriver integration tests for session creation, signed URL handling, polling/state publication, health-check failure, and session close helpers.
  • Documents/handles Device Farm limitations, including synthetic fake media only for remote browsers.

AWS subcommand

  • Adds hyper-client-simulator aws list-sessions for the configured Device Farm project, with status filtering, --since, human table output, JSON output, age, and estimated billing totals.
  • Supports absolute --since values (YYYY-MM-DD, local date/time, RFC3339) and human-readable relative durations such as --since "1 day".
  • Adds hyper-client-simulator aws close-sessions to close explicitly listed session IDs or all active sessions when no IDs are provided.
  • Reuses the same device_farm.project_arn, device_farm.region, and signed URL expiration config as the simulator backend.

Headless / no-TUI command

  • Adds hyper-client-simulator headless to run participants directly from the CLI without launching the TUI.
  • Supports global CLI overrides plus repeated --participant JSON overrides for per-participant URL/backend/media/transport/video/headless settings.
  • Adds signal-aware shutdown behavior and headless-specific tests for argument parsing, per-participant overrides, and exit behavior.
  • Adds a run-headless-simulator Codex skill for smoke-testing participant runs from the CLI.

Video constraint support

  • Replaces the old webcam-resolution enum with Hyper media video constraint values (none, 90p, 144p, 240p, 360p, 480p, 720p, 1080p, 1440p, 2160p).
  • Adds publish-webcam and subscribe video constraint settings, plus optional max concurrent video tracks, to config, participant launch specs, participant state, messages, local automation, Cloudflare command/state mapping, remote stub behavior, TUI controls, and the headless CLI.
  • Applies video constraints through the frontend hyper.settings.media API for HyperCore; HyperLite keeps unsupported constraint commands as no-ops.

Supporting changes

  • Adds AWS/Device Farm/WebDriver dependencies and compile-time Device Farm env wiring for CI/release builds.
  • Updates GitHub workflows to provide Device Farm env vars and fetch the private Cloudflare worker submodule with the configured read token.
  • Converts the Cloudflare worker schema source to a git submodule and updates README development notes for submodule setup.
  • Vendors the patched chromiumoxide_cdp crate needed for the current Chrome CDP event shape used by local browser shutdown/request handling.

Validation

  • NIXPKGS_ALLOW_UNFREE=1 nix develop --impure -c just check
    • cargo clippy --all-targets --all-features -- -D warnings
    • cargo nextest run --no-tests warn — 39 root binary tests passed
  • NIXPKGS_ALLOW_UNFREE=1 nix develop --impure -c cargo nextest run -p client-simulator-config — 12 passed
  • NIXPKGS_ALLOW_UNFREE=1 nix develop --impure -c cargo nextest run -p client-simulator-browser --test device_farm_driver — 5 passed
  • git diff --check origin/main...HEAD

rksm added 30 commits May 29, 2026 14:17
Replace webcam resolution configuration with publish and subscribe video constraints plus nullable max concurrent track support across config, browser runtime, headless CLI, TUI, Cloudflare mappings, and generated client artifacts.
@rksm rksm changed the title [codex] Add AWS Device Farm backend and headless simulator commands Add AWS Device Farm backend and headless simulator commands Jun 4, 2026
@rksm rksm marked this pull request as ready for review June 4, 2026 16:13
@rksm rksm merged commit a54389e into main Jun 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant