#!/usr/bin/env bash
set -euo pipefail
# Run from a checkout with dependencies installed and its fresh dev server running:
# T3CODE_DEV_SEED=0 vp run dev
# Set PARENT_MODEL and FORK_MODEL to the two distinct model identifiers privately.
: "${PARENT_MODEL:?required}" "${FORK_MODEL:?required}"
EVIDENCE_ROOT=${EVIDENCE_ROOT:-$(mktemp -d)}
RUN_DIR="$EVIDENCE_ROOT/$(date -u +%Y%m%dT%H%M%SZ)"
mkdir -p "$RUN_DIR/project/.claude/skills/fork-probe"
cat > "$RUN_DIR/project/.claude/skills/fork-probe/SKILL.md" <<EOF
---
name: fork-probe
description: Probe fork metadata
context: fork
agent: general-purpose
model: $FORK_MODEL
effort: high
---
Reply with exactly the word OK
EOF
git -C "$RUN_DIR/project" init -q
git -C "$RUN_DIR/project" add .
git -C "$RUN_DIR/project" -c user.name=Evidence -c user.email=evidence@example.com commit -qm 'Add probe skill'
node apps/server/src/bin.ts project add --base-dir .t3 --title 'Fork metadata probe' "$RUN_DIR/project"
node apps/server/src/bin.ts thread start --base-dir .t3 --provider claudeAgent --model "$PARENT_MODEL" --title 'Fork probe' --wait --json "$RUN_DIR/project" '/fork-probe go' > "$RUN_DIR/turn.json"
# Browser, light theme, 1280x800 CSS pixels:
# Open Fork probe, expand Worked for, hover /fork-probe and capture the chip tooltip.
# Click /fork-probe and capture its completed footer; hide thread details on both.
# Wait for two identical screenshots at least 500 ms apart before keeping each still.
# Compare each fork's assistant transcript model with its displayed model.
# Before public upload: redact paths; consistently alias parent=Model A, fork=Model B.
# AI-assisted; verified with the tests and tools listed above.
