#!/usr/bin/env bash
# Run the live-API smoke pytest suite (`-m live`) with `.env`-sourced creds.
#
# Default `pytest` deselects live tests via pyproject.toml's
# `addopts = '... -m "not live"'`. This wrapper flips that selection on
# AND sources `.env` so WARP_ANTHROPIC_API_KEY is in the process env.
#
# Cost: roughly $0.02 per full run (six atomic calls × Sonnet 4.6).
#
# Usage:
#   bin/wick-pytest-live                 # all live smoke tests
#   bin/wick-pytest-live -k classify     # one test
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
if [ -f "$REPO_ROOT/.env" ]; then
  set -a
  # shellcheck disable=SC1091
  . "$REPO_ROOT/.env"
  set +a
fi
exec "$REPO_ROOT/.venv/bin/pytest" -m live "$@"
