feat: 完成Chrome启动器
- 新增 app/chrome.py 拼装远程调试启动参数并启动 Chrome - 实现 /json/version 端口探测并禁用环境代理 - 新增 chrome 单元测试覆盖参数、Popen 和端口就绪 - 更新任务看板、API 合约、当前状态和进度记录
This commit is contained in:
@@ -303,3 +303,12 @@
|
||||
- 规则:slug = 可读 ASCII 前缀 + 8 位 SHA1 后缀;非 ASCII 别名使用 `account_<hash>`;`ensure_user_data_dir` 只接受 `[a-z0-9_]`,防止路径穿越。
|
||||
- 验证:`py -3 -m compileall app main.py tests` 通过;`py -3 -m unittest discover -s tests` 通过(12 tests,skipped=2);`python -m unittest discover -s tests` 通过(12 tests,skipped=2);测试临时目录已清理。
|
||||
- 下一步:按任务看板领取 T-102。
|
||||
|
||||
## 【2026-06-27】T-102 Chrome 启动器
|
||||
|
||||
- 状态:DONE
|
||||
- 变更:新增 `app/chrome.py`,实现 `build_launch_args`、`launch_chrome`、`is_running`、`wait_debug_ready`;启动参数包含 `--remote-debugging-port`、`--remote-allow-origins=*`、`--user-data-dir`;新增 `tests/test_chrome.py` 覆盖参数拼装、Popen 调用模拟、本地 `/json/version` 端口探测;同步 `docs/06-tasks.md`、`docs/current-state.md`、`docs/api.md`。
|
||||
- 细节:端口探测使用 stdlib `urllib` 访问 `127.0.0.1:<port>/json/version`,显式禁用环境代理,避免 localhost/CDP 被代理干扰。
|
||||
- 范围:本轮不实现 `.lnk` 快捷方式,留给 T-106。
|
||||
- 验证:`py -3 -m compileall app main.py tests` 通过;`py -3 -m unittest discover -s tests` 通过(17 tests,skipped=2);`python -m unittest discover -s tests` 通过(17 tests,skipped=2)。
|
||||
- 下一步:按任务看板领取 T-103。
|
||||
|
||||
Reference in New Issue
Block a user