Files
Artemis-Plugins/plugins/artemis-device-test/skill/references/artemis-patch.md
T

52 lines
3.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Artemis v1.5.2 观察链补丁
适用:团队希望复现开发机已经验证的“只观察APP → 保存笔记 → 正常结束 → Checker核验”流程。补丁在 [artemis-v1.5.2-observation.patch](../assets/patches/artemis-v1.5.2-observation.patch),不是 Artemis 安装包,不会因安装 Skill 自动应用。
## 基线与作用
- 已核对基线:Artemis tag `v1.5.2`,Git提交 `bdc75d0c657c5c2707b4c6e352eed6a1f5c14fff`。
- 补丁涉及3个实现文件及3个测试文件:Operator在计划完整完成时结束无设备动作循环;Checker能查看笔记预览并读取被省略笔记、精确匹配检查项展示前缀;resolver补充Windows标准scrcpy安装位置。
- 不包含模型Key、环境配置、用户历史、截图或设备资料。补丁摘要见发布清单;补丁不是所有Artemis问题的通用修复。
## 检查并应用
在同事的 Artemis 项目执行以下只读检查。先保存工作,确认当前没有运行任务。变量只为示例,将Skill和Artemis路径换为本机目录。
```powershell
$artemisRoot = 'D:/Artemis'
$skillRoot = 'D:/TeamSkills/artemis-device-test'
$patchFile = Join-Path $skillRoot 'assets/patches/artemis-v1.5.2-observation.patch'
git -C $artemisRoot rev-parse HEAD
git -C $artemisRoot status --short
git -C $artemisRoot apply --stat $patchFile
git -C $artemisRoot apply --check $patchFile
```
只有提交完全匹配上述基线、相关文件没有其他未保存改动且 `apply --check` 成功时,才在当前已授权的环境修复范围执行:
```powershell
git -C $artemisRoot apply $patchFile
git -C $artemisRoot diff --check
```
若已应用相同补丁,`git apply --reverse --check` 成功可辅助确认,不能重复叠加。其他版本、存在相关修改或正反检查都失败时保留原文件,记录版本和冲突,不执行 reset/clean 或强行套补丁。无Git的源码包须先取得可核对基线,不能仅凭网页显示1.5.2判断一致。
## 复验和回退
在Artemis自己的环境中运行对应离线测试(不连接设备或模型):
```powershell
Push-Location $artemisRoot
try {
uv run pytest tests/unit/agents/test_checker.py tests/unit/agents/test_operator_recovery.py tests/unit/core/test_toolchain.py
} finally {
Pop-Location
}
```
测试通过后,在无运行任务时正常重载Artemis服务及MCP,让长驻进程载入修改,再运行 [APP-01](pilot-smoke.md) 的只读观察。不要自动关闭用户任务或重启正在使用的模拟器。
如需撤销本补丁,先确认文件没有后续改动,运行 `git -C $artemisRoot apply --reverse --check $patchFile`,检查成功且当前任务要求回退后再执行同一命令去掉 `--check`。已有无关修改时停止,不使用强制还原。回退后同样在空闲时正常重载。
开发机历史证据:相关回归90项通过;当时默认全套为2425通过、3失败、5跳过、8未选中,不能称Artemis全套通过。3项失败已分开定位为原基线问题或检出资源差异。本包的本轮校验记录会单独列出实际执行的检查;Skill自己的74项测试也不能代替Artemis回归或新机器APP验证。