#!/usr/bin/env bash
set -euo pipefail
# Run from the directory containing queue-evidence.test.ts; all data is synthetic.
# Both checkouts must have run `vp install` first. No live T3 database is used.
capture_root=/tmp/lead-25697-r2/evidence-capture
mkdir -p "$capture_root/reproduction"
cp "$capture_root/queue-evidence.test.ts" /home/ubuntu/wt/pr-25697-before/apps/server/src/orchestration-v2/queue-evidence.test.ts
cp "$capture_root/queue-evidence.test.ts" /home/ubuntu/wt/pr-25697/apps/server/src/orchestration-v2/queue-evidence.test.ts
git -C /home/ubuntu/wt/pr-25697-before rev-parse HEAD
git -C /home/ubuntu/wt/pr-25697 rev-parse HEAD
sha256sum /home/ubuntu/wt/pr-25697-before/apps/server/src/orchestration-v2/queue-evidence.test.ts /home/ubuntu/wt/pr-25697/apps/server/src/orchestration-v2/queue-evidence.test.ts
(
 cd /home/ubuntu/wt/pr-25697-before/apps/server
 CAPTURE_OUTPUT="$capture_root/reproduction/before" vp test run src/orchestration-v2/queue-evidence.test.ts
) > "$capture_root/reproduction/before.log" 2>&1
(
 cd /home/ubuntu/wt/pr-25697/apps/server
 CAPTURE_OUTPUT="$capture_root/reproduction/after" vp test run src/orchestration-v2/queue-evidence.test.ts
) > "$capture_root/reproduction/after.log" 2>&1
# Each invocation creates a new timestamped directory; previous runs remain intact.
# Remove the two scratch driver files and detached baseline worktree when finished.
