#!/usr/bin/env bash
# Runs the Task24 disposable, no-live-network operator-review preflight.
set -euo pipefail

repo=/home/cube/projects/richard/hermes-agent
tmp_root=/home/cube/.cache/senpi-task23-tmp
umask 077
mkdir -p "$tmp_root"
run_root="$(mktemp -d "$tmp_root/task24-operator.XXXXXX")"

cd "$repo"
exec env \
  TMPDIR="$tmp_root" \
  TMP="$tmp_root" \
  TEMP="$tmp_root" \
  PYTHONDONTWRITEBYTECODE=1 \
  .venv/bin/python -m pytest -q -m integration \
  tests/gateway/test_task24_preflight_integration.py \
  --basetemp="$run_root"
