#!/usr/bin/env bash
set -euo pipefail
# Run from either app checkout after `vp i`.
# Use a fresh isolated home; do not point this at an existing home.
: "${PROOF_HOME:?Set PROOF_HOME to a fresh absolute directory}"
export HOME="$PROOF_HOME"
export BUN_INSTALL="$HOME/.bun"
mkdir -p "$BUN_INSTALL/bin"
ln -sf "$(command -v bun)" "$BUN_INSTALL/bin/bun"
export PATH="$BUN_INSTALL/bin:$PATH"
printf '[install]\nminimumReleaseAge = 1209600\n' > "$HOME/.bunfig.toml"
bun install -g @openai/codex@0.163.0
FORCE_COLOR=0 bun outdated -g @openai/codex
export T3CODE_DEV_SEED=0
vp run dev
# Pair the browser using the startup pairing URL, then open /settings/providers.
# Click Codex's "Update available, view details" button, then "Update now".
# Once finished, reopen the update popover if it remains.
# Base: v0.165.0, update offer remains, and popover reports an outdated provider.
# Head: v0.165.0, update buttons and warning disappear.
# Refresh provider status to check the already-installed eligible version.
# Captures used Chromium, 1280x800 CSS viewport, light theme, same Bun 1.3.14.
# Only the environment display label was redacted to "Proof environment".
