#!/usr/bin/env bash
# Run in each installed checkout, against fresh state. Supply a reachable Gemini-compatible backend.
set -euo pipefail
: "${GEMINI_UPSTREAM:?Set GEMINI_UPSTREAM to the backend origin}"
export T3CODE_DEV_SEED=0
export GOOGLE_GEMINI_BASE_URL=http://127.0.0.1:19864
# Start proxy.mjs in a separate terminal; restart it before each comparison turn.
# Start: vp run dev
# In Settings > Providers, add Antigravity, choose Gemini API key, and enter a non-empty key.
# Create a scratch git project containing file1.txt through file4.txt, with values 17, 34, 51, 68.
# Set PROJECT to that directory and T3_HOME to this checkout's isolated .t3.
node apps/server/src/bin.ts project add "$PROJECT" --base-dir "$T3_HOME"
node apps/server/src/bin.ts thread start --base-dir "$T3_HOME" --provider antigravity --model gemini-4-neon --title 'Mid-turn 404 recovery' "$PROJECT" 'Read file1.txt, file2.txt, file3.txt and file4.txt, in that order. Use a separate tool call for each file, one at a time. Do not combine reads or use parallel calls. After all four reads, report their values and say FOUR FILES COMPLETE.'
# Open the resulting thread immediately and record until it settles, without sending continue.
