#!/usr/bin/env bash
set -euo pipefail
# Supply the official OpenCode 2.2.5 binary and an env file containing
# OPENCODE_SERVER_PASSWORD. No host checkout directories are mounted.
docker run --rm --name opencode-catalog-proof \
  -p 127.0.0.1:14932:14932 \
  -v "${OPENCODE_BINARY:?}:/usr/local/bin/opencode:ro" \
  --env-file "${OPENCODE_ENV_FILE:?}" -w /remote \
  debian:bookworm-slim opencode serve --hostname 0.0.0.0 --port 14932

# Run each commit in its own checkout, with dependencies installed:
# T3CODE_DEV_SEED=0 vp run dev
# Pair the browser, then open /settings/providers.
# Add provider -> OpenCode -> Next -> Next.
# Set Server URL to http://127.0.0.1:14932 and the matching password.
# Add instance, select OpenCode, then run browser-driver.mjs through preview bindings.
# Before each drive, reset .topbar-scroll-fade and .overscroll-y-auto scrollTop to 0.
# Compare each screenshot pair with ImageMagick compare -metric AE: all pairs were 0.
# Published images/videos crop 1696x1180+672+336 from 2560x1600 source pixels,
# excluding the private environment label. No provider content is changed.
