iOS: a canceled request releases the session lock while its runner command still runs on the device
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 22/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- ios, typescript
Línea de trabajo
Start in src/daemon/request-execution-locks.ts and packages/kernel/src/keyed-lock.ts to see when the session and device locks are released, then in packages/platform-apple/src/runner/runner-exchange.ts where an abandoned charge is marked. Done means a test in which a canceled runner command keeps the session lock until the runner journal reports it terminal, plus the live iOS press-then-relaunch check. Linked PR #3385 is already open against this, so check it before starting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
A per-call signal (#3178) cancels a request, but on iOS the daemon releases the session's lock before the device has finished the canceled work. The next request on the same session can then run while the aborted command is still executing on the device.
- The per-session and per-device keyed locks are held by the handler's promise (
request-execution-locks.ts,keyed-lock.ts). - On abort, the runner
fetchrejects at once, the exchange marks the charge abandoned and rethrows (runner-exchange.ts), and the handler settles. The lock is released. - The runner never sees the disconnect. Its serial
commandExecutionQueueruns the command to completion. - Only runner commands queue behind it. A next request whose device work skips the runner, such as a
simctl launchfromopen --relaunch,simctl privacy, or a screenshot, can overtake the tap. So can the runner's inlinestatusanduptime.
Android holds the lock until adb returns, so it is serialized already.
Consumer impact: tester-army/e2e cannot adopt signal. It keeps an inflight set of abandoned commands and waits for each response before the next attempt starts, so that a tap from a canceled step cannot land in the retry (packages/mobile/src/surface.ts). With signal, the client's promise rejects immediately, so that wait no longer proves the device finished.
Required behavior
- A canceled request whose runner command was already sent keeps its session and device locks until the runner reports that command terminal (
completedorfailedin the command journal), or until the command's own deadline expires. The client still rejects at once withrequest_canceled. - A command that never reached the runner, or one the runner refused, releases at once, as it does today.
- A drain that hits the deadline leaves the charge abandoned, as today, so the detach/handoff rules keep seeing it.
Done when
- A test shows that a canceled runner command holds the session lock until the runner journal reports it terminal, and that a second request on the session starts only after that.
- Live on an iOS simulator: abort a long
press(orlongpress --duration) through the client, then immediately runopen --relaunch. The launch starts after the press finishes, as the request log shows.
Related: #3178 (per-call signal), #2965 (charge settlement by terminal evidence).
- Lenguaje dominante
- TypeScript
- Estrellas
- 4.9k
- Forks
- 328
- Merge medio
- 12 h 18 min
- PR fusionados (30 d)
- 538
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstack/agent-device
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
callstack/agent-device#3353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
callstack/agent-device#1869 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
callstack/agent-device#3392 ·
Los mantenedores suelen responder en 1 día
-
settings permission --app writes a display name as the bundle id instead of resolving itPosiblemente ocupada @thymikee la tomó hoy. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 22/100
callstack/agent-device#3384 ·
Los mantenedores suelen responder en 1 día
-
refactor
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
callstack/agent-device#3377 ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstack/agent-device
Issues similares
-
effort:S priority:P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
cameri/nostream#811 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
dam-agents/dam#4562 ·
Los mantenedores suelen responder en 1 día
-
bug p3 triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
bug javascript P2-medium python release:v3.1
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
adrirubio/claude-deck#546 ·
Los mantenedores suelen responder en 1 día