ios: a shutdown within seconds of close lets the open's runner prewarm boot the simulator again
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #3357 @thymikee による — マージ済み
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 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分
- マージ済み PR(30日)
- 561
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
callstack/agent-device#3407 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
callstack/agent-device#3353 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
callstack/agent-device#3453 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
callstack/agent-device#3451 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
./collections should export setUmbracoVersion and setAllowFilePathUploads for in-process consumersオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
umbraco/Umbraco-CMS-MCP-Dev#563 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
afk-ok area:data-quality importer size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
enorm-labs/event-junkie#3166 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
alunduil/projects-v2-sync#21 ·