Mantis Slack 桌面 QA 是面向需要 Linux 桌面、VNC 救援、Slack Web、真实 OpenClaw 网关、截图、 视频以及 PR 证据评论的 Slack 级别 bug 的真实 UI 线路。 当单元测试或无头的 Slack live 线路无法证明 bug 时使用它。Documentation Index
Fetch the complete documentation index at: https://openclaw.zhcndoc.com/llms.txt
Use this file to discover all available pages before exploring further.
存储模型
Mantis 使用三层不同的存储:- Provider image:由 Crabbox 拥有并存储在云提供商账户中。 它包含 Chrome/Chromium、ffmpeg、scrot、 Node/corepack/pnpm、本地构建工具以及空的缓存目录等机器能力。
- Warm lease state:由当前操作员会话拥有。它在租约存活期间可以包含
已登录的浏览器配置文件、
/var/cache/crabbox/pnpm,以及已准备好的源代码检出。 - Mantis artifacts:由 OpenClaw 运行拥有。它们位于
.artifacts/qa-e2e/mantis/...下,然后 GitHub Actions 会上传它们, Mantis GitHub App 会在 PR 上内联评论证据。
node_modules 或 dist/ 放入预烘焙的 provider image 中。
GitHub 派发
从main 运行工作流:
candidate_ref 值故意限制得很窄,因为工作流使用实时凭据:
当前 main 的祖先、发布标签,或者来自 openclaw/openclaw 的
开放 PR head。
工作流会写入:
- 上传的制品:
mantis-slack-desktop-smoke-<run-id>-<attempt>; - 来自 Mantis GitHub App 的 PR 内联评论;
slack-desktop-smoke.png;slack-desktop-smoke.mp4;slack-desktop-smoke-preview.gif;slack-desktop-smoke-change.mp4;mantis-slack-desktop-smoke-summary.json;mantis-slack-desktop-smoke-report.md;- 远程日志,例如
slack-desktop-command.log、openclaw-gateway.log、chrome.log和ffmpeg.log。
<!-- mantis-slack-desktop-smoke --> 标记原地更新。
本地 CLI
冷源代码证明:node_modules 和已构建的 dist/ 时,
才使用 --hydrate-mode prehydrated。如果这些缺失,Mantis 会闭合失败。
Hydrate 模式
| 模式 | 适用场景 | 远程行为 | 取舍 |
|---|---|---|---|
source | 正常的 PR 证明、冷机器、CI | 在 VM 内运行 pnpm install --frozen-lockfile --prefer-offline 和 pnpm build | 最慢,但源代码检出证明最强 |
prehydrated | 你有意准备了一个可重用的租约 | 需要已有的 node_modules 和 dist/;跳过 install/build | 快,但只对操作员可控的热租约有效 |
/var/cache/crabbox/pnpm。
时间解释
mantis-slack-desktop-smoke-report.md 包含各阶段耗时:
crabbox.warmup:云提供商启动、桌面/浏览器就绪以及 SSH。crabbox.inspect:租约元数据查找。credentials.prepare:Convex 凭据租约获取。crabbox.remote_run:同步、浏览器启动、OpenClaw 安装/构建或 hydrate 验证、网关启动、截图和视频捕获。artifacts.copy:从 VM 通过 rsync 拷回。
crabbox.remote_run 可能会被标记为 accepted。
将 accepted 视为“通过但有解释”,而不是失败场景。
如果运行很慢:
- warmup 占主导:预烘焙或升级到更好的 Crabbox provider image;
source中 remote_run 占主导:使用热租约,改进 pnpm store 复用,或把机器前置条件移入 provider image;prehydrated中 remote_run 占主导:远程工作区实际上并未准备好,或者网关/浏览器/Slack 设置较慢;- artifact copy 占主导:检查视频大小和制品目录内容。
证据检查清单
一条优秀的 PR 评论应展示:- scenario id 和 candidate SHA;
- GitHub Actions 运行 URL;
- 制品 URL;
- 内联截图;
- 可用时的内联动图预览;
- 完整 MP4 和裁剪 MP4 链接;
- 通过/失败状态;
- 附加报告中的时间摘要。
失败处理
如果工作流在 VM 运行前失败,先检查 Actions 作业。典型 原因是未受信任的candidate_ref、缺少环境密钥,或者候选安装/构建失败。
如果 VM 运行失败但截图已拷回,请检查:
crabbox vnc ... 命令打开 VNC。
完成后停止租约:
--lease-id 重新运行。不要把那个浏览器配置文件烘焙进 provider image 中。