Skip to content

refactor(apple): share simulator tools and runner operations - #4213

Merged
thymikee merged 3 commits into
callstack:mainfrom
muvaf:codex/apple-tool-providers
Nov 4, 2026
Merged

thymikee merged 3 commits into
callstack:mainfrom
muvaf:codex/apple-tool-providers

Conversation

@muvaf

@muvaf muvaf commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #4174. Share Apple simulator file access, app metadata, and lifecycle/runner operations so forwarded XCTest runners can use the local command implementation. Local simctl/devicectl remain the default tools. This touches 40 files in three commits, with no CLI changes or Limrun backend switch.

The review fixes preserve simulator-set cache identity, serial metadata reads, and hosted-installer result defaults. The installer-selection test now detects callback bypass, and the unused URL-owner override is removed. The inherited watchOS behavior stays unchanged.

Remaining work is open as fork drafts: native XCTest integration #1 follows this PR and recording isolation #4196; sync install/reinstall #2 stacks on it. Before upstream submission, these drafts need rebasing onto the merged prerequisites and fresh live validation; the native integration also needs splitting into smaller PRs.

Validation

At a8758b33fb5f605d1b12c4e287ea69aa5bcab901, pnpm check:affected --run --base 8c416a75980d888985886d9d6eada2f9a51d3ea8 --head a8758b33fb5f605d1b12c4e287ea69aa5bcab901 passed with exactCommit: true: 17,230 unit passes, one skip, and 305 related passes. Independent follow-up review found no issues.

Evidence, commands, receipts, and regression/mutation proof cover live simulator discovery, XCTest snapshots, screenshots, file copying, state clearing, install/reinstall, and cleanup. The final-head iPhone replay passed with six Apple-runner captures and clean teardown.

GitHub coverage and CI device checks remain required. The forwarded runtime factory and hosted installer hook have no production caller yet; those boundaries are tested locally.


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

View guided diff

@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

@muvaf is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 41 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

@thymikee

thymikee commented Nov 4, 2026

Copy link
Copy Markdown
Member

At b663be7, the extraction itself is sound: platform-apple owns the shared simulator tools and runner binding, and the runner package keeps transport and sessions. I found no new blocking issue beyond the open threads below.

The open threads on container store identity, watchOS interaction, installer selection test, watchOS refusal, installer result defaults, and subprocess fan-out still apply; the watchOS behavior is inherited and the installer hook has no production consumer yet. The launch confirmation thread does not apply to a current production route because no production caller supplies the unbounded option.

Before merge, address the scoped container-store identity and subprocess fan-out regressions, make hosted-installer selection observable in its regression test, resolve the inherited and dormant threads with those distinctions, and rerun affected validation at the resulting head.

Not blocking: you can take or leave moving simctlCommand into the pure simctl module and reusing it for both address construction and tool execution.

The live run covers the local simulator route. Physical devices, macOS, tvOS and visionOS were checked by reading the unchanged command code, not on hardware, and the forwarded runtime factory and hosted installer hook have no production caller yet. The only failing check is the Vercel deployment authorization, which is not a code problem. No conflicts are known.

@thymikee

thymikee commented Nov 4, 2026

Copy link
Copy Markdown
Member

At a8758b3, the code looks good, and it fixes every finding from the earlier review. The launch confirmation lookup is bounded again, the local simulator file store is keyed per simulator, and app metadata reads run serially as on main. The watchOS and refusal-hint threads describe behavior unchanged from main, so any change there belongs in a separate PR.

One small question outside this delta: resolveIosSimulatorDeepLinkBundleId now passes app.path to readInstalledAppUrlSchemes, where main skipped apps without a path. Is the extra fallback lookup for path-less apps intended?

The earlier limits still stand: no forwarded-session run, no physical device, macOS, tvOS or visionOS pass, and no production caller yet for the hosted installer hook or the forwarded runtime factory. The other 11 checks pass, and the only failing one is the Vercel deployment authorization, which is not a code problem. No conflicts are known.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 4, 2026
@thymikee
thymikee merged commit 6b8c508 into callstack:main Nov 4, 2026
11 of 12 checks passed
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.

2 participants