Wraps the self-healing supervisor + dashboard + report generator into one
launch → monitor → recover → grade → summarize → report → publish flow.
-
Confirm parameters. Model/preset, the two arms, and target N (ask if
unstated — N=3 quick, N=10–20 canonical). Presets select model/container/gguf/
ctx/arms: 397b (default; byte-for-byte the live config), qwen3.6-27b
(runnable llama.cpp path once its gguf is confirmed on disk), step3p7 (vLLM
STUB — ensure_endpoint raises NotImplementedError, do not launch it). A
--config <cfg.json> is applied on top of the preset (config wins, additive).
-
Check for a live run first (idempotent — safe to attach). If
status.json exists, phase is a run:/passN value, and it is fresh
(stat -c %Y of the file vs date +%s, NOT ls/mtime eyeballing), an
autopilot is already driving — do NOT launch a second one (two supervisors
fight over the endpoint container + sandboxes). The autopilot also self-guards:
on start it aborts (AUTOPILOT_ABORTED_DOUBLE_DRIVE, exit 3) if another
heartbeat is <120s fresh. Just monitor (step 4).
-
Launch the autopilot (only if none is live), backgrounded; it is
re-entrant — completed cells are skipped, so relaunch after a crash resumes:
nohup python3 "$AUTOPILOT" --target-n 20 \
> /tmp/bench-autopilot/launch.log 2>&1 &
echo "autopilot pid $!"
With a preset and publish-on-complete:
nohup python3 "$AUTOPILOT" --target-n 20 --preset 397b --publish \
> /tmp/bench-autopilot/launch.log 2>&1 &
Pushover milestones (start / endpoint restart / arm complete / run
done|incomplete / harness-anomaly) are always-on, no-op without
~/dream-fleet-test/lib/notify.sh + ~/.pushoverrc. Other knobs:
--config <cfg.json>, --max-passes N (default 6), --once (write one
status snapshot and exit — for an external monitor, does not drive a run).
The autopilot prints AUTOPILOT_COMPLETE / AUTOPILOT_INCOMPLETE at the end.
-
Monitor — sample substance, don't hold a watch loop. Take a one-shot read
each check; reserve --watch for a human terminal:
python3 "$DASH" --oneline
python3 "$DASH" --no-color
python3 "$DASH" --no-color --no-events --no-sparkline
python3 "$DASH" --html /tmp/bench-autopilot/dashboard.html
python3 "$DASH" --watch
python3 "$DASH" --json
python3 "$DASH" --trend
python3 "$DASH" --flips
tail -n 30 /tmp/bench-autopilot/autopilot.log
--json is the machine-readable path (derived from grade.json, works even on a
partial run); --trend reveals where a small-N read was misleading; --flips
surfaces high-variance cells. All three are read-only and exit rc=0 on sparse
data. Render flags: --oneline --no-events --no-sparkline --html --watch --no-color. status.json also carries eta_secs/recent_cells/fails/
started_at/elapsed_secs/preset/model/engine for direct jq.
-
Auto-recovery — the autopilot does this itself. Endpoint restart (down
90s during a run → relaunch with --reasoning-format none etc.; loud Pushover
on a load failure), stuck-cell kill (transcript frozen > stuck_secs, default
1200s → exact-PID SIGTERM/SIGKILL + drop sandbox), idempotent resume across
passes, and a priority-1 anomaly alert when ≥3 consecutive freshly-graded cells
are GRADER_FAILED/MISSING_OUTPUT (a harness/grader break, distinct from
model-quality fails). Only intervene by hand if it is wedged AND you confirmed
it by substance, not a stale mtime — use the surgical kill recipe in gotchas.
-
Grade + summarize — produced per arm automatically when an arm finishes.
To (re)run on demand (idempotent), once per arm:
bash "$TOOLING/scripts/grade_microbench.sh" 397b-nothink
bash "$TOOLING/scripts/summarize.sh" 397b-nothink
The summary table is the headline artifact for the writeup.
-
On completion (status.json phase == "COMPLETE", all cells present for
every arm) → generate the findings doc, then publish.
-
Findings doc — bench_report.py builds the full markdown (read-only;
does not touch status.json/autopilot/dashboard):
python3 "$REPORT" --n 20 --out /tmp/bench-autopilot/findings.md
python3 "$REPORT" --n 10
Flags: --n (target N, default 20), --out FILE, --logs DIR
(default ~/bench/logs).
-
Scorecard + git commit — the autopilot's --publish (on a COMPLETE run
only) writes /tmp/bench-autopilot/scorecard.md (per-task pass/N for both arms
- totals + Δ vs the N=10 nothink baseline) and
git add+commits it to a
bench-results-<date> branch in ~/bench (NOT pushed; idempotent; never
crashes the run on git failure). If the run already finished without
--publish, re-run the autopilot at the same --target-n with --publish —
all cells are done so it goes straight to the scorecard step.
-
Publish to the MMBT repo (origin =
Light-Heart-Labs/MMBT-Messy-Model-Bench-Tests) for an external audience:
cd "$REPO"
git checkout -b mmbt-<model>-n<N>-$(date +%Y%m%d)
git add logs/
git commit -m "MMBT <model> N=<N>: <one-line headline>"
git push -u origin HEAD
gh pr create --fill
Follow repo methodology: drift via harness sha256 (not git_sha); keep the
think-block / market STRUCTURAL_PASS caveats noted.
-
Reclaim the box when fully done — free GPU + scratch:
docker ps -aq --filter name=bench-sandbox- | xargs -r docker rm -f
docker rm -f llama-397b
sudo rm -rf "$TOOLING"/workspace/*_v* /tmp/grade_*_v*
Leave /tmp/bench-autopilot/ for the record unless the user wants it gone.
-
Notify (optional): notify_push "MMBT published" "PR opened for <model> N=<N>" 1.