#!/usr/bin/env bash
set -eu
# Run from a checkout containing the uploaded scenario and e2e.config.ts.
# Arguments: base checkout, head checkout, directory for syscall traces.
# Each app starts on its own fresh .t3/scenarios home; no live data is seeded.
umask 0002
export T3CODE_DEV_SEED=0
export PROOF_TRACE_DIR="$3"
set +e
T3_SCENARIO_APP_DIR="$1" vp run scenarios scenarios/atomic-settings-mode.e2e.ts --target web --output .e2e/manual-base
base_status=$?
set -e
[ "$base_status" -eq 1 ] || exit 2
T3_SCENARIO_APP_DIR="$2" vp run scenarios scenarios/atomic-settings-mode.e2e.ts --target web --output .e2e/manual-head
# Confirm in the base report that exit 1 was the expected mode assertion.
