install and reinstall from another session in the same daemon replace the app on a claimed device
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- ios, typescript
调研方向
Start by tracing how install and reinstall use transient-exclusive claims, then compare that path with the session-store check used by open. Reproduce with two sessions sharing one daemon and a claimed iOS simulator; verify that the non-owning session gets DEVICE_IN_USE while the owning session can still install and reinstall. Check whether the other listed transient-exclusive commands have the same behavior.
由索引模型根据 Issue 内容生成。
描述
Seen in 0.20.10, 0.21.12 and 0.21.23 on macOS with iOS simulators.
Repro
Both sessions use the default state dir, so they share one daemon, as two agents in separate worktrees of the same repo do:
agent-device open com.apple.Preferences --platform ios --udid <UDID> --session a
agent-device device status --platform ios --udid <UDID>
# live session=a
agent-device open com.apple.Preferences --platform ios --udid <UDID> --session b
# DEVICE_IN_USE: Device is already in use by session "a". (expected)
agent-device reinstall <bundle-id> /path/to/App.app --platform ios --udid <UDID> --session b
# Installed: <bundle-id> (session a's app is replaced)
agent-device install <bundle-id> /path/to/App.app --platform ios --udid <UDID> --session b
# Installed: <bundle-id>
When session b runs on another state dir (AGENT_DEVICE_STATE_DIR), install and reinstall fail as expected:
DEVICE_IN_USE: ios device <UDID> is owned by session "a" in workspace "<workspace>".
Cause
#1809 made install and reinstall transient-exclusive, and a claim already held by the same daemon process covers the command instead of colliding with it. That is right for the session that owns the claim, but any other session in that daemon is covered too. open is still protected by the session store check; the sessionless mutations are not.
Impact
Agents working in parallel worktrees share the default daemon, so whether an install is fenced off depends on whether each worktree happens to run its own daemon. In our case one agent's build replaced the app another agent was testing.
Expected
install and reinstall targeting a device that a different session in the same daemon holds fail with DEVICE_IN_USE, the same as open. Passing the owning --session keeps working. I only tested install and reinstall; the other transient-exclusive commands (boot, shutdown, push, prepare) may behave the same way.
- 主要语言
- TypeScript
- 星标
- 4.9k
- 派生
- 328
- 平均合并
- 12 小时 18 分钟
- 30 天内合并 PR
- 561
环境准备
- 没有 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 天内回复
-
needs-triage
难度 3/5 1-2 天 新手友好度 76/100
callstack/agent-device#3453 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
callstack/agent-device#3451 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
./collections should export setUmbracoVersion and setAllowFilePathUploads for in-process consumers未关闭
难度 2/5 1-3 小时 新手友好度 78/100
umbraco/Umbraco-CMS-MCP-Dev#563 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
-
afk-ok area:data-quality importer size:S
难度 2/5 1-3 小时 新手友好度 77/100
enorm-labs/event-junkie#3166 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 80/100
alunduil/projects-v2-sync#21 ·