Repository navigation
fix(ios): pin simulator runtime to 27.2 and match the runtime id exactly - #592
Merged
Merged
Conversation
The runner host's iOS 27.0 runtime is listed as ready but cannot create a device (SimError 401, runtime path not found); 27.2 creates fine. Move the fleet pin, and the watch runtime that follows it, to 27.2. The Setup Simulator presence check was a substring grep, so a host with only the device-specific runtime (pin plus a -<device> suffix) passed it, and the fallback pattern extracted a truncated id that sorted above the real runtime. Match the last field of each simctl line as a whole and only fall back to plain iOS-<major>-<minor> ids.
Owner
Author
|
Agent CI round 1 of 2 · round · |
Owner
Author
|
Fresh-context verifier at ef3177b: PASS.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The runner host's iOS 27.0 simulator runtime is listed as Ready but unusable:
simctl createon it fails with SimError 401, "runtime path not found". The 27.2 runtime creates fine. This moves the fleet pin (and the watch runtime that follows it) to 27.2, and fixes the presence check and fallback in Setup Simulator, which had a prefix trap now that Xcode 27.2 installs a device-specific runtime (…iOS-27-2-iPhone19-4).Evidence (before the fix, origin/main, real
simctl list runtimeson a host with Xcode 27.2)PINNED_RUNTIME="com.apple.CoreSimulator.SimRuntime.iOS-27-0"; watch runtime…watchOS-27-0.SimError, code=401 … runtime path not found. On 27.2 it creates.iOS-27-2: the oldgrep -q "$PINNED_RUNTIME"passes, andiOS-27-2is a substring of the…iOS-27-2-iPhone19-4line, so a fixture list containing ONLY the device-specific runtime also passes (it should fall back).grep -oE '…SimRuntime\.iOS[0-9-]*'on the device-specific line extractscom.apple.CoreSimulator.SimRuntime.iOS-27-2-, which is not a runtime.sort -V | tail -1ranks it above the realiOS-27-2, so on the real list a fallback selects it. A fixture with only the device-specific line "falls back" to the same non-existent id.Change
DefaultRuntimePin27.0 → 27.2.awk '{print $NF}' | grep -qxF). Fallback considers onlyiOS-<major>-<minor>ids;|| truekeeps the "no runtimes installed" error reachable under pipefail.TestSimulatorRuntimeRelaxOnThePinIsDead, whose "override on the pin" value is the pin). No assertion was loosened, skipped or widened. Fixture text that merely mentions 27.0 (simctl device listings, SDK stubs, measurement comments) is unchanged.internal/shipped/sim_runtime_exact_test.goruns the rendered step (bash-eo pipefail) against simctl-format fixtures: only the device-specific runtime plus an older plain one → warns and selects the older plain one, never the device-specific or truncated id; only the device-specific one → the no-runtime error; plain pin beside the device-specific one → passes with no fallback.Tests
grep -q→TestPinnedRuntimeIsMatchedExactlyNotAsAPrefixfails; restoring the oldgrep -oEfallback pattern → the same test fails; restored file passes.go test ./...run once: the only failures are ones that also fail on a clean origin/main checkout in this environment (doctor package: fragment/typedoc/lint-config;TestNewProjectsAlwaysWork), plus agh apialarm timeout inTestReleaseRefusesARedIOSPushRunWithoutDispatchingunder load that passes on rerun. The one failure caused by this change (TestSimulatorRuntimeRelaxOnThePinIsDead) is fixed above.Proven on
Proven after merge (v1.79.5), 2026-10-24: a downstream project synced to v1.79.5 ran its iOS CI Test job on the runner host. Setup Simulator logged
Using runtime: com.apple.CoreSimulator.SimRuntime.iOS-27-2with no fallback, on a host that also lists the device-specificiOS-27-2-iPhone19-4runtime, and the Test job passed. Before this pin, the same host's 27.0 runtime failedsimctl createwith SimError 401.Not changed
The dated-override guard (
internal/tokens/runtime.go) and the watch runtime resolver (internal/tokens/watch.go) use the same substringgrep -q. No device-specific variant of those runtimes exists on the host today, so they are left alone.