fix: harden iOS runner command execution

Merged
TH
9mo ago
+223-21

Summary

Hardened the iOS XCUITest runner command path so transient app instability no longer crashes or restarts the runner during interactions.

  • enabled failure-tolerant XCTest flow (continueAfterFailure = true)
  • added Objective-C exception bridge so XCTest NSException is surfaced as recoverable command errors
  • added liveness and foreground guard before interactions with targeted re-activation
  • added one-shot retry for interaction commands (tap, longPress, drag) on transient failures
  • added post-snapshot and post-activation interaction stabilization delays
  • added shutdown fast-path and bounded main-thread execution timeout

Validation

  • pnpm build:xcuitest
  • pnpm ad open --platform ios RNCLI83
  • pnpm ad snapshot -i --platform ios
  • pnpm ad click @e5 --platform ios
  • 12x stress loop: snapshot -> click (no command failures)
  • inspected ~/.agent-device/daemon.log for run window (no Restarting after unexpected exit / ** TEST EXECUTE FAILED ** markers)