iOS smoke fails in verify-installed-snapshot-bridge when a cold xcrun probe eats the shared deadline
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- ios, typescript
- Domain
- ci-cd, mobile-dev, testing-qa
Research direction
Start in packages/platform-apple/src/snapshot-source/cache-identity.ts, reading readSnapshotSourceToolchain and runToolchainProbe around line 118. Reproduce the failure through verify-installed-snapshot-bridge or the cited iOS Smoke Tests job, then compare the three proposed handling strategies. Done means cold toolchain probes no longer make this smoke job fail misleadingly, while the shared probe timeout remains consistent.
Written by the indexing model from the issue text.
Description
What broke
The iOS Smoke Tests job fails during package verification, before any app runs, because one Apple toolchain probe blew its budget and the shared deadline had nothing left for the retry.
AppError: xcrun timed out after 30000ms
code: 'COMMAND_FAILED',
details: { cmd: 'xcrun', args: [ '--sdk', 'iphonesimulator', '--show-sdk-version' ] }
Package verification failed. Retained /private/var/folders/.../agent-device-package-AMdfST for inspection.
[ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL] @agent-device@… verify-installed-snapshot-bridge
Seen on 95d07b67b: run 35507203662, job 106068926059, 2026-09-20T11:16:45Z — the run died 4m7s in, with no simulator interaction yet. Same shape as the earlier toolchain-timeout family (#2422), on the snapshot-bridge prober rather than the runner's.
Why the retry did not save it
packages/platform-apple/src/snapshot-source/cache-identity.ts already knows about the cold-host problem: readSnapshotSourceToolchain runs xcodebuild -version, sw_vers twice, uname -m, then xcrun --show-sdk-version, each with Math.min(COLD_TOOLCHAIN_PROBE_TIMEOUT_MS, remainingSnapshotSourceMs(...)), and runToolchainProbe retries exactly once on the exec-layer timeout.
The retry is skipped exactly when it is needed. runToolchainProbe re-throws when deadline.clock.remainingMs(...) <= 0 (line 118), so a single stall that consumes the remaining group budget produces this error with no second attempt. #2422 measured the syspolicyd signature scan at roughly 18–19s for the first xcodebuild/xcrun exec of each tool — two cold tools, one budget, one retry that only fires if there is already nothing left to spend.
Three ways this could be right, and they are not equivalent
- Size the group deadline for two cold scans instead of one, so
xcodebuildandxcruncan each pay Apple's first-exec stall. - Warm both tools before the sequence — one throwaway
xcrun -sdk iphonesimulator -find .../xcodebuild -versionat process start, so the identity probes all run against a warm toolchain and keep their tight budgets. - Stop treating the identity probe as fatal for the job. This data keys a build cache. A host where it times out can build uncached; failing the whole smoke job to protect a cache key inverts that priority, and the retry-once path shows the authors already considered it transient.
Please pick at the owning type rather than adding a fourth budget; COLD_TOOLCHAIN_PROBE_TIMEOUT_MS is already shared between the two probers and should stay that way.
Why it matters now
It is currently indistinguishable from a real device failure at a glance, and it is holding the iOS side of #2704 red on a change that only touches examples/test-app app startup. Anything that reads as "smoke failed" without saying "the toolchain probe stalled on a cold host" costs a full CI round to disprove.
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 315
- Avg merge
- 11h 17m
- Merged PRs (30d)
- 536
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/agent-device
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
callstack/agent-device#3062 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
callstack/agent-device#3106 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
callstack/agent-device#3105 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
callstack/agent-device#3104 ·
Maintainers usually reply within 1 day
All issues in callstack/agent-device
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aiko-chan-ai/DiscordBotClient#380 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vercel/ai-elements#507 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 Half a day Newbie friendliness 84/100
anaclumos/qa-interns#148 · 1 comment ·
Maintainers usually reply within 1 day