NJ-131 fix(ios): preserve session on AX snapshot failure
Closed
BU
5mo ago+623+623+012345678901234567890123456789-33-33-01234567890123456789
Summary
- catch Swift errors and Objective-C exceptions around iOS XCTest snapshot root capture, classify kAXErrorIllegalArgument as IOS_AX_SNAPSHOT_FAILED, and preserve the runner session
- retry app-root AX failures from shallow fallback roots and surface partial snapshot warnings through daemon/client output
- route simple iOS find id/label/text/value click through direct runner selector lookup before the full snapshot path
- document the scoped implementation vs. Maestro/Appium behavior in docs/adr/0003-ios-ax-snapshot-failure.md
Verification
- pnpm test:unit -- src/platforms/ios/tests/runner-client.test.ts src/platforms/ios/tests/runner-session.test.ts src/daemon/handlers/tests/snapshot-handler.test.ts src/daemon/handlers/tests/find.test.ts src/daemon/handlers/tests/interaction.test.ts (ran full unit suite: 1,940 passing)
- pnpm check:quick
- pnpm build:xcuitest:ios
- pnpm build
Manual QA
- Not run: no local iOS app fixture/simulator screen that reproduces kAXErrorIllegalArgument in this workspace. The runner build and regression tests cover typed error preservation, warning propagation, and direct find-click routing.