Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Let a script hold a device claim while it runs simctl install or simctl launch itself

オープン
#3,263 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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|release only inspects or releases claims. No command takes one.
  • install, boot and shutdown take a transient-exclusive claim, but only for their own work. agent-device cannot run our simctl command under that claim.
  • open --session S --platform ios --udid U with no app holds a session claim until close --session S. As a reservation, it has these side effects:
    • it starts a daemon in the state dir;
    • keepHot can start xcodebuild build-for-testing for 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.
  • takeover needs a remote lease, so it does not apply to a local simulator.

Proposal (any one is enough)

  1. agent-device exec --platform ios --udid U -- <command...>: take a transient-exclusive claim, 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.
  2. agent-device device claim --udid U and device 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.
  3. open --claim-only: the current open with no app, but without the boot, open -a Simulator and 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstack/agent-device のほかの issue

callstack/agent-device の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。