From 1caf3ae6741b4ae25a9ef0052524446c48982b86 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Mon, 11 May 2026 13:11:12 +0530 Subject: [PATCH] ci(mantis): install static proof media tools --- .github/codex/prompts/mantis-telegram-desktop-proof.md | 8 ++++---- .github/workflows/mantis-telegram-desktop-proof.yml | 10 ++++++++-- .../mantis-telegram-desktop-proof-workflow.test.ts | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/codex/prompts/mantis-telegram-desktop-proof.md b/.github/codex/prompts/mantis-telegram-desktop-proof.md index 4d7295d855b..835727962f8 100644 --- a/.github/codex/prompts/mantis-telegram-desktop-proof.md +++ b/.github/codex/prompts/mantis-telegram-desktop-proof.md @@ -45,10 +45,10 @@ 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-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. + `crabbox` binary, and the workflow-provided local `ffmpeg`/`ffprobe`; 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 runner `view` command before finishing each recording. Keep the chat scrolled to the bottom so new proof messages appear in-frame. diff --git a/.github/workflows/mantis-telegram-desktop-proof.yml b/.github/workflows/mantis-telegram-desktop-proof.yml index f7565269d35..734a13f0dab 100644 --- a/.github/workflows/mantis-telegram-desktop-proof.yml +++ b/.github/workflows/mantis-telegram-desktop-proof.yml @@ -331,13 +331,19 @@ jobs: crabbox --version crabbox media preview --help >/dev/null - - name: Check local proof tools + - name: Install local proof tools shell: bash run: | set -euo pipefail test -f scripts/e2e/telegram-user-driver.py - command -v ffmpeg + media_tools="${RUNNER_TEMP}/mantis-media-tools" + install -d "$media_tools" + printf '%s\n' '{"private":true}' > "$media_tools/package.json" + pnpm --dir "$media_tools" --config.dangerouslyAllowAllBuilds=true add ffmpeg-static@5.2.0 ffprobe-static@3.1.0 + sudo install -m 0755 "$media_tools/node_modules/ffmpeg-static/ffmpeg" /usr/local/bin/ffmpeg + sudo install -m 0755 "$media_tools/node_modules/ffprobe-static/bin/linux/x64/ffprobe" /usr/local/bin/ffprobe ffmpeg -version >/dev/null + ffprobe -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 3efed840b27..d851f9ea6d0 100644 --- a/test/scripts/mantis-telegram-desktop-proof-workflow.test.ts +++ b/test/scripts/mantis-telegram-desktop-proof-workflow.test.ts @@ -40,10 +40,13 @@ describe("Mantis Telegram Desktop proof workflow", () => { expect(readFileSync(USER_DRIVER, "utf8")).toContain("/usr/local/lib/libtdjson.so"); }); - it("checks local proof tools before the Codex agent runs", () => { - const install = workflowStep("Check local proof tools"); + it("installs local proof tools before the Codex agent runs", () => { + const install = workflowStep("Install 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).toContain("ffmpeg-static@5.2.0"); + expect(install.run).toContain("ffprobe-static@3.1.0"); + expect(install.run).toContain("/usr/local/bin/ffmpeg"); + expect(install.run).toContain("/usr/local/bin/ffprobe"); expect(install.run).not.toContain("apt-get install"); const agent = workflowStep("Run Codex Mantis Telegram agent");