概述
Mantis 是 OpenClaw 的端到端验证系统,专门用于需要真实运行时、真实传输层和可视化证据的 Bug 验证。它在已知有问题的 baseline ref 上运行场景捕获证据,再在候选修复 ref 上运行同一场景,将对比结果作为 PR 可检查的 artifact 发布。
核心要点
- Before/After 对比:在 baseline(已知有 bug)和 candidate(修复版本)上各运行一次场景,生成对比报告
- 多传输支持:Discord(首个实现)、Slack、Telegram、WhatsApp,每个传输有专属场景
- VNC 救援:支持 Linux 桌面 + VNC 访问,用于登录、浏览器自动化或视觉调试卡住时的人工干预
- Crabbox 机器调度:使用 Crabbox 管理预热 Linux 机器、租约追踪、水合、日志和清理
- 证据模型:每次运行写入稳定的 artifact 目录(报告、截图、MP4、JSON 摘要)
- PR 评论集成:通过 Mantis GitHub App 在 PR 上发布内联 before/after 截图和视频
- 不替代单元测试:Mantis 运行后应将 bug 转化为更小的回归测试
配置/使用
本地 Discord smoke 验证:
pnpm openclaw qa mantis discord-smoke \
--output-dir .artifacts/qa-e2e/mantis/discord-smokeBefore/After 对比运行:
pnpm openclaw qa mantis run \
--transport discord \
--scenario discord-status-reactions-tool-only \
--baseline origin/main \
--candidate HEAD \
--output-dir .artifacts/qa-e2e/mantis/local-discordSlack 桌面 VM 运行:
pnpm openclaw qa mantis slack-desktop-smoke \
--gateway-setup \
--scenario slack-canary \
--keep-leaseGitHub 工作流触发(PR 评论):
@Mantis discord status reactions
@Mantis telegram
@Mantis telegram scenario=telegram-status-command
运行生命周期:获取凭证 → 分配 VM → 准备 baseline → 安装构建 → 启动 Gateway → 运行场景 → 捕获证据 → 切换 candidate → 重复 → 对比 → 写报告 → 上传 artifact → 发布 PR 评论
相关页面
- qa-e2e-automation — QA 整体框架
- mantis-slack-desktop-runbook — Slack 桌面 QA 操作手册
- concepts/channel-docking — 渠道对接机制
- agent-loop — Agent 执行路径