Commit Graph

53 Commits

Author SHA1 Message Date
Michał Pierzchała 19f73c8fe3 ci: fix iOS simulator boot timeout (#845) 2026-06-23 16:24:50 +02:00
Michał Pierzchała bf8d952e21 fix: speed up web snapshots (#842)
* fix: speed up web snapshots

* ci: stabilize iOS simulator smoke boot
2026-06-23 14:13:30 +02:00
Michał Pierzchała c6fd3dc972 test: add live web platform smoke (#832)
* test: add live web platform smoke

* test: harden web smoke cleanup
2026-06-21 13:05:51 +02:00
Michał Pierzchała d05cfc727b feat: manage web backend setup (#833) 2026-06-20 11:44:00 +02:00
Michał Pierzchała d29b86d7b8 fix: report maestro ios runner setup failures (#809) 2026-06-16 16:28:28 +01:00
Michał Pierzchała 963ffc259c refactor: move daemon-shared contracts out of commands (#741) 2026-06-10 14:28:24 +02:00
Michał Pierzchała 645577554a ci: enforce lint and formatting, add warn-only layering guard (#732)
Add a Lint & Format job (oxlint --deny-warnings + new format:check script) and
a warn-only guard that flags imports of src/commands/* from src/daemon and
src/platforms; the guard flips to a hard failure once shared contracts move
out of the commands layer.

https://claude.ai/code/session_01LXZXzxi55sZ11DSyqWyBA2

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-10 10:36:18 +02:00
Michał Pierzchała 0f7187f543 fix: scope source daemon state by worktree (#719)
* fix: scope source daemon state by worktree

* docs: clarify worktree daemon state tradeoffs

* ci: harden Apple runner cache

* chore: keep daemon state helper internal

* ci: validate Apple runner cache restores

* ci: simplify Apple runner cache setup
2026-06-10 10:32:58 +02:00
Michał Pierzchała c2b29d5600 fix: stabilize Maestro replay on iOS (#713)
* fix: stabilize Maestro replay on iOS

* fix: scope iOS runner cleanup to daemon owner

* fix: lease iOS runner ownership per device

* fix: release prepared iOS runner daemon in CI

* fix: inline runner lease release cleanup
2026-06-09 14:12:57 +02:00
Michał Pierzchała 2014cb6873 fix: harden covered snapshot targets (#708)
* fix: block covered snapshot targets

* fix: harden covered snapshot targets
2026-06-08 14:08:52 +02:00
Michał Pierzchała 5c083eacc6 fix: harden iOS replay runner prewarm (#705)
* fix: harden iOS replay runner prewarm

* fix: avoid stale iOS runner during relaunch

* fix: stop stale iOS runner processes

* fix: clean stale iOS runners before startup
2026-06-07 20:37:23 +02:00
Michał Pierzchała ad7b386444 feat: cache iOS runner artifacts during prepare (#688)
* feat: cache ios runner artifacts during prepare

* refactor: deepen ios runner lifecycle

* refactor: generalize apple runner prepare

* refactor: simplify apple runner lifecycle

* fix: clarify runner prepare recovery diagnostics

* refactor: trim apple runner provider surface

* test: simplify runner recovery diagnostics assertion
2026-06-04 15:37:05 -07:00
Michał Pierzchała 7400701857 perf: speed up iOS swipes and harden runner cache (#676)
* perf: speed up ios swipes and harden runner cache

* fix: harden maestro replay smoke tests
2026-06-03 04:59:13 -07:00
Michał Pierzchała 45cfad5cc5 feat: e2e command perf benchmark harness + nightly CI (#630)
* feat: add e2e command perf benchmark harness + nightly CI

Adds scripts/perf, a cheap end-to-end perf benchmark that drives the built
CLI through an ordered Settings tour of ~24 commands for N rounds, on a fully
isolated daemon/state-dir and self-cleaning device, and emits JSON + Markdown
reports. Per-command timing comes from wrapping each batchable command in its
own single-step batch (daemon durationMs) plus wall-clock around the process.

Wires a scheduled + workflow_dispatch CI job (perf-nightly.yml) that reuses the
cached iOS XCUITest runner (setup-apple-replay) and the Android replay host, and
runs the CLI from source via --experimental-strip-types (no dist build).

* refactor(perf): drive the harness CLI via runCmdSync, not spawnSync

Review (P2): repo rule is to spawn processes through src/utils/exec.ts, not
node:child_process directly. Switch the perf harness's invokeCli to runCmdSync
(allowFailure so non-zero exits are recorded as samples) and add a maxBuffer
option to ExecOptions/runCmdSync (snapshot payloads exceed Node's ~1MB default).

* perf(harness): warm the runner after open so the first measured command is clean

The first interaction after open/relaunch pays the one-time iOS XCUITest runner
startup (~10s+ cold) and a per-relaunch first-AX-query settle cost (~4s). That was
landing on the first measured command each round (snapshot -i), inflating it ~10x
vs the next snapshot. Run an untimed warmup snapshot -i after establishSession, after
each round's reset-open, and after every freshRoot relaunch, so no measured command
absorbs runner startup. Noted in the report header.

* refactor(perf): address review + fix Fallow CI

- exec.ts: extract spawnRejectionError + commandCloseFailure helpers, deduping the
  error/close handler clones (Fallow duplication ✗ that surfaced once the maxBuffer
  change pulled exec.ts into the audit scope).
- .fallowrc: exclude scripts/perf/** (non-shipped benchmark tooling, like examples/
  test-app) so its naturally-moderate functions don't trip the complexity gate.
- config.ts: drop unused exports CLI_BIN/DEFAULT_OUT_DIR; add readIntValue so
  --n/--rounds/--warmup report the actual flag + reject non-integers clearly.
- harness.ts: extract toSample(); type sampleError param as CliResult.
- scenario.ts: ScenarioStep is now a discriminated union on execMode (removes step.step!/
  step.args ?? []).
- comment/legend rewords (platform defaults are local-convenience/CI-overridden;
  elements = node count). check:fallow now green; typecheck/lint/unit pass.

* perf(harness): downgrade sample ok when a batch step reports ok:false

Defensive belt-and-suspenders for the Codex review note: stop-only batch already
surfaces a failed step as a top-level failure (caught by invokeCli), but if an
on-error=continue mode ever keeps the batch ok while a step fails, don't silently
count that step as a successful sample — derive ok from the step's own result.ok.
2026-05-31 14:37:59 +02:00
Michał Pierzchała 8e1f8a9f8f perf: lazy load daemon handlers and report bundle size (#608)
* perf: lazy load daemon handlers

* perf: thin command metadata paths

* refactor: isolate platform inventory loading

* refactor: trim lazy loading cleanup

* test: guard daemon routing metadata drift

* ci: report startup timing with size
2026-05-30 16:49:21 +02:00
Michał Pierzchała 3283e5e3e5 ci: skip core CI for docs-only PRs (#619) 2026-05-30 15:38:50 +02:00
Michał Pierzchała 0932ad56a7 ci: publish MCP registry metadata (#627) 2026-05-30 15:38:06 +02:00
Michał Pierzchała 5083d04560 ci: stop waiting for preview pages build (#607) 2026-05-28 17:24:35 +02:00
Michał Pierzchała b2a39d2368 ci: gate PR preview builds (#603)
* ci: gate PR preview builds

* ci: include setup action in preview trigger
2026-05-28 17:10:44 +02:00
Michał Pierzchała 233df070f1 ci: skip platform smoke for docs-only PRs (#604) 2026-05-28 17:06:51 +02:00
Michał Pierzchała 7a2428e5e2 ci: reduce duplicated runner work (#602) 2026-05-28 15:57:58 +02:00
Michał Pierzchała 47b981c8ad feat: add gesture command coverage (#576)
* feat: add gesture command coverage

* fix: align iOS fling provider fixture

* feat: group gesture commands

* fix: clarify android gesture support

* feat: add android multitouch gestures

* fix: address gesture review feedback

* refactor: simplify gesture plumbing

* fix: keep gesture subcommands internal

* fix: update iOS provider pan transcript
2026-05-22 18:01:58 +02:00
Michał Pierzchała 840bef56ca fix: tighten env var surface (#560) 2026-05-19 17:11:31 +02:00
Michał Pierzchała 094c290703 perf: speed up iOS replay runner (#557)
* perf: speed up iOS replay runner

* fix: harden ios replay fast paths

* fix: address ci validation failures

* refactor: trim unused ios replay surface
2026-05-19 11:36:48 +02:00
Michał Pierzchała 59d28e8446 refactor: add provider-first device lab tests (#542)
* refactor: add provider-first device lab tests

* refactor: tighten device lab provider seams

* test: cover provider lab contracts

* docs: record device lab harness direction

* ci: run device lab integration tests

* test: move device lab under integration

* test: extract device lab helpers

* refactor: centralize apps filter defaults

* test: drop lab-covered unit tests

* test: fold platform happy paths into device lab

* test: reuse device lab helpers

* test: move device lab to in-process harness

* test: replace session handler cases with device lab

* test: harden device lab scenario contracts

* docs: define unit test retention policy

* test: expand provider device lab coverage

* test: harden provider device lab coverage

* test: cover manifest install and runner session contracts

* chore: remove unused provider cleanup code

* test: split android find device lab scenario

* test: track provider lab architecture progress

* test: clarify provider lab roadmap progress

* test: advance provider lab session coverage

* test: move menubar click routing to device lab

* test: move menubar snapshots to device lab

* refactor: centralize screenshot flag plumbing

* refactor: colocate screenshot flag metadata

* test: cover all public commands in device lab

* test: move macos wait success to device lab

* test: drop redundant perf and diff units

* test: move push payload paths to device lab

* test: move network parsing to device lab

* test: move log cleanup to device lab

* test: move log restart and boot to device lab

* test: move ios physical boot to device lab

* test: cover perf startup in device lab

* test: extract android and ios device lab worlds

* test: trim device lab world surface

* test: split snapshot capture unit coverage

* test: deepen device lab coverage and trim handler units

* test: clean up device lab migration scaffolding

* test: report device lab public command coverage

* refactor: make Apple provider seams semantic

* refactor: tighten device inventory and Linux provider seams

* refactor: tighten request provider scoping

* refactor: add semantic macos host provider

* test: broaden device lab find coverage

* test: cover workflow flags in device lab

* refactor: promote linux input provider seam

* test: clarify device lab flag coverage

* test: classify snapshot force-full progress

* test: enforce device lab progress in ci

* test: stabilize device lab ci

* test: move packaged metro smoke to integration

* test: drop stale provider seam coverage

* test: harden provider scope regression coverage

* refactor: remove stale platform barrels

* refactor: keep linux clipboard and screenshots semantic

* refactor: move macos host tools behind provider

* fix: honor remote artifact output paths

* test: deepen runtime coverage for daemon and runner paths

* test: share loopback test helpers

* refactor: make daemon runtime importable

* fix: honor replay target metadata

* chore: tighten final device lab quality gates

* test: share device lab setup helpers

* test: remove generic apple lab fallback

* test: deduplicate device lab helpers

* chore: tighten fallow duplication signal

* refactor: share apple diagnostic helpers

* fix: detect active android ime during fill verification

* test: consolidate provider-backed integration suite

* ci: fix fallow and iOS smoke setup

* chore: consolidate cleanup after ci fixes

* test: split vitest unit and integration projects

* docs: mention MCP discovery metadata

* docs: add agent skills context pointers

* fix: close provider recording coverage gaps

* fix: restore mcp compatibility smoke

* test: cover provider edge regressions

* test: consolidate loopback helpers

* docs: remove stale provider routing reference

* fix: harden final provider review issues

* chore: defer mcp cleanup from provider refactor
2026-05-18 14:50:52 +02:00
Michał Pierzchała c1550721ce fix: collapse Android snapshot row noise (#545)
* fix: collapse Android snapshot row noise

* docs: clarify agent-facing snapshot text

* fix: preserve semantics when collapsing Android snapshots

* fix: trim redundant Android collapse hints

* fix: collapse passive Android duplicate children

* refactor: drop unused Android snapshot hint code

* docs: clarify Android Metro verification guidance

* test: cover Android Metro reverse planning

* test: fix codex skillgym runner

* fix: satisfy fallow snapshot checks

* docs: clarify PR validation guidance
2026-05-15 18:52:11 +02:00
Anupam Chugh a90642544d feat: support precise location settings (#491)
* feat: support precise location settings

* fix: address location settings review

* chore: refresh fallow baselines for location settings

* fix: clean up location settings dispatch

---------

Co-authored-by: anupamchugh <anupamchugh@gmail.com>
Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-05-12 12:07:59 +02:00
Michał Pierzchała 3fee9d6d86 fix: cache Android snapshot helper installs (#470) 2026-04-28 18:29:10 -04:00
Michał Pierzchała 5260ac8edd fix: harden Node runtime cleanup (#457)
* fix: harden node runtime cleanup

* fix: propagate command cancellation

* fix: address runtime cleanup review

* fix: close partial artifact writes before cleanup
2026-04-27 17:19:08 -04:00
Michał Pierzchała d77a9211ab feat: add Android snapshot helper (#454)
* feat: add android snapshot helper

* fix: harden android snapshot helper packaging

* fix: harden android xml attribute parsing

* fix: capture android helper window roots

* fix: validate android helper install args

* fix: harden android helper manifest and traversal

* refactor: drop unused helper timeout parameter

* feat: bundle android snapshot helper in npm package

* feat: enable bundled android snapshot helper by default

* refactor: simplify android snapshot helper resolution

* fix: harden android snapshot helper artifacts

* refactor: split android snapshot helper modules

* fix: use type-only snapshot helper imports
2026-04-27 16:01:37 -04:00
Michał Pierzchała f07e82e308 chore: add fallow quality gate (#449)
* chore: add fallow quality gate

* fix: refresh pnpm lockfile
2026-04-26 13:53:35 -04:00
Michał Pierzchała 3c8cbcbcfc build: allow manual iOS runner release workflow (#421) 2026-04-17 10:11:45 +02:00
Michał Pierzchała 8bc9d34576 build: fix release workflow temp path expressions (#419) 2026-04-16 18:28:08 +02:00
Michał Pierzchała 4bc6443605 build: publish iOS simulator runner release assets (#418)
* build: publish iOS simulator runner release assets

* build: switch iOS runner release asset to tar.gz

* build: resolve iOS runner from xctestrun metadata
2026-04-16 18:15:44 +02:00
Michał Pierzchała 8f7375f788 ci: remove redundant Linux validation and fix unit hang (#411)
* ci: remove redundant linux validation job

* test: add bridge scope to packaged metro smoke
2026-04-15 13:01:09 +02:00
Michał Pierzchała 60e23b0b32 ci: reduce e2e retries in workflows (#367) 2026-04-07 20:50:18 +02:00
Michał Pierzchała caf0e834b8 feat: add Linux desktop automation support via AT-SPI2 (#356)
* feat: add Linux desktop automation support via AT-SPI2 (Phase 1+2)

Add Linux as a first-class platform using AT-SPI2 accessibility framework
via node-gtk for accessibility tree snapshots. This mirrors the macOS
desktop automation approach using accessibility snapshots.

New files:
- src/platforms/linux/atspi-bridge.ts: Core AT-SPI2 bridge using node-gtk
  with lazy loading, recursive tree traversal (max 1500 nodes, depth 12)
- src/platforms/linux/role-map.ts: AT-SPI2 role normalization (~100 roles
  mapped to existing snapshot type conventions)
- src/platforms/linux/snapshot.ts: Snapshot entry point with surface,
  scope, depth, and interactive-only filtering support
- src/platforms/linux/devices.ts: Local device discovery for Linux
- src/platforms/linux/node-gtk.d.ts: Type declarations for node-gtk

Integration:
- Extended Platform type with 'linux', backend union with 'linux-atspi'
- Wired snapshot into dispatch.ts and snapshot-capture.ts
- Added Linux device discovery to dispatch-resolve.ts
- Added stub interactor (input actions deferred to Phase 3)
- Added 'linux' to CLI --platform flag
- node-gtk added as optional dependency (only installs on Linux)

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* refactor: code review cleanup for Linux platform support

- Extract SnapshotBackend type alias to replace repeated string union
  across 5 files (snapshot.ts, snapshot-capture.ts, session-replay-heal.ts,
  interaction.test.ts)
- Remove duplicate scope/interactive/depth filtering from
  linux/snapshot.ts — let the existing buildSnapshotState pipeline handle
  it, same as Android
- Extract isDesktopBackend() helper in snapshot-capture.ts to consolidate
  the "skip mobile semantics" pattern for macos-helper and linux-atspi
- Collapse 17 repetitive throw statements in Linux interactor stubs
  into a linuxStub() factory function

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* feat: Linux input synthesis, screenshots, and app lifecycle (Phase 3+4)

Add xdotool/ydotool input actions (tap, swipe, scroll, type, fill,
right/middle click, long press, double click), screenshot capture via
grim/scrot, and app lifecycle management (open, close, back, home).
Wire Linux interactors with real implementations and fix device
discovery order so Linux doesn't displace Android in auto-selection.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* refactor: consolidate Linux env detection, simplify input actions

- Extract linux-env.ts with cached display server + input tool detection
  so every action avoids repeated `which` lookups
- Add moveTo/clickButton/sendKey helpers to eliminate repeated
  mousemove boilerplate across 5 mouse actions
- Make scrollLinux respect amount/pixels options instead of hardcoded
  scroll count
- Have backLinux/homeLinux reuse sendKey instead of duplicating tool
  detection

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* feat: add Linux CI smoke test with Xvfb and AT-SPI2

Add GitHub Actions workflow that boots a virtual X11 display (Xvfb),
installs AT-SPI2 accessibility tooling and xdotool, opens
gnome-calculator, takes screenshots, and captures an accessibility
snapshot. Screenshots are uploaded as artifacts for visual verification.

Also adds 'linux' to replay script metadata platforms and a
test:replay:linux script to package.json.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: remove pre-session screenshot from Linux replay test

The replay runner requires an active session before any commands can
run. Move the screenshot after the open command that creates the
session.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: Linux CI — add missing node-gtk build deps and AT-SPI2 env

- Add gobject-introspection, libcairo2-dev, build-essential for
  node-gtk native compilation
- Split AT-SPI2 registry start into its own step so it picks up
  DBUS_SESSION_BUS_ADDRESS from GITHUB_ENV
- Set GTK_A11Y=atspi, GTK_MODULES=gail:atk-bridge, NO_AT_BRIDGE=0
  to ensure GTK apps expose their accessibility tree on headless CI
- Set GSETTINGS_BACKEND=memory to avoid dconf failures
- Add node-gtk verification step to catch build failures early

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: explicitly rebuild node-gtk native module in Linux CI

pnpm install silently skips failed optional dependency builds and
the pnpm cache may not include the native binary. Force a rebuild
after install to ensure the node-gtk .node binding is compiled
against the system GI/cairo headers.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: use node-pre-gyp directly to build node-gtk from source

pnpm rebuild doesn't trigger node-pre-gyp properly for optional deps.
Run node-pre-gyp install --fallback-to-build --update-binary directly
inside the node-gtk package directory to force compilation when no
prebuilt binary exists for the current Node ABI (v127 / Node 22).

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* refactor: replace node-gtk with Python subprocess for AT-SPI2

node-gtk is a native C++ addon that requires compilation against
specific Node ABI versions and GObject Introspection headers. This
proved unreliable on CI (no prebuilt binaries for Node 22 ABI v127,
silent optional dep build failures, pnpm cache staleness).

Replace it with a Python helper script (atspi-dump.py) that uses
PyGObject — the reference GObject Introspection consumer. python3-gi
is trivially installable on any Linux distro with no compilation step.
The Node bridge spawns `python3 atspi-dump.py` and parses JSON output.

- Remove node-gtk from optionalDependencies
- Remove node-gtk.d.ts type stub
- Add atspi-dump.py (~200 lines) doing the same tree traversal
- Rewrite atspi-bridge.ts to use subprocess instead of in-process GI
- Simplify CI workflow: no more native build deps or rebuild steps

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* chore: drop pre-installed packages from Linux CI apt-get

python3-gi, gir1.2-atspi-2.0, at-spi2-core, and dbus-x11 are already
present on Ubuntu GitHub Actions runners.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* feat: surface support for Linux, unit tests, stronger CI assertions

- Allow --surface desktop and --surface frontmost-app on Linux
  (previously only macOS could use --surface)
- Add unit tests for atspi-bridge (9 tests: JSON parsing, role
  normalization, null coercion, error handling, arg forwarding)
- Add unit tests for role-map (3 tests: common roles, case
  normalization, PascalCase fallback)
- Improve .py script path resolution (walk upward instead of
  hardcoded relative paths)
- CI replay test now asserts snapshot contains calculator UI
  nodes via is-exists

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* docs: add cross-platform snapshot traversal contract

Document the shared schema, traversal rules, surface semantics, and
normalized role types that all snapshot backends (Swift, Python,
Android) must conform to. This serves as the single source of truth
when adding or modifying platform backends.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: update lockfile after removing node-gtk optional dependency

pnpm-lock.yaml still referenced node-gtk after it was removed from
package.json, causing pnpm install --frozen-lockfile to fail in CI.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: address review findings in Linux platform code

- atspi-dump.py: use ctx dict for traversal limits instead of globals,
  fix rect filter (width/height <= 0 should use `or`), add surface validation
- input-actions.ts: make sendKey scancodes required to prevent silent
  no-op on ydotool, fix ydotool longPress/swipe to use click --down/--up
- app-lifecycle.ts: use pkill -x (exact match) instead of pkill -f
- linux-env.ts: emit diagnostic warning when falling back to xdotool on Wayland

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix(ci): explicitly install all Linux a11y dependencies

Ubuntu runners may not have at-spi2-core, python3-gi, gir1.2-atspi-2.0,
or dbus-x11 pre-installed. Install them explicitly instead of assuming
they exist. Also make the verify step's tree dump non-fatal since no
apps are running at that point.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: quote multi-word role value in Linux smoke test selector

The selector parser tokenizes on whitespace, so `role=push button`
was split into two tokens causing a parse failure. Use single quotes
inside the selector: `role='push button'`.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: use valid selector keys in Linux smoke test

appName is not a valid selector key. The supported keys are: id, role,
text, label, value, visible, hidden, editable, selected, enabled,
hittable. Simplified to use label and role only.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* chore: cleanup pass — menubar warning, fix contract doc example

- snapshot.ts: emit diagnostic warning when menubar surface is
  requested on Linux (falls back to desktop silently otherwise)
- SNAPSHOT_CONTRACT.md: fix unmapped role example to use a role
  that isn't actually mapped (was "color chooser" which maps to Dialog)

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* chore: add Python bytecache to gitignore

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* feat: harden Linux platform — capability matrix, CI, error handling

P0: Add explicit Linux capability matrix with 3-way platform routing
(Apple/Linux/Android) in isCommandSupportedOnDevice. Linux now correctly
blocks unsupported commands (clipboard, rotate, scrollIntoView, etc.)
at capability level rather than throwing at runtime. Includes tests.

P0: Expand Linux CI to run typecheck + unit tests before smoke tests.
Add AT-SPI2 registry health probe with fail-fast on missing registry.

P1: Harden atspi-dump.py — arg parsing now produces JSON errors on bad
int values, and a top-level catch wraps unexpected exceptions in JSON.

P1: Add 10s per-action timeout to xdotool/ydotool input commands to
prevent indefinite hangs.

P1: Tighten smoke test selectors to calculator-specific signals
(digit labels) instead of generic role='push button'.

P2: Document Linux surface mapping, supported commands, and known
limitations in SNAPSHOT_CONTRACT.md.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: apply depth/interactive filtering to Linux snapshots

Linux snapshots were bypassing snapshotInteractiveOnly and snapshotDepth
filtering that macOS-helper gets via shapeDesktopSurfaceSnapshot. Route
Linux through the same function so snapshot -i and --depth flags work.

Renamed shapeMacOsSurfaceSnapshot → shapeDesktopSurfaceSnapshot since
it's now shared between macOS and Linux desktop backends.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* fix: address review findings — error reporting, Wayland, timeout

- app-lifecycle.ts: emit diagnostic on fire-and-forget app launch
  failure instead of silently swallowing errors
- linux-env.ts: make xdotool on Wayland a hard error instead of
  a broken fallback (xdotool doesn't work on Wayland)
- atspi-bridge.ts: increase Python subprocess timeout from 15s to
  30s for safety on slow/loaded systems with large a11y trees

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* feat: appName/windowTitle selectors, clipboard, input-action tests

Selectors:
- Add appname and windowtitle as selector keys for desktop platforms.
  Both macOS and Linux snapshots already populate these fields — now
  they're usable in selector expressions (e.g., "label=OK appname=Calc").
  Keys are case-insensitive.

Clipboard:
- Implement readLinuxClipboard/writeLinuxClipboard using xclip/xsel
  (X11) or wl-copy/wl-paste (Wayland) with descriptive TOOL_MISSING
  errors. Enable clipboard in Linux capability matrix. 7 unit tests.

Input action tests:
- Add 18 unit tests covering xdotool and ydotool code paths: press,
  right/middle click, double click, sendKey, type, scroll, swipe,
  focus, fill. Tests mock runCmd and verify correct tool + args.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

* chore: cache tool detection for screenshot/clipboard, extract get_app_info helper

Avoid repeated `which` calls on every screenshot/clipboard operation by
caching the resolved tool on first use, matching the input-action pattern.
Extract duplicated app_name/pid retrieval in atspi-dump.py into get_app_info.

https://claude.ai/code/session_01H9hrmueNF5pcBM8JeX81mT

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-04 13:14:04 +02:00
Michał Pierzchała 95f8071696 test: drop continue-on-error from CI jobs 2026-03-30 12:03:47 +02:00
Michał Pierzchała 497a54deb7 test: expand replay coverage and CI reporting with JUnit (#317)
* test: add benchmark .ad scripts for iOS and Android (02-06)

Add 10 new replay scripts covering deep navigation, scroll discovery,
text input & keyboard, app lifecycle, and swipe gestures for both
iOS simulator and Android emulator. Each script combines multiple
command types (snapshot, click, wait, is, find, get, scroll,
scrollintoview, swipe, back, home, keyboard, screenshot, appstate)
to provide comprehensive baseline coverage for version-over-version
comparison.

https://claude.ai/code/session_01VkHLzVc7NULQFaWHnhuBCm

* test: move replay benchmarks out of CI suite

* test: trim replay benchmark script comments

* test: relaunch replay app opens

* fix: stop focusing iOS simulator for screenshots

* fix: open Simulator app on cold boot

* test: trim iOS cold boot coverage

* test: move replay benchmarks into integration suites

* ci: align Android emulator with local setup

* ci: raise iOS replay daemon timeout

* test: add replay junit reports

* ci: use supported Android emulator profile

* fix: stabilize replay cleanup and Android CI flows

* test: trim flaky replay coverage

* fix: exclude replay tests from daemon request timeout

* test: relax android scroll discovery replay

* refactor: rename ios simulator app opener

* ci: remove obsolete android replay timeout override

* test: remove duplicate android replay opens

* test: relax ios swipe replay assertion

* ci: move full replay suites to nightly

* ci: extract shared replay workflow setup

* ci: fail nightly replay jobs on test errors

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-30 11:45:49 +02:00
Michał Pierzchała d5cbec08fc [codex] Speed up Apple CI jobs (#305)
* perf: speed up apple ci jobs

* chore: address ci review feedback

* chore: unify apple runner build scripts
2026-03-27 17:51:13 +01:00
Michał Pierzchała f984a655ce chore: add CI replay retries (#308) 2026-03-27 17:45:42 +01:00
Michał Pierzchała 9eb0604065 refactor: migrate session.ts orchestrator to vitest + drop node:test (#284) (#302)
Remove all test-only DI parameters from handleSessionCommands (signature
drops from ~30 params to 5: req, sessionName, logPath, sessionStore,
invoke) and from the remaining sub-handlers (session-inventory,
session-observability, session-replay, session-close, session-state).

Migrate all 89 remaining node:test unit test files to vitest. Tests that
passed DI overrides now use vi.mock instead. Update vitest.config.ts to
include *.test.ts alongside *.vitest.ts, and remove the dual-runner
node --test from package.json scripts.

Add a permanent CI lint guard that fails if optional typeof DI seams
reappear in production code.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:39:59 +01:00
Michał Pierzchała aae1771c54 refactor: remove JS test wrappers, run .ad replays directly on CI (#299)
* refactor: remove JS test wrappers, run .ad replay suites directly on CI

The platform JS test files (ios.test.ts, android.test.ts, macos.test.ts)
were thin wrappers that shelled out to `agent-device test` and asserted
on JSON counts. Since the CLI already exits non-zero on failure, the
wrappers added no value. CI now invokes the replay suites directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add local replay entrypoints and restore physical device test

- Add pnpm scripts for each replay suite (test:replay:ios,
  test:replay:ios-device, test:replay:android, test:replay:macos)
  so local runs still exercise platform replays
- Restore physical-device iOS replay step in CI workflow
  (conditional on IOS_UDID variable)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:24:07 +01:00
Michał Pierzchała 7100fc5920 feat: add macOS desktop snapshot surfaces (#258)
* feat: add macOS desktop snapshot surfaces

* fix: tighten macos desktop surface routing

* refactor: harden macos helper snapshot traversal

* fix: scope frontmost macos snapshots to visible windows
2026-03-25 15:10:52 +01:00
Muhammad Mugni Hadi b79bd86017 fix: remove trailing commas in Swift for Xcode <16.3 compatibility (#186)
* fix: remove trailing commas in Swift for Xcode <16.3 compatibility

Remove trailing commas from function/initializer argument lists in the
iOS XCUITest runner Swift source files. SE-0439 trailing commas in
comma-separated lists require Swift 6.1+ (Xcode 16.3+), but the runner
is compiled locally by users who may have older Xcode versions.

Users with Xcode 16.2 (Swift 6.0.3) encounter build failures:
  error: unexpected ',' separator

This causes the runner to never start, surfacing as:
  Error (COMMAND_FAILED): Runner did not accept connection (simctl spawn)

Files fixed (12 trailing commas removed):
- RunnerTests+Snapshot.swift (5)
- RunnerTests+Transport.swift (2)
- RunnerTests+CommandExecution.swift (1)
- RunnerTests+ScreenRecorder.swift (2)
- RunnerTests.swift (2)

Verified: pnpm build:xcuitest passes (TEST BUILD SUCCEEDED).

* ci: guard iOS runner trailing-comma syntax

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-03-06 15:40:18 +01:00
Michał Pierzchała e3b1aa6892 CI: add manual iOS runner prebuild cache for iOS job (#50)
* ci: add manual iOS runner prebuild cache for iOS workflow

* ci: simplify manual iOS prebuild workflow

* ci: pin cache actions in iOS workflows

* ci: fix iOS workflow env paths for parser compatibility

* ci: increase daemon timeout for iOS boot preflight

* ios: harden simulator state timeout and reuse preflight session

* ci: remove redundant iOS boot preflight step

* ios: retry transient simctl launch failures on simulator

* ci: pin iOS integration test target to resolved 26.2 simulator

* ci: harden iOS prebuild cache keys and remove derived-data copy path

* ci: simplify iOS workflow caching and drop redundant prebuild workflow

- Remove standalone ios-runner-prebuild.yml (redundant — ios.yml builds on cache miss)
- Switch from actions/cache/restore to actions/cache (auto-saves on miss)
- Drop restore-keys and -stable suffix (no longer needed without prebuild workflow)
- Remove UDID resolution step (test falls back to --platform ios)
- Use point-free shouldRetry for isTransientSimulatorLaunchFailure

Co-authored-by: Cursor <cursoragent@cursor.com>

* ios: increase simctl launch retry budget for CI simulators

SpringBoard can take several seconds after boot to accept app launches.
Increase from 3 attempts / 500ms–2s to 5 attempts / 1s–5s to give CI
simulators enough time.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ios: use deadline-based retry for simulator app launch

The fixed-attempt retry (5 attempts, ~12s window) is too short for CI
simulators where SpringBoard needs 30-60s after boot to accept app
launches — especially when the build step is cached and provides zero
warm-up time.

Switch to a deadline-based approach matching ensureBootedSimulator:
- Default 30s timeout (configurable via AGENT_DEVICE_IOS_APP_LAUNCH_TIMEOUT_MS)
- CI sets 60s to handle cold-boot scenarios
- maxAttempts set high (30) so the deadline is the real limit

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci(ios): keep tests platform-based and stabilize simulator selection

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 18:47:39 +01:00
Michał Pierzchała 3ddd3a1ef5 Complete issue #39 boot diagnostics, telemetry, and boot command (#46)
* Complete issue #39 phase diagnostics telemetry and boot command

* Address review findings for boot diagnostics and command gating

* Use agent-device boot preflight in iOS CI workflow

* Run iOS boot preflight via source CLI in CI
2026-02-12 15:00:27 +01:00
Michał Pierzchała 835b59f9f6 Improve integration failure diagnostics (#40) 2026-02-12 09:53:02 +01:00
Michał Pierzchała 8c50cee10d chore: use macos-26 runner for ios integration test; ubuntu for smoke (#34)
* chore: use macos-26 runner for ios integration test; ubuntu for smoke

* revert smoke test

* update test for iOS 26.2

* restart sim after timeout

* fixup timeout
2026-02-10 10:41:08 +01:00
Michał Pierzchała 8e88eb552a fix: android race condition for snapshot dump (#33)
* fix: android race condition for snapshot dump

* ci

* split workflows

* udpate names
2026-02-09 20:54:13 +01:00