perf: speed up Mantis Slack desktop smoke · openclaw/openclaw@e8a9c76
steipete
·
2026-05-06
·
via Recent Commits to openclaw:main
File tree
extensions/qa-lab/src/mantis
| Original file line number | Diff line number | Diff line change |
|---|
@@ -50,6 +50,7 @@ env:
|
50 | 50 | PNPM_VERSION: "10.33.0" |
51 | 51 | OPENCLAW_BUILD_PRIVATE_QA: "1" |
52 | 52 | OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1" |
| 53 | +CRABBOX_REF: main |
53 | 54 | |
54 | 55 | jobs: |
55 | 56 | authorize_actor: |
@@ -164,7 +165,10 @@ jobs:
|
164 | 165 | set -euo pipefail |
165 | 166 | install_dir="${RUNNER_TEMP}/crabbox" |
166 | 167 | mkdir -p "$install_dir" "$HOME/.local/bin" |
167 | | - git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src" |
| 168 | + git init "$install_dir/src" |
| 169 | + git -C "$install_dir/src" remote add origin https://github.com/openclaw/crabbox.git |
| 170 | + git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF" |
| 171 | + git -C "$install_dir/src" checkout --detach FETCH_HEAD |
168 | 172 | go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox |
169 | 173 | echo "$HOME/.local/bin" >> "$GITHUB_PATH" |
170 | 174 | "$HOME/.local/bin/crabbox" --version |
@@ -266,7 +270,8 @@ jobs:
|
266 | 270 | |
267 | 271 | if [[ -f "$root/slack-desktop-smoke.mp4" ]]; then |
268 | 272 | if ! command -v ffmpeg >/dev/null 2>&1 || ! command -v ffprobe >/dev/null 2>&1; then |
269 | | - sudo apt-get update && sudo apt-get install -y ffmpeg || true |
| 273 | + sudo apt-get update -y >/tmp/mantis-slack-ffmpeg-apt.log 2>&1 || true |
| 274 | + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg >>/tmp/mantis-slack-ffmpeg-apt.log 2>&1 || true |
270 | 275 | fi |
271 | 276 | if ! crabbox media preview \ |
272 | 277 | --input "$root/slack-desktop-smoke.mp4" \ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -58,6 +58,7 @@ Docs: https://docs.openclaw.ai
|
58 | 58 | - QA/Codex harness: add targeted live Docker/Testbox diagnostics, auth preflight checks, cache mount fixes, and app-server protocol checkout discovery so maintainer harness failures are easier to reproduce. Thanks @vincentkoc. |
59 | 59 | - QA/Mantis: add `pnpm openclaw qa mantis slack-desktop-smoke` to run Slack live QA inside a Crabbox VNC desktop, open Slack Web, and capture desktop screenshots beside the Slack QA artifacts. |
60 | 60 | - QA/Mantis: add visual desktop tasks with Crabbox MP4 recording, screenshot capture, and optional image-understanding assertions, and preserve video artifacts in Mantis before/after reports. |
| 61 | +- QA/Mantis: reuse Crabbox desktop/browser capture tooling and pnpm store caches during Slack desktop smoke runs, reducing per-scenario setup work before screenshots and videos are captured. |
61 | 62 | - QA/Mantis: pass the runtime env through desktop-browser Crabbox and artifact-copy child commands, so embedded Mantis callers can provide Crabbox credentials without mutating the parent process. Thanks @vincentkoc. |
62 | 63 | - QA/Mantis: return the copied Slack desktop screenshot path even when remote Slack QA fails, so the CLI still prints the failure screenshot artifact. Thanks @vincentkoc. |
63 | 64 | - QA/Mantis: accept Blacksmith Testbox `tbx_...` lease ids from desktop smoke warmup, so provider overrides do not fail before inspect/run. Thanks @vincentkoc. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -133,10 +133,14 @@ pnpm openclaw qa mantis slack-desktop-smoke \
|
133 | 133 | That command leases a Crabbox desktop/browser machine, runs the Slack live lane |
134 | 134 | inside the VM, opens Slack Web in the VNC browser, captures the desktop, and |
135 | 135 | copies `slack-qa/`, `slack-desktop-smoke.png`, and `slack-desktop-smoke.mp4` |
136 | | -when video capture is available back to the Mantis artifact directory. Reuse `--lease-id <cbx_...>` after logging in to Slack Web manually |
137 | | -through VNC. With `--gateway-setup`, Mantis leaves a persistent OpenClaw Slack |
138 | | -gateway running inside the VM on port `38973`; without it, the command runs the |
139 | | -normal bot-to-bot Slack QA lane and exits after artifact capture. |
| 136 | +when video capture is available back to the Mantis artifact directory. Crabbox |
| 137 | +desktop/browser leases provide the capture tools and browser/native-build helper |
| 138 | +packages up front, so the scenario should only install fallbacks on older |
| 139 | +leases. Reuse `--lease-id <cbx_...>` after logging in to Slack Web manually |
| 140 | +through VNC; reused leases also keep Crabbox's pnpm store cache warm. With |
| 141 | +`--gateway-setup`, Mantis leaves a persistent OpenClaw Slack gateway running |
| 142 | +inside the VM on port `38973`; without it, the command runs the normal |
| 143 | +bot-to-bot Slack QA lane and exits after artifact capture. |
140 | 144 | |
141 | 145 | For an agent/CV style desktop task, run: |
142 | 146 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -121,7 +121,9 @@ describe("mantis Slack desktop smoke runtime", () => {
|
121 | 121 | const remoteScript = runArgs?.at(-1); |
122 | 122 | expect(remoteScript).toContain("${BROWSER:-}"); |
123 | 123 | expect(remoteScript).toContain("${CHROME_BIN:-}"); |
124 | | -expect(remoteScript).toContain("pnpm install --frozen-lockfile"); |
| 124 | +expect(remoteScript).toContain("PNPM_STORE_DIR"); |
| 125 | +expect(remoteScript).toContain("build-essential python3"); |
| 126 | +expect(remoteScript).toContain("pnpm install --frozen-lockfile --prefer-offline"); |
125 | 127 | expect(remoteScript).toContain("pnpm build"); |
126 | 128 | expect(remoteScript).toContain("ffmpeg"); |
127 | 129 | expect(remoteScript).toContain('sudo apt-get update -y >>"$out/apt.log" 2>&1 || true'); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -495,8 +495,17 @@ qa_status=0
|
495 | 495 | { |
496 | 496 | set -e |
497 | 497 | echo "remote pwd: $(pwd)" |
| 498 | + if ! command -v make >/dev/null 2>&1 || ! command -v python3 >/dev/null 2>&1; then |
| 499 | + sudo apt-get update -y >>"$out/apt.log" 2>&1 || true |
| 500 | + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python3 >>"$out/apt.log" 2>&1 || true |
| 501 | + fi |
498 | 502 | sudo corepack enable || sudo npm install -g pnpm@10.33.2 |
499 | | - pnpm install --frozen-lockfile |
| 503 | + if [ -d /var/cache/crabbox ]; then |
| 504 | + export PNPM_STORE_DIR="\${PNPM_STORE_DIR:-/var/cache/crabbox/pnpm}" |
| 505 | + mkdir -p "$PNPM_STORE_DIR" >/dev/null 2>&1 || true |
| 506 | + pnpm config set store-dir "$PNPM_STORE_DIR" >/dev/null 2>&1 || true |
| 507 | + fi |
| 508 | + pnpm install --frozen-lockfile --prefer-offline |
500 | 509 | pnpm build |
501 | 510 | if [ "$setup_gateway" = "1" ]; then |
502 | 511 | export OPENCLAW_HOME="$HOME/.openclaw-mantis/slack-openclaw" |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。