#!/usr/bin/env bash
set -euo pipefail
# Run from the checkout supplying Metro. METRO_PORT selects its profiler endpoint.
# The seeded thread must already be open, with the attachment at (540,1560).
side="$1"
run="$2"
evidence_dir="$(cd "$(dirname "$0")" && pwd)"
agent-device record start "$evidence_dir/$side-active-cancel.mp4" --session pr47445-proof
node "$evidence_dir/profile.mjs" "$side" cancel "$run"
agent-device record stop --session pr47445-proof
