ios: a shutdown within seconds of close lets the open's runner prewarm boot the simulator again
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #3357 来自 @thymikee —— 已合并
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 15/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- ios, typescript
调研方向
Start in packages/platform-apple/src/runner/runner-lifecycle.ts, following the stack from prewarmRunnerSession through ensureRunnerSession to startRunnerSessionWithLease, and compare with fenceRunnerStartAdmissionsForTeardown used on non-retained close. The owner decision (retaining close fencing the prewarm loop, or the loop refusing a device with no live session) comes first. Done means a unit test at that seam shows a prewarm attempt after a retaining close starts no runner, plus three live runs ending Shutdown.
由索引模型根据 Issue 内容生成。
描述
Purpose
Track a path to the symptom in #3321 that #3357 does not cover: a simulator shut down with xcrun simctl shutdown right after close is booted again, this time by a runner the daemon starts, not by the retained runner. #3357 stops the retained runner; this is a different mechanism, so do not reopen #3357 for it.
Evidence
Measured on an iPhone 17 (iOS 27.0, Xcode 27.1 beta), Settings app, agent-device built from the #3357 branch, isolated --state-dir:
agent-device open com.apple.Preferences --relaunch --platform ios --udid "$A"
agent-device snapshot -i
sleep 2
agent-device close
xcrun simctl shutdown "$A" # less than 1 s after close
- 3 of 3 runs: the device shows
Bootedwithin 2 s, the originalxcodebuildis gone, and about 15 s later the daemon (the parent of the newxcodebuild) has started a replacement runner. The device endsBootedwith a runner alive and nothing reported. - Control: with 6 to 14 s between
closeandshutdown, 5 of 5 runs endShutdownonce #3357 is in. A longer gap is unaffected. - Origin of the replacement runner, from a stack trace on
launchRunnerProcess:prewarmRunnerSession→prepareLocalIosRunner→runPrepareAttempt→ensureRunnerSession→startRunnerSessionWithLease. That is the open's background runner prewarm (packages/platform-apple/src/runner/runner-lifecycle.ts), whose attempt loop re-entersensureRunnerSessionwhen its runner is gone. - Not measured: a baseline on
mainwithout #3357, and whether the prewarm is still in its attempt loop whencloseruns or is re-entered by something else. Both decide the owner below.
Required behavior
- A runner start that a prewarm loop makes after the session's
closehas retained the runner must not boot a device that was shut down in between. - Decide the owner. The #3357 watch cannot cover this: it only guards a retained runner, and here the runner that boots the device is a new session started by the prewarm loop. Candidates: a retaining
closeretires the prewarm loop's start admission for the device (non-retained close already fences admissions throughfenceRunnerStartAdmissionsForTeardown), or the prewarm loop refuses to start a runner for a device with no live session. - Key the decision on session and admission state, never on a timing window or message text.
Completion
- The sequence above, with
shutdownunder 1 s afterclose, ends with the deviceShutdownand no daemon-spawnedxcodebuildfor it, in 3 of 3 live runs. - A test at the owning seam shows a prewarm attempt after a retaining
closestarts no runner. - Related: #3321, #3357.
- 主要语言
- TypeScript
- 星标
- 4.9k
- 派生
- 328
- 平均合并
- 12 小时 18 分钟
- 30 天内合并 PR
- 538
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
callstack/agent-device#3353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 45/100
callstack/agent-device#3392 ·
维护者通常 1 天内回复
-
settings permission --app writes a display name as the bundle id instead of resolving it可能已有人在做 @thymikee 今天认领。 未关闭
难度 3/5 1-2 天 新手友好度 22/100
callstack/agent-device#3384 ·
维护者通常 1 天内回复
-
iOS: a canceled request releases the session lock while its runner command still runs on the device可能已有人在做 @thymikee 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 22/100
callstack/agent-device#3383 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagree未关闭
难度 2/5 1-3 小时 新手友好度 68/100
sidorares/react-x11-components#764 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
backnotprop/plannotator#1840 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
JoviDeCroock/pracht#432 ·
维护者通常 1 天内回复
-
approved check:passed streams:add
难度 1/5 1 小时以内 新手友好度 75/100
维护者通常 1 天内回复
-
Hardware attribute name "app Connection Support" has inconsistent casing可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
walletbeat/walletbeat#1628 ·
维护者通常 1 天内回复