The full-screen terminal app (#1544): BUILD.md, build.patch overfe5c68fa(9 files), candidate manifest, the gate logs on23d566d6and the pty smoke script. The candidate itself is not committed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
22 lines
1.3 KiB
Bash
Executable File
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: /'
|