iOS: a canceled request releases the session lock while its runner command still runs on the device
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #3385 来自 @thymikee —— 已合并
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- ios, typescript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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).
- 主要语言
- TypeScript
- 星标
- 4.9k
- 派生
- 328
- 平均合并
- 11 小时 48 分钟
- 30 天内合并 PR
- 605
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
callstack/agent-device#3407 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
callstack/agent-device#3353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
iOS: fill rejects the right text as `TEXT_ENTRY_MISMATCH` when the focused field moves while typing (since 0.21.25)可能已有人在做 @Lanchez 今天认领。 未关闭
难度 3/5 1-2 天 新手友好度 42/100
callstack/agent-device#3595 ·
维护者通常 1 天内回复
-
`fold` always fails on Xcode 27.1 RC: its pose check calls `devicectl device motion hinge-angle`, which this devicectl doesn't have可能已有人在做 @thymikee 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
callstack/agent-device#3581 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
documentation good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
libredb/libredb-studio#1756 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 72/100
lingdojo/kana-dojo#32365 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 72/100
kentcdodds/kody#3706 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
copperheadhq/copperhead#378 ·
维护者通常 1 天内回复