fix(apple-runner): use the CoreDevice tunnel when usbmux lists a phone only by Wi-Fi sync

Merged
TH
2d ago
+184-43

Summary

Closes #4107. A CoreDevice-paired phone can appear in usbmuxd as a Network entry when Finder Wi-Fi sync is enabled. Main dials that entry even when the runner rejects the connection. Treat a Network-only match as unattached for CoreDevice phones so the existing tunnel route takes over. Cabled phones still prefer USB. Devices without CoreDevice can still use their Network entry.

Before / after

For a CoreDevice phone with Wi-Fi sync enabled and no USB cable, base dials the Network entry. Head skips that dial and uses the CoreDevice tunnel. A second user on an iPhone XR restored tap and fill by disabling Wi-Fi sync and unplugging USB.

Validation

  • At 912762c822, the focused usbmux suite passed 12/12. The new CoreDevice case failed on base 2d29b6d6e3 because it dialed the Network entry. A paired test confirms that devices without CoreDevice still dial it.
  • The worker also reported 996 Apple runner tests passing at 912762c822, plus repo guards, CLI help tests, lint, typecheck and XCTest selection.
  • At 3993f4e96d, all 24 help first-screen checks and 12 usbmux tests passed. GitHub validates this head.
  • AlexGodard’s iPhone 17 Pro field report confirmed wireless tap completion with Wi-Fi sync on using a hand-patched 0.21.33. On the PR head, tap and type completion over the tunnel and the same phone’s cabled USB control still need verification.

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