#!/usr/bin/env bash
# Complete the naive-OFF ablation arm to full budget on a fresh store (dash1).
set -u
export OPENAI_API_KEY=$(python3 -c 'import json,pathlib;print(json.load(open(pathlib.Path.home()/".codex/auth.json"))["OPENAI_API_KEY"])')
# codex config.toml points at a local proxy (127.0.0.1:11235) that exists on dash0 but
# not dash1; the LLM endpoint is reachable directly, so force a direct connection.
export http_proxy= https_proxy= all_proxy= HTTP_PROXY= HTTPS_PROXY= ALL_PROXY= no_proxy='*'
mkdir -p .aituner
rm -rf .aituner/abl-naive-d1 .aituner/ABL_NAIVE_D1_DONE
echo "=== naive OFF (dash1) start $(date -Is) ==="
PYTHONPATH=src python3 -m aituner.cli study tune \
  --spec configs/examples/dash0_qwen27b_ablation_naive_off.json \
  --store-root .aituner/abl-naive-d1 --max-trials 6 --skip-baseline > .aituner/abl-naive-d1.log 2>&1
echo "=== naive OFF (dash1) done  $(date -Is) ==="
touch .aituner/ABL_NAIVE_D1_DONE
