Let a script hold a device claim while it runs simctl install or simctl launch itself
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 38/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- ios, typescript
- Domaine
- cli, mobile-dev
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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).
- Langage dominant
- TypeScript
- Étoiles
- 5k
- Forks
- 334
- Merge moyen
- 12 h 2 min
- PR mergées (30 j)
- 678
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstack/agent-device
-
`devices` reports a phantom Android emulator named after the emulator's crashdata INFO bannerPeut-être pris @airowe l’a pris il y a 1 jour. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
callstack/agent-device#3716 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
callstack/agent-device#1869 ·
Les mainteneurs répondent en général sous 1 jour
-
backlog refactor
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 8/100
callstack/agent-device#3759 ·
Les mainteneurs répondent en général sous 1 jour
-
backlog enhancement needs-triage
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 8/100
callstack/agent-device#3758 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement ready-for-agent
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
callstack/agent-device#3757 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de callstack/agent-device
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
polarsource/polar#15580 ·
Les mainteneurs répondent en général sous 1 jour
-
accepted bug via-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 69/100
pingdotgg/t3code#20931 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug/1-unconfirmed kind/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 83/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
ranxianglei/billion-context#3583 ·
Les mainteneurs répondent en général sous 1 jour