← ClaudeAtlas

grove-gatelisted

Grove is the fleet chokepoint. Nothing runs without it. How to gate scripts and agents on Grove health using core/grove_gate.py.
rudi193-cmd/willow-2.0 · ★ 2 · AI & Automation · score 58
Install: claude install-skill rudi193-cmd/willow-2.0
# Grove Gate — Fleet Chokepoint Grove is not optional. When Grove is down, the fleet does not operate. Every script, agent, and cron job that touches fleet infrastructure must check Grove health before doing anything. ## The module: `core/grove_gate.py` ```python from core.grove_gate import assert_grove, grove_alive ``` **`assert_grove(script_name)`** — checks Grove health. If down, prints a loud banner and calls `sys.exit(1)`. Use at the top of any script's `main()` or `__main__` block. **`grove_alive()`** → `bool` — non-fatal check. Use for mid-run polls (e.g., in a watcher loop). ## Standard usage in a script ```python from core.grove_gate import assert_grove as _assert_grove def main(): _assert_grove("my_script") # exits immediately if Grove is down # ... rest of main ``` ## Standard usage in a watcher loop ```python from core.grove_gate import assert_grove as _assert_grove, grove_alive as _grove_alive def watch(): _assert_grove("my_watcher") # hard gate at startup while True: if not _grove_alive(): print("my_watcher: Grove went down — exiting", flush=True) break # ... poll logic ``` ## Grove-gated cron pattern All cron jobs must check Grove before executing: ```cron 15 21 * * 0 curl -sf http://localhost:7777/health > /dev/null 2>&1 && python3 /path/to/script.py >> /tmp/script.log 2>&1 ``` The `curl` check is a no-op if Grove is up. If down, the entire right side is skipped. ## The error banner