Skip to content

feat(simulator): Support Xcode 27 Device Hub automation#61

Merged
cameroncooke merged 31 commits into
mainfrom
codex/xcode-27-support
Jul 16, 2026
Merged

feat(simulator): Support Xcode 27 Device Hub automation#61
cameroncooke merged 31 commits into
mainfrom
codex/xcode-27-support

Conversation

@cameroncooke

@cameroncooke cameroncooke commented Jul 16, 2026

Copy link
Copy Markdown
Owner

AXe now supports simulator automation through both Xcode 26 and Xcode 27 Device Hub from the same release artifact. The selected Xcode toolchain and matching simulator runtime are resolved at execution time, while build and release provenance records exact toolchain identifiers without restricting users to specific beta builds.

The integration consumes a full-SHA-pinned AXe IDB fork rather than applying local patches during builds. Xcode 27 input uses the compatible private-framework transport, accessibility and HID sessions recover from simulator or Device Hub disconnects without replaying ambiguous touch requests, and CLI failures expose actionable public errors instead of internal simulator-set details. The release and E2E pipelines were updated around that compatibility contract, with manual Xcode 26/27 CLI compatibility captures retained as review evidence rather than mandatory PR regression fixtures.

The main review risk is lifecycle handling around the private accessibility and HID transports: broker startup is coordinated per simulator/toolchain, stale sessions are replaced before request commitment, and transient Xcode 27 accessibility root responses are retried only when they match the observed empty full-screen placeholder. The full Xcode 27 Device Hub E2E matrix completed with 127 passes, 7 expected landscape-gated skips, and no failures; the simulator-independent suite completed 213 tests with no failures.


Note

High Risk
Touches security-sensitive local Unix sockets, concurrent broker lifecycle, and private Xcode/simulator frameworks across auth-adjacent HID and accessibility paths; mis-handling could cause stuck input, wrong retries, or fragile releases.

Overview
This PR retargets AXe for Xcode 26 and 27 (including Device Hub) from one release binary by building IDB from a full-SHA-pinned fork instead of applying local patches, and by wiring SwiftPM compile-only IDB private headers into Package.swift.

Simulator I/O moves off FBFuture bridging: HID uses the fork’s async APIs and a new Unix-socket hid-broker (hidden CLI) so touch down/up and delays are ordered without ambiguous replays after disconnects; endpoints are keyed by Xcode + simulator, with startup locks, boot-identity checks, and DTUHID readiness waits. Accessibility is rewritten around explicit element serialization, testmanagerd recovery on channel failures, and retries for transient Xcode 27 “full-screen root” point lookups.

CLI commands adopt the new HID event shapes (composite, touch/keyboard/button directions); BGRA streaming honors --fps; errors go through UserFacingError. Release CI bumps Xcode, installs XcodeGen, and refreshes cache keys (Xcode build id + source/pipeline hashes, cached artifact verification); a Test workflow runs unit tests via test-runner.sh. Compatibility goldens document CLI contracts for a validated Xcode 26.5 matrix cell.

Reviewed by Cursor Bugbot for commit 31599ac. Bugbot is set up for automated code reviews on this repo. Configure here.

cameroncooke and others added 29 commits July 15, 2026 11:34
Move AXe to the investigated IDB candidate and preserve the existing command contract across Indigo and DTUHID transports. Add accessibility bootstrap, resilient HID broker recovery, media adaptation, and regression coverage for Xcode 26 and Xcode 27.

Co-Authored-By: Codex <noreply@openai.com>
Store matrix-scoped command, hierarchy, and provenance goldens so release-shaped payloads can be compared across the supported Xcode environments.

Co-Authored-By: Codex <noreply@openai.com>
Build test products with the pinned Xcode 26.5 compiler while targeting the selected simulator runtime. Start Device Hub for Xcode 27 and preserve exact compatibility fixtures during whitespace validation.

Co-Authored-By: Codex <noreply@openai.com>
Pin the release lane to the validated Xcode build and include toolchain, patch, and build-pipeline identities in framework cache keys.

Co-Authored-By: Codex <noreply@openai.com>
Provide a guarded local path for building, validating, packaging, and publishing release artifacts when hosted runners cannot reproduce the Xcode 27 matrix.

