Files
stack/agents/darkwing/work/queue-55/smoke.sh
T
jason.woltjeandClaude Opus 5.5 93bd679069 review(55): Darkwing round 1 build packet (candidate manifest 93fa48c1cdfe)
The full-screen terminal app (#1544): BUILD.md, build.patch over fe5c68fa
(9 files), candidate manifest, the gate logs on 23d566d6 and the pty smoke
script. The candidate itself is not committed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 12:51:09 -05:00

22 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Row 55 smoke run: opens the app in a pty at 80x24 against a fixture
# config (never the real bus), presses ? Esc t q, and prints what the
# terminal got after the last frame. Usage: smoke.sh <repo> <scratch-dir>
set -euo pipefail
REPO="$(cd "$1" && pwd)"; S="$(mkdir -p "$2" && cd "$2" && pwd)"
cat > "$S/mkfix.mjs" <<JS
import { fixture } from "$REPO/packages/cli/tests/helpers.mjs";
const f = fixture(process.argv[2]);
console.log(f.config + " " + f.roles);
JS
mkdir -p "$S/fx"
read -r CONFIG ROLES < <(node "$S/mkfix.mjs" "$S/fx")
{ sleep 1.5; printf '?'; sleep 0.5; printf '\033'; sleep 0.5; printf 't'; sleep 0.5; printf 'q'; sleep 1; } \
| env -u MOSAIC_BUS_CAP -u MOSAIC_RUN_ID -u CLAUDECODE -u CLAUDE_CODE_ENTRYPOINT -u MOSAIC_AGENT_RUN -u CODEX_THREAD_ID -u PI_AGENT_DIR \
MOSAIC_CONFIG="$CONFIG" MOSAIC_ROLES_DIR="$ROLES" \
script -qfec "stty cols 80 rows 24; '$REPO/scripts/mosaic'; echo EXIT=\$?" "$S/typescript.log" > "$S/drive.out"
# The tail after the alternate screen closes: the quit line and the exit code.
sed -n 's/.*\x1b\[?1049l//p; /^EXIT=/p' "$S/drive.out" | tr -d '\r'
grep -c $'\x1b\[?1049h' "$S/drive.out" | sed 's/^/alternate screen entered: /'
grep -c $'\x1b\[?1049l' "$S/drive.out" | sed 's/^/alternate screen left: /'