fix(ios): read and press deep trees on physical devices through private AX

Merged
KD
3d ago
+199-69

Summary

On a physical iOS device, a screen nested deeper than the AX server's per-request depth limit fails every snapshot tier with kAXErrorIllegalArgument. #4089 fixed this for the Simulator bridge only.

  • The private-AX tier (depth ladder and frontier continuations) uses only XCTest's in-process AX client, so it now also runs on iOS physical devices. tvOS, visionOS, watchOS, and macOS keep the XCTest backends.
  • On a device, AXRuntime reports no app to the runner, so ref presses refused with window-origin-unknown. When the probe proves nothing, the sole XCTest screen, read on main once per snapshot, is now the full-screen proof frame. Placed iPad windows stay derived (#4399).
  • diff --actions no longer says devices lack private AX.
  • .boundedXCTestProbe is now unreachable. Kept; remove here?

Before / after

iPhone 17 Pro Max, iOS 27.2.1, UIKit fixture with a button under 90 nested views:

base b2d4ec051
snapshot   -> COMMAND_FAILED invalid-viewport (ax-rejected: kAXErrorIllegalArgument)

head 6b70a1b3c
snapshot   -> recovered, backend private-ax, viewport 440x956, deep-button @e92 at depth 90
press @e92 -> Tapped @e92 (220, 157); label reads "Tapped 1"

Validation

  • pnpm check:affected --run --head 85bc04bab: passed, exactCommit: true. Swift runner lanes are CI-owned.
  • At 6b70a1b3c (later commits: comments, docs): 109 runner unit tests (iOS 27.2 Simulator), macOS, tvOS, visionOS, watchOS, iOS-device runner builds, and device depths 20 and 150 passed.

Risks:

  • No iPad run. Off the phone idiom the gesture route still needs AXRuntime's proof, so deep ref presses are probably refused, not mis-pressed. Landscape iPhone is refused too.
  • A press right after the first deep capture can get runner_busy.

AI assistance and human review

AI was used to prepare these changes. Human-reviewed by @kdy1.

  • Harness: Claude Code (T3 Code)
  • Model: claude-opus-5-5
  • Reasoning Effort: high

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.