From 64cfb2be70a6ff93af95c5cd7f82971b899296de Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Mon, 11 May 2026 13:01:56 +0530 Subject: [PATCH] ci(mantis): avoid host apt in telegram proof --- .github/codex/prompts/mantis-telegram-desktop-proof.md | 4 ++-- .github/workflows/mantis-telegram-desktop-proof.yml | 6 ++---- .../scripts/mantis-telegram-desktop-proof-workflow.test.ts | 7 ++++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/codex/prompts/mantis-telegram-desktop-proof.md b/.github/codex/prompts/mantis-telegram-desktop-proof.md index 7f330148cd8..4d7295d855b 100644 --- a/.github/codex/prompts/mantis-telegram-desktop-proof.md +++ b/.github/codex/prompts/mantis-telegram-desktop-proof.md @@ -45,8 +45,8 @@ Required workflow: install and build each worktree with the repo's normal `pnpm` commands. 5. In each worktree, run the real-user Telegram Crabbox proof flow from the skill. Use `scripts/e2e/telegram-user-driver.py`, the workflow-provided - `crabbox` binary, and the workflow-provided local media tools; do not - generate or patch replacement proof tooling during the run. Use the same + `crabbox` binary, and the workflow-checked local `ffmpeg`; do not generate, + install, or patch replacement proof tooling during the run. Use the same proof idea for baseline and candidate. You may iterate and rerun if the visual result is not convincing. 6. Open Telegram Desktop directly to the newest relevant message with the diff --git a/.github/workflows/mantis-telegram-desktop-proof.yml b/.github/workflows/mantis-telegram-desktop-proof.yml index 608ccbd410a..f7565269d35 100644 --- a/.github/workflows/mantis-telegram-desktop-proof.yml +++ b/.github/workflows/mantis-telegram-desktop-proof.yml @@ -331,15 +331,13 @@ jobs: crabbox --version crabbox media preview --help >/dev/null - - name: Install local proof tools + - name: Check local proof tools shell: bash run: | set -euo pipefail - sudo apt-get update -y - sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg gifsicle test -f scripts/e2e/telegram-user-driver.py + command -v ffmpeg ffmpeg -version >/dev/null - gifsicle --version >/dev/null - name: Ensure agent key exists env: diff --git a/test/scripts/mantis-telegram-desktop-proof-workflow.test.ts b/test/scripts/mantis-telegram-desktop-proof-workflow.test.ts index ea0ce8789b5..3efed840b27 100644 --- a/test/scripts/mantis-telegram-desktop-proof-workflow.test.ts +++ b/test/scripts/mantis-telegram-desktop-proof-workflow.test.ts @@ -40,10 +40,11 @@ describe("Mantis Telegram Desktop proof workflow", () => { expect(readFileSync(USER_DRIVER, "utf8")).toContain("/usr/local/lib/libtdjson.so"); }); - it("preinstalls local proof tools before the Codex agent runs", () => { - const install = workflowStep("Install local proof tools"); - expect(install.run).toContain("apt-get install -y ffmpeg gifsicle"); + it("checks local proof tools before the Codex agent runs", () => { + const install = workflowStep("Check local proof tools"); expect(install.run).toContain("test -f scripts/e2e/telegram-user-driver.py"); + expect(install.run).toContain("command -v ffmpeg"); + expect(install.run).not.toContain("apt-get install"); const agent = workflowStep("Run Codex Mantis Telegram agent"); expect(agent.env?.OPENCLAW_TELEGRAM_USER_DRIVER_SCRIPT).toBe(