Co-Authored-By: Codex <noreply@openai.com>
Record the validated Xcode and simulator builds, the single-payload release model, and the split-toolchain E2E workflow.

Co-Authored-By: Codex <noreply@openai.com>
Build local IDB frameworks with the selected Xcode while keeping release CI on one toolchain. Reuse valid pinned checkouts, recover managed corrupt caches safely, and allow unchanged prebuilt payload validation under another supported Xcode.

Co-Authored-By: Codex <noreply@openai.com>
Describe exact build identifiers as validation provenance, document Device Hub development testing, and explain how to validate one prebuilt release payload across supported Xcode versions.

Co-Authored-By: Codex <noreply@openai.com>
ditto embedded com.apple.provenance xattrs as ._* AppleDouble entries in
the notarization zip. Extracted next to the framework symlinks, they break
the bundle seal and strict Gatekeeper verification rejects the frameworks
with "unsealed contents present in the root directory of an embedded
framework".

Strip metadata files and xattrs in copy_release_payload so every staging
path is covered including cached notarized packages, exclude filesystem
metadata when creating zip and tar archives, reject AppleDouble files in
verify-stage, and exercise the sanitization in the release dry run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
git eagerly spawns an interactive pager for diff commands on a TTY even
when there is no output, so the "git diff --check" in
verify_idb_source_state blocked terminal builds on a blank less screen
whenever the user's LESS value omits the F flag. Export GIT_PAGER=cat so
the script and its children always stream plain git output.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Return success explicitly for E2E no-op paths and report simulator selection failures with useful candidates.

Repair exact pinned managed IDB checkouts locally so dirty immutable caches do not wedge release setup.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Limit automatic recovery to broker startup so a lost response cannot duplicate an already submitted gesture.

Serialize concurrent cold starts and scope broker endpoints to the canonical selected Xcode path.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Document the live Device Hub result beside the composite drag path so future transport work does not mistake a successful send for guest-side delivery.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
The previous note blamed the IDB drag path for reporting successful
sends without delivering touches on Xcode 27 Beta 3 (27A5218g).
Further testing showed the actual cause is the Device Hub's Resize
Mode: with it enabled, both DTUHID and legacy Indigo silently drop
touches; with it disabled, events pass through this path correctly.

Replace the stale limitation comment with the root cause so future
readers know to disable Resize Mode for UI automation. Comment-only
change, no behavior change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Allow custom IDB checkout paths marked as script-managed to be replaced when their cached repository is incomplete. Continue refusing to replace unmarked custom directories.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Preflight broker readiness before writing touch requests so stale simulator sessions can be replaced safely without replaying ambiguous events. Coordinate startup, protect replacement sockets, and wait for Xcode 27 Device Hub readiness after simulator reboot.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Document managed custom IDB checkout recovery and stale HID broker recovery after simulator reboot.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Give AXe-defined errors stable user-facing descriptions across Xcode toolchains. Replace internal simulator terminology with actionable guidance while preserving ArgumentParser help, validation, and exit behavior.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@cameroncooke
cameroncooke marked this pull request as ready for review July 16, 2026 16:46
Comment thread Sources/AXe/Utilities/HIDBroker+Connection.swift
Comment thread Sources/AXe/Utilities/HIDBroker.swift Outdated
Comment thread Sources/AXe/Utilities/HIDBroker.swift
Preserve stable user-facing errors across the broker boundary while retaining raw transport details in diagnostic logging. Make broker readiness errors satisfy the LocalizedError contract and cover both paths with focused tests.

Co-Authored-By: OpenAI Codex <noreply@openai.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7fb9949. Configure here.

Comment thread Sources/AXe/Utilities/Batch/Command+BatchConvertible.swift
Comment thread Sources/AXe/Utilities/HIDInteractor.swift
Document that batch barrier failures propagate without replay and that physical-tap recovery only releases possible held state without repeating touch-down.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
@cameroncooke
cameroncooke merged commit d45fd82 into main Jul 16, 2026
7 checks passed
@cameroncooke
cameroncooke deleted the codex/xcode-27-support branch July 16, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant