#!/usr/bin/env bash
set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
cd "$repo_root"

(cd services/rag-scale-benchmark && go test ./... && go vet ./...)
python3 -m venv .venv-rag-report
.venv-rag-report/bin/pip install 'matplotlib==3.10.6'
.venv-rag-report/bin/python scripts/benchmarks/rag-scale/report.py \
  public/reports/rag-scale-cost-benchmark-2026/raw-results.json \
  --output public/reports/rag-scale-cost-benchmark-2026

echo "Local verification complete. Cloud execution requires a GCP project, billing,"
echo "Cloud Run, Cloud SQL, Secret Manager, Artifact Registry and Load Balancing."
echo "Read docs/07-RAG-SCALE-COST-BENCHMARK.md before provisioning anything."
