Skip to content

v1.16.0: macOS 26.x recording-unblock

Choose a tag to compare

@carloshpdoc carloshpdoc released this 15 May 16:54
· 20 commits to main since this release

The macOS 26.x recording-unblock release. Single feature, single day.

What this fixes

`xcrun xctrace record --time-limit Ns` against iOS simulator targets is broken on macOS 26.x (documented in v1.14). The recording wedges past the time limit, exits when SIGKILL fires, and the resulting `.trace` is missing template metadata. `recordTimeProfile` returns `recordingTimedOut: true` and the auto-open-Instruments / pre-flight UX paths landed in v1.14 mitigate the user experience but the actual automated recording remained blocked.

What v1.16 ships

  • `recordViaInstrumentsApp` MCP tool (41st, `[mg.build]`). The escape hatch. Flow:

    1. Opens Instruments.app via `open -a Instruments` (fire-and-forget).
    2. Returns an `instructions[]` array telling the user which template to pick, when to hit Record / Stop / Save, and which directory to save into (configurable `watchDir`).
    3. Polls `watchDir` every 5 seconds for new `.trace` bundles.
    4. Treats a new bundle as "saved" when its mtime has been stable for 10 seconds.
    5. On detection, chains into `inspectTrace` and returns the trace path + schemas + diagnosis.
    6. Times out after `timeoutSec` (default 600s / 10 min, max 3600s).

    Why user-in-loop? Instruments.app's AppleScript surface is minimal: the `document` class exposes `name`, `modified`, `file` properties only - no verbs for start/stop recording or template selection. Documented at `Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/Instruments.sdef`. Full GUI automation is impossible until Apple expands the dictionary.

README + USAGE updates

The macOS 26.x `xctrace record` callout now points at `recordViaInstrumentsApp` as recovery option #1. USAGE.md Troubleshooting list reranked: tool wrapper > older Xcode 26.0 host > manual GUI > physical device > wait for Apple.

Tests + tools

  • Suite: 666 -> 677 (+11). New tests cover `snapshotTracesInDir`, `detectNewTraces` filter + sort, `isStable` mtime check, and `buildInstructions` text generation.
  • MCP tools: 40 -> 41.

Deferred to v1.17+

  • Phase 8 v1.9: dSYM symbolication on `analyzeTimeProfile`.
  • Bet #4: `analyzeMetricKitPayload` (.mxdiagnostic ingest).
  • Marketplace submissions: PulseMCP, MCP.so.

Full diff: `v1.15.0...v1.16.0`