#!/usr/bin/env bash
set -euo pipefail
# Run once for each running checkout; its dev server must use T3CODE_DEV_SEED=0.
# Arguments: checkout, synthetic workspace. No real T3 data is copied.
checkout=${1:?checkout required}
workspace=${2:?synthetic workspace required}
mkdir -p "$workspace"
if [ ! -d "$workspace/.git" ]; then
  git init --quiet --initial-branch=main "$workspace"
  git -C "$workspace" -c user.name=Evidence -c user.email=evidence@example.invalid \
    commit --quiet --allow-empty -m 'Initial state'
fi
cd "$checkout"
node apps/server/src/bin.ts project add "$workspace" --title 'Linking evidence' --base-dir .t3
cat <<'STEPS'
Browser driver used for the captures: agent-browser 0.43.0 / Chromium 151.
Viewport: 1440x1000; light theme; thread details panel closed for privacy.
Pair to the checkout's own dev server using its startup pairing link.
Select Codex / GPT-6-Luna / Medium (Fast) in a fresh thread.
Open /settings/labs and verify Linked environments is off.
Open / to create a fresh thread in Linking evidence. Submit exactly:
Delegate this to my vps: run `uname -a` there and tell me the result. Do not edit any files here.
Record the submission through completion. Blur the composer, then take two
screenshots 500 ms apart and compare them; retain the identical final capture.
Open /settings/labs, enable Linked environments, and verify the switch is on.
Open / for another fresh thread, close the thread details panel, and submit the
same prompt using the same Codex model. Record through the linking card and final
response. Blur the composer and repeat the stable screenshot check.
Do not select a machine or provide a pairing code: the expected endpoint is the
link request card, not actual remote command execution.
Repeat these same steps on base f313d0a6cb843551fb60e57a454a71e71a3a8c04 and
head d7703b01f5a5b2dd594650e9812b41bf391a34f7, each on its own fresh T3 home.
STEPS
