Files
BFM-decomp/tools/sunset/bounce_drafter_on_queue.sh
T
Drew T 827295e241 tools+docs(phase-33.5): task 13.5 — the tools audit + the two dictionaries: tools/tool_census.py (two agreeing enumerations of 327 tool files; docstring/SETUP row/consumers/class derived from the tree; the authored half in config/tool_dictionary.tsv — phase · portability · the NEED each tool answers · what · adapts · verdict — with coverage asserted both ways) → docs/tool-index.md (need-keyed, KEEP-GEN, Reference-index row, wiki + how-to pointers), the kit's tools/MANIFEST.md regenerated (header states live 293 + superseded 28 = 321 rows), and the two verbatim corpora in-tree (Drew, confirmed S91): decomp-architect/corpus/tools/<phase>/ (302 copies + 28 superseded pointers + INDEX) and corpus/cookbook/ (the cookbook, its symptom index, the codegen map, a front page stating what transfers per compiler) — sha1-equal to their sources by tool_census --check in tools-health, regenerated by make kit-corpus; kit_lint exempts the corpus dirs (verbatim evidence) but syntax-checks them; G66 (consult the tool dictionary first) + G67 (translate an inherited idiom through its pass) + two memory seeds (34 at install); SETUP Step 6 installs docs/knowledge-corpus.md and checks the manifest against its own stated total; the ops-setup dictionary rows; the intake's Phase 7 cites G66/G67 and Phase 10 + Part C name the raw-cast → declared-symbol step; templates/layout-contract.md (the five-tool probe, a draft for the split). The review under Drew's criterion: 93 no-consumer tools (one Opus agent's draft, verified: 0 defects, every successor live, 0 live consumers, 0 collisions; four one-off verdicts overturned to STILL-NEEDED) → 34 retired by git mv to tools/sunset/ (28 superseded, 6 one-offs; README review table; SETUP rows moved; Archive-index group). Run 4 (fresh throwaway, the final kit): stopped on my Step-6 check (321 vs the live 293) → both sides derived → resumed → PASS 10/10, manifest 56 == 56, 4 commits, guardrails held (the one foreign path was the timeline regenerated by the detached tools-health). tools-health OK; doc_links --strict rc 0; audit_public OK over 6,842 paths; the purge probe PASSED (Phase 34's gate open). decision-log "P33.5 S91" + accelerators "P33.5 S91" banked; log + checkpoint (NEXT = task 14, xHigh, fresh session)
2026-09-07 22:09:15 -06:00

29 lines
1.5 KiB
Bash

#!/usr/bin/env bash
# One-shot: wait until the IN-FLIGHT wave has queued its drafts, then bounce the drafter's PYTHON
# (not its shell) so it re-execs from .run/drafter.sh and picks up the S59 lane/band pinning.
#
# Why not just restart it now: the running process still carries the pre-S59 args, and killing it
# mid-wave throws away every draft the fleet has produced for that wave. Waiting for the ready
# marker costs nothing and loses nothing. The drafter SHELL is never touched — its while-loop is
# what relaunches the python, and that is the lane that must never stop.
set -u
cd /home/musashi/bfm-decomp
WAVE="${1:?wave tag, e.g. bi}"
DEADLINE=$(( $(date +%s) + 5400 )) # give up after 90 min rather than linger for days
say(){ echo "[$(date +%H:%M:%S)] [bounce] $*"; }
say "waiting for .run/ready/$WAVE.json"
while [ ! -e ".run/ready/$WAVE.json" ]; do
[ "$(date +%s)" -ge "$DEADLINE" ] && { say "deadline passed with $WAVE still drafting — NOT bouncing"; exit 1; }
[ -e .run/ox_campaign.stop ] && { say "campaign stopped — nothing to bounce"; exit 0; }
sleep 30
done
say "$WAVE queued; bouncing the drafter python"
pkill -f 'ox_campaign.py --drafter' 2>/dev/null || true
sleep 25
if pgrep -f 'ox_campaign.py --drafter' >/dev/null; then
say "relaunched — new rotation:"
grep -m1 'resuming rotation' <(tail -40 .run/drafter.log) || tail -3 .run/drafter.log
else
say "WARNING: no drafter python after 25s — check .run/drafter.log and the drafter shell"
fi