Conversation
已有非管理员权限的 MuMu 实例在跑时,新实例无法以管理员身份启动。 开关打开后,启动前先逐个 shutdown 在线 / 启动中的实例并等其下线, 再复用现有的固定进程白名单强力清理残留进程;残留进程结束不了时 直接报错,不再继续启动。默认关闭,关闭时启动流程不变。 Closes AUTO-MAS-Project#634 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
审查者指南本 PR 为 MuMu 增加默认关闭的“启动前强力清理”能力:启动前先关闭整机范围内的在线实例,再清理残留进程并确认其退出;清理失败会中止启动。前端提供中英日开关和风险提示,同时保持开关关闭时的原有行为。 MuMu 启动前强力清理时序图sequenceDiagram
participant User
participant Emulator as MuMuEmulator
participant CLI as MuMuCLI
participant Processes as MuMuProcesses
User->>Emulator: open(idx)
alt ForceKillBeforeLaunch enabled
Emulator->>CLI: get_device_info(all)
CLI-->>Emulator: running instances
loop each online or starting instance
Emulator->>CLI: control -v index shutdown
end
Emulator->>CLI: get_device_info(all)
CLI-->>Emulator: all instances offline
Emulator->>Processes: _force_kill_mumu_processes()
Processes-->>Emulator: targeted processes
Emulator->>Processes: _wait_processes_exit()
alt residual process remains
Emulator-->>User: RuntimeError
else cleanup succeeds
Emulator->>Emulator: launch instance
Emulator-->>User: DeviceInfo
end
else ForceKillBeforeLaunch disabled
Emulator->>Emulator: launch instance
Emulator-->>User: DeviceInfo
end
MuMu 启动前清理失败处理流程图flowchart TD
A["MuMu open(idx)"] --> B{"ForceKillBeforeLaunch enabled?"}
B -- No --> E["Existing launch flow"]
B -- Yes --> C["List online or starting instances"]
C --> D["control shutdown each instance"]
D --> F{"All instances offline?"}
F -- No --> G["Wait timeout, then force cleanup"]
F -- Yes --> H["Force-kill MuMu processes"]
G --> H
H --> I["Wait for targeted processes to exit"]
I --> J{"Any process still alive?"}
J -- Yes --> K["Raise RuntimeError; do not launch"]
J -- No --> L["Launch requested instance"]
文件级变更
可能关联的 issue
提示与命令与 Sourcery 交互
自定义使用体验访问你的控制面板:
获取帮助Original review guide in EnglishReviewer's Guide本 PR 为 MuMu 增加默认关闭的“启动前强力清理”能力:启动前先关闭整机范围内的在线实例,再清理残留进程并确认其退出;清理失败会中止启动。前端提供中英日开关和风险提示,同时保持开关关闭时的原有行为。 Sequence diagram for MuMu force cleanup before launchsequenceDiagram
participant User
participant Emulator as MuMuEmulator
participant CLI as MuMuCLI
participant Processes as MuMuProcesses
User->>Emulator: open(idx)
alt ForceKillBeforeLaunch enabled
Emulator->>CLI: get_device_info(all)
CLI-->>Emulator: running instances
loop each online or starting instance
Emulator->>CLI: control -v index shutdown
end
Emulator->>CLI: get_device_info(all)
CLI-->>Emulator: all instances offline
Emulator->>Processes: _force_kill_mumu_processes()
Processes-->>Emulator: targeted processes
Emulator->>Processes: _wait_processes_exit()
alt residual process remains
Emulator-->>User: RuntimeError
else cleanup succeeds
Emulator->>Emulator: launch instance
Emulator-->>User: DeviceInfo
end
else ForceKillBeforeLaunch disabled
Emulator->>Emulator: launch instance
Emulator-->>User: DeviceInfo
end
Flow diagram for MuMu pre-launch cleanup failure handlingflowchart TD
A["MuMu open(idx)"] --> B{"ForceKillBeforeLaunch enabled?"}
B -- No --> E["Existing launch flow"]
B -- Yes --> C["List online or starting instances"]
C --> D["control shutdown each instance"]
D --> F{"All instances offline?"}
F -- No --> G["Wait timeout, then force cleanup"]
F -- Yes --> H["Force-kill MuMu processes"]
G --> H
H --> I["Wait for targeted processes to exit"]
I --> J{"Any process still alive?"}
J -- Yes --> K["Raise RuntimeError; do not launch"]
J -- No --> L["Launch requested instance"]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Member
|
@qiyinxi 版本再更新一下 |
解决 CHANGELOG.md / res/version.json 冲突:以 dev 当前内容为准, 把本 PR 的一条 changelog 记录重新放进顶部未发布版本段的「新增」下, 再运行 python scripts/changelog.py sync 重新生成 res/version.json。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dev 已把顶部未发布段改为 v5.5.0-beta.6。自动合并把本 PR 的 changelog 记录留在了 已发布的 beta.4 段里,手动移回 beta.6 未发布段的「新增」下,并重新 sync。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
@Craun718 看了一下,现在能直接合,不用动: |
…新日志改为 changelog.d 碎片(AUTO-MAS-Project#683)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #634
control shutdown并等其下线,再复用现有的强力清理结束残留进程;残留进程结束不了时直接报错、不再继续启动。关闭了哪些实例、结束了哪些进程都写进日志EmulatorConfig_Info.ts由yarn openapi重新生成本地验证(
D:\MAS\code\trees\mumukill,.venv\Scripts\python.exe,基线35424417a):python -m pytest tests/models tests/tools -q:279 passed;python -m pytest tests --collect-only -q退出码 0yarn typecheck/yarn lint通过;yarn test453 passed,1 条backendService.test.tsmanaged 超时是 dev 基线既有失败MuMuNxMain.exe及子进程共 8 个 → #0 20.9 秒上线;多开器被 MuMu 服务重新拉起后按既有逻辑关掉了窗口。浏览器里开关切换后/api/emulator/get返回ForceKillBeforeLaunch: true🤖 Generated with Claude Code
Sourcery 摘要
新增可选的 MuMu 启动前清理模式,在启动新实例前关闭正在运行的实例并清理残留进程。
新功能:
错误修复:
改进:
文档:
Original summary in English
Sourcery 摘要
新增可选的 MuMu 启动前清理模式,在启动新实例前关闭活动实例并移除残留进程。
新功能:
错误修复:
增强功能:
文档:
日常维护:
Original summary in English
Sourcery 摘要
新增可选的 MuMu 启动前清理模式:在启动新实例前关闭现有实例并移除残留进程。
新功能:
问题修复:
改进:
文档:
杂项:
Original summary in English
Sourcery 总结
新增可选的 MuMu 启动前强制清理工作流,以便可靠地启动提升权限的实例,同时避免遗留冲突进程。
新功能:
错误修复:
改进:
文档:
杂项:
Original summary in English
Sourcery 摘要
为 MuMu 增加启动前强力清理选项,以解决已有实例或残留进程阻碍新实例启动的问题。
新增功能:
错误修复:
增强功能:
文档:
日常维护:
Original summary in English
Summary by Sourcery
为 MuMu 增加启动前强力清理选项,以解决已有实例或残留进程阻碍新实例启动的问题。
New Features:
Bug Fixes:
Enhancements:
Documentation:
Chores: