Let a script hold a device claim while it runs simctl install or simctl launch itself
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ios, typescript
- 領域
- cli, mobile-dev
調査の方向性
Start by reading the CLI implementations of install, boot and shutdown to understand how they take and release transient-exclusive claims, then compare that with the open/close session lifecycle. Decide which of the three proposed approaches best fits the stated requirement; done means a script can hold a claim while its simulator mutation runs, and the claim is released when that work ends without the unwanted session side effects.
索引モデルが issue の本文から書いたものです。
説明
Seen in 0.21.15, macOS, iOS simulators.
Problem
Our dev scripts install and relaunch a dev client on an iOS simulator with xcrun simctl install and xcrun simctl launch --terminate-running-process. Before each call, they read the claim file in ~/.agent-device/device-claims/ and refuse when another session holds the device.
Between that check and the simctl call, an agent-device client (an e2e run, or an IDE device panel) can take the claim. The install or relaunch then interrupts that session. The window is short, but a check that only our scripts honor cannot close it. The claim must come from agent-device.
What exists in 0.21.15, and why it does not fit
device status|releaseonly inspects or releases claims. No command takes one.install,bootandshutdowntake atransient-exclusiveclaim, but only for their own work. agent-device cannot run oursimctlcommand under that claim.open --session S --platform ios --udid Uwith no app holds a session claim untilclose --session S. As a reservation, it has these side effects:- it starts a daemon in the state dir;
keepHotcan startxcodebuild build-for-testingfor the runner in the background;- on a simulator that is not booted, it boots it and runs
open -a Simulator; - if the script crashes before
close, the claim stays held while the daemon lives.
takeoverneeds a remote lease, so it does not apply to a local simulator.
Proposal (any one is enough)
agent-device exec --platform ios --udid U -- <command...>: take atransient-exclusiveclaim, run the child, and release the claim when the child exits. The claim owner is the exec process, so a crash of the child or of agent-device frees the claim.agent-device device claim --udid Uanddevice release --udid U --session S: take a claim whose owner is the calling process (or one with a TTL or heartbeat). No daemon, no boot, no runner prewarm, no session record.open --claim-only: the currentopenwith no app, but without the boot,open -a Simulatorand runner prewarm.
Option 1 fits our use best. The claim lasts exactly as long as the mutation, and nothing leaks.
Current workaround
We read the claim file right before each simctl call. That narrows the window but does not close it.
Related: #2161 (workspace-scoped device pinning).
- 主要言語
- TypeScript
- スター
- 4.9k
- フォーク
- 328
- 平均マージ
- 12時間 19分
- マージ済み PR(30日)
- 549
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/agent-device のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
callstack/agent-device#1869 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 36/100
callstack/agent-device#3261 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
callstack/agent-device#3260 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
callstack/agent-device#3254 ·
メンテナーはふだん 1 日以内に返信
-
Apple runner cache under ~/.agent-device/apple-runner grows without bound (4.4 GB measured)対応中かも @janicduplessis が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
callstack/agent-device#3246 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
callstack/agent-device の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
area:ui enhancement issue-form:feature platform:cross-platform review: high
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
1lck/Lithe-IDEA#1092 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
developmentseed/deck.gl-raster#693 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Marker-Inc-Korea/AutoRAG#1801 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信