ios: a shutdown within seconds of close lets the open's runner prewarm boot the simulator again
Mantenedores costumam responder em até 1 dia
Um pull request relacionado já foi integrado.
- #3357 de @thymikee — integrado
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 15/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- ios, typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 5.3k
- Forks
- 377
- Merge médio
- 14h 6min
- PRs com merge (30d)
- 650
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de callstack/agent-device
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
callstack/agent-device#4249 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
callstack/agent-device#4212 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
iOS alert wait: the last poll can get ~30 ms and turns "no alert" into a failed readTalvez já em andamento @pcbeingused333 assumiu há 5 dias. Abertabug ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
callstack/agent-device#4018 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
callstack/agent-device#1869 ·
Mantenedores costumam responder em até 1 dia
-
bug ready-for-agent
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
callstack/agent-device#4247 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de callstack/agent-device
Issues semelhantes
-
Chip source filter and denial markers miss Storage rows when a Storage activity source is pickedAbertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
omdsh-dev/DSH-better-sidebar#1141 ·
Mantenedores costumam responder em até 2 dias
-
desktop linux photos
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Cleanup SetupTalvez já em andamento @AlexanderKaran assumiu hoje. Abertadocumentation enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
e18e/framework-tracker#769 ·
Mantenedores costumam responder em até 1 dia
-
fix(docker): correct stale --db-path comments in fetch/git Dockerfiles and clarify git READMEAbertabug v2
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
modelcontextprotocol/servers#5483 ·
Mantenedores costumam responder em até 1 dia