refactor(apple-runner): share tap and replacement result construction
Summary
Share the success response for synthesized and XCTest selector taps. Share result construction for the three exits from synthesized text replacement. The readiness wait, witness update, gesture metadata, fallback and timing-log order are preserved.
Value
- Selector-tap success response builders: 2 → 1.
- Synthesized replacement result builders: 3 → 1.
- Combined Swift diff: 36 additions, 59 deletions.
Validation
At c12c7360f61d, frozen install, CLI build, iOS and macOS runner compilation, XCTest selection and diff checks passed. Independent source review found no behavior changes. After marking the PR ready, all 22 hosted checks completed without failures on the same commit, including iOS Simulator smoke and macOS smoke. Cubic and Sentinel reported no findings.
Local Xcode 27.1, iPhone Duo (iOS 27.1), exact head c12c7360f61d. Built the arm64 runner with unit tests enabled and ran xcodebuild test-without-building. XCTest reported 6 tests, 0 failures.
testSelectorTapFallsBackToXCTestCoordinateWhenPrivateSynthesisFailstestSelectorTapOnInputThatLeavesTheTreeOnFocusRecordsNoFailuretestTextInputTapRecoversWhenItsFirstTapDoesNotTakeFocustestSynthesizedReplacementClearsPastDroppedSelectAllstestSynthesizedReplacementPacesAnAppOwnedFieldAtItsAcknowledgeWindowtestSynthesizedReplacementRefusesTextBeyondTheDeliveryBudget
Five Maestro contract tests passed. Live checkout-form.yaml passed on iPhone Duo in one attempt, with 17 steps and zero healed. T3 used client 0.21.41 with an isolated c12c7360f61d daemon, runner and Release fixture.
Request f427ef8ceba9ae5c, step 15 payment-cash: maestro_tap_dispatch reported kind=selector, selectorKey=id. Runner resolved the ID, synthesized the tap and returned ok=1. Step 16 confirmed it was selected. No point dispatch or direct-selector fallback occurred during that tap. The correlated logs identify maestro-direct-selector. Maestro does not expose the nested response fields.
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.