#!/usr/bin/env bash
set -euo pipefail
# Run from either clean checkout. Supply the same installed Claude model privately.
# First start its server: T3CODE_DEV_SEED=0 CLAUDE_CODE_AUTO_COMPACT_WINDOW=150000 vp run dev
: "${EVIDENCE_MODEL:?Set the installed Claude model slug privately}"
: "${EVIDENCE_ROOT:?Set an absolute scratch directory}"
run_dir="$EVIDENCE_ROOT/$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$run_dir/sample-project"
git init -q "$run_dir/sample-project"
node apps/server/src/bin.ts project add "$run_dir/sample-project" --title 'Context meter evidence' --base-dir .t3 > "$run_dir/project.log"
node apps/server/src/bin.ts thread start --base-dir .t3 --provider claudeAgent --model "$EVIDENCE_MODEL" --wait --json --title 'Context meter evidence' "$run_dir/sample-project" 'Reply with the word ok.' > "$run_dir/turn.json" 2> "$run_dir/turn.err"
# Open the startup pairing URL in the real web client; open the completed thread.
# Dark theme, viewport 1280x800, device scale factor 2 on both sides.
# Right-click the details card: enable Context window; disable Environment and worktree.
# Move from the thread title to the Context row and record its tooltip appearing.
# Take two screenshots >=500ms apart and require identical bytes before using the latter.
# Resize captures to CSS pixels and crop bottom 160px to exclude private model metadata.
