Skip to content

feat(platform-apple): record on watchOS simulators - #4819

Merged
thymikee merged 1 commit into
mainfrom
feat/watchos-simulator-recording
Nov 20, 2026
Merged

thymikee merged 1 commit into
mainfrom
feat/watchos-simulator-recording

Conversation

@thymikee

@thymikee thymikee commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

record was closed on an Apple Watch simulator: the watchOS admission set lists every operation with a watch meaning, and no recording operation was in it. Apple simulator recording is host-side — recording/runtime.ts starts simctl recordVideo for kind: 'simulator' and never uses the runner's recorder, which stays a watchOS stub — so admitting the three recording operations is the whole fix. The finalizer's export target now comes from the simulator's Apple OS instead of a hard-coded iOS recording.

7 files. No Swift runner change, no new backend, no option refusals: every record option works on a watch.

agent-device record start watch.mp4 --session watch   # recordingBackend: simctl recordVideo
agent-device record stop --session watch              # mp4 + gesture telemetry

Validation

Head 9204ec49ca. Local: vitest --project unit-core for packages/platform-apple, packages/command-surface/src/recording, test/repo-guards; check:mcp-metadata; check:command-docs; format; tsc --noEmit. CI owns the full gate.

Device evidence at 9204ec49ca, own simulator AD Watch Recording Verify (Apple Watch Series 11 46mm, watchOS 27.0), branch CLI after pnpm build, pnpm build:xcuitest:watchos, pnpm clean:daemon, isolated --state-dir. Session and simulator deleted after the run. All exits 0:

  • open com.apple.NanoSettings --platform ios --udid <watch> --session adwatch → Opened
  • record start /tmp/ad-watch-recording.mp4 --session adwatch → recordingBackend: simctl recordVideo
  • snapshot -i, scroll down, press 'label="General"' --settle, press 160 200 → Settings tree, Scrolled down, settle diff, Tapped (160, 200)
  • record stop --session adwatch → recorder: confirmed, nativePathDisposition: retired, telemetry sidecar
  • ffprobe /tmp/ad-watch-recording.mp4 → 1.2 MB, h264 416x496, duration=26.2

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

View guided diff Turn on auto-fix

The watch admission set refused every recording operation, so `record` was
closed on an Apple Watch simulator. Simulator recording is host-side: the
Apple runtime starts `simctl recordVideo` for any `kind: 'simulator'` device
and never touches the runner's recorder, which stays a watchOS stub. Admit
screenRecordingStart, screenRecordingReattach, and screenRecordingCleanup for
the watch, name the finalizer's export target after the simulator's Apple OS
instead of hard-coding iOS, and update the watch docs and record help.
@github-actions

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.46 MB 6.46 MB +128 B
Package (unpacked) 6.46 MB 6.46 MB +128 B
Package (download) 1.97 MB 1.97 MB +32 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 21.3 ms 23.6 ms +2.3 ms
CLI --help 45.9 ms 48.8 ms +2.9 ms

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of 9204ec4

No open findings.

Not in the reviewers' prompt (1 file)
  • packages/command-surface/src/recording/index.ts: its very long or mostly numeric lines were cut; reviewers could still search them

2 findings below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (520e2ca3c27d).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 9204ec4: the code looks right, all checks pass at that head, and there are no conflicts.

The live watchOS simulator run in the PR body (simctl recordVideo backend, h264 416x496, 26.2s) is the evidence for recording. Not verified here: that run was not repeated, screenRecordingReattach and screenRecordingCleanup were not run on a watch, and the PR's run does not show whether the touch overlay was burned in. Those paths are shared with iOS simulators and have no watch gate.

Not blocking, take or leave both:

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 20, 2026
@thymikee
thymikee merged commit 0731b7a into main Nov 20, 2026
20 checks passed
@thymikee
thymikee deleted the feat/watchos-simulator-recording branch November 20, 2026 16:26
thymikee added a commit that referenced this pull request Nov 20, 2026
…nts-main

* origin/main:
  feat(platform-apple): admit screen recording on watchOS simulators (#4819)
  feat(audit): run Apple's native accessibility checks on iOS (#4776)
  fix(test-app): make the reorder handle a labelled native hold-then-drag (#4811)

# Conflicts:
#	packages/command-surface/src/recording/index.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant