#!/usr/bin/env bash
# Run from a current-main checkout, with the downloaded scenario in scripts/scenarios/.
# Keep this driver and forge.py together in a disposable evidence directory.
set -eu
fixture_dir="$(cd "$(dirname "$0")" && pwd)"
mkdir -p "$fixture_dir/gh"
python3 "$fixture_dir/forge.py" &
forge_pid=$!
trap 'kill "$forge_pid"; wait "$forge_pid" 2>/dev/null || true' EXIT
printf 'http_unix_socket: %s/forge.sock\n' "$fixture_dir" > "$fixture_dir/gh/config.yml"
export GH_CONFIG_DIR="$fixture_dir/gh"
export GH_TOKEN=synthetic-scenario-token
export T3CODE_DEV_SEED=0
export T3_SCENARIO_INHERIT_ENV=GH_CONFIG_DIR,GH_TOKEN,T3CODE_DEV_SEED
vp run scenarios:prove scripts/scenarios/pr-conversation-header-wrap.e2e.ts \
  --base 00f617db4e97dbfc4d713f69d9f90394e7d3b12a \
  --head 6439cebe9ce23fceb7a3f446d2058dbab672e586 --upload-command 'ghdrop upload'
