perf: speed up Mantis Slack desktop smoke

This commit is contained in:
Peter Steinberger
2026-05-05 19:57:08 +01:00
parent 55d1cf87d7
commit e8a9c766c2
5 changed files with 29 additions and 8 deletions

View File

@@ -50,6 +50,7 @@ env:
PNPM_VERSION: "10.33.0"
OPENCLAW_BUILD_PRIVATE_QA: "1"
OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1"
CRABBOX_REF: main
jobs:
authorize_actor:
@@ -164,7 +165,10 @@ jobs:
set -euo pipefail
install_dir="${RUNNER_TEMP}/crabbox"
mkdir -p "$install_dir" "$HOME/.local/bin"
git clone --depth 1 https://github.com/openclaw/crabbox.git "$install_dir/src"
git init "$install_dir/src"
git -C "$install_dir/src" remote add origin https://github.com/openclaw/crabbox.git
git -C "$install_dir/src" fetch --depth 1 origin "$CRABBOX_REF"
git -C "$install_dir/src" checkout --detach FETCH_HEAD
go build -C "$install_dir/src" -o "$HOME/.local/bin/crabbox" ./cmd/crabbox
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
"$HOME/.local/bin/crabbox" --version
@@ -266,7 +270,8 @@ jobs:
if [[ -f "$root/slack-desktop-smoke.mp4" ]]; then
if ! command -v ffmpeg >/dev/null 2>&1 || ! command -v ffprobe >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y ffmpeg || true
sudo apt-get update -y >/tmp/mantis-slack-ffmpeg-apt.log 2>&1 || true
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg >>/tmp/mantis-slack-ffmpeg-apt.log 2>&1 || true
fi
if ! crabbox media preview \
--input "$root/slack-desktop-smoke.mp4" \

View File

@@ -58,6 +58,7 @@ Docs: https://docs.openclaw.ai
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- QA/Mantis: accept Blacksmith Testbox `tbx_...` lease ids from desktop smoke warmup, so provider overrides do not fail before inspect/run. Thanks @vincentkoc.

View File

@@ -133,10 +133,14 @@ pnpm openclaw qa mantis slack-desktop-smoke \
That command leases a Crabbox desktop/browser machine, runs the Slack live lane
inside the VM, opens Slack Web in the VNC browser, captures the desktop, and
copies `slack-qa/`, `slack-desktop-smoke.png`, and `slack-desktop-smoke.mp4`
when video capture is available back to the Mantis artifact directory. Reuse `--lease-id <cbx_...>` after logging in to Slack Web manually
through VNC. With `--gateway-setup`, Mantis leaves a persistent OpenClaw Slack
gateway running inside the VM on port `38973`; without it, the command runs the
normal bot-to-bot Slack QA lane and exits after artifact capture.
when video capture is available back to the Mantis artifact directory. Crabbox
desktop/browser leases provide the capture tools and browser/native-build helper
packages up front, so the scenario should only install fallbacks on older
leases. Reuse `--lease-id <cbx_...>` after logging in to Slack Web manually
through VNC; reused leases also keep Crabbox's pnpm store cache warm. With
`--gateway-setup`, Mantis leaves a persistent OpenClaw Slack gateway running
inside the VM on port `38973`; without it, the command runs the normal
bot-to-bot Slack QA lane and exits after artifact capture.
For an agent/CV style desktop task, run:

View File

@@ -121,7 +121,9 @@ describe("mantis Slack desktop smoke runtime", () => {
const remoteScript = runArgs?.at(-1);
expect(remoteScript).toContain("${BROWSER:-}");
expect(remoteScript).toContain("${CHROME_BIN:-}");
expect(remoteScript).toContain("pnpm install --frozen-lockfile");
expect(remoteScript).toContain("PNPM_STORE_DIR");
expect(remoteScript).toContain("build-essential python3");
expect(remoteScript).toContain("pnpm install --frozen-lockfile --prefer-offline");
expect(remoteScript).toContain("pnpm build");
expect(remoteScript).toContain("ffmpeg");
expect(remoteScript).toContain('sudo apt-get update -y >>"$out/apt.log" 2>&1 || true');

View File

@@ -495,8 +495,17 @@ qa_status=0
{
set -e
echo "remote pwd: $(pwd)"
if ! command -v make >/dev/null 2>&1 || ! command -v python3 >/dev/null 2>&1; then
sudo apt-get update -y >>"$out/apt.log" 2>&1 || true
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential python3 >>"$out/apt.log" 2>&1 || true
fi
sudo corepack enable || sudo npm install -g pnpm@10.33.2
pnpm install --frozen-lockfile
if [ -d /var/cache/crabbox ]; then
export PNPM_STORE_DIR="\${PNPM_STORE_DIR:-/var/cache/crabbox/pnpm}"
mkdir -p "$PNPM_STORE_DIR" >/dev/null 2>&1 || true
pnpm config set store-dir "$PNPM_STORE_DIR" >/dev/null 2>&1 || true
fi
pnpm install --frozen-lockfile --prefer-offline
pnpm build
if [ "$setup_gateway" = "1" ]; then
export OPENCLAW_HOME="$HOME/.openclaw-mantis/slack-openclaw"