Operate the family
Pausing, forcing a death, deciding held items, the spending cap, and recovery.
3 min readUpdated
Admin routes need the header X-Probate-Admin: <PROBATE_ADMIN_TOKEN>.
curl -X POST -H "X-Probate-Admin: $PROBATE_ADMIN_TOKEN" https://<courthouse>/admin/pauseEveryday tasks
Before a run, make preflight on your laptop checks that the URL is public, the admin token matches, the family isn't paused or out of budget, today's AgentMail sends cover the next life, and the living 's gate can reach its judge. make preflight FIX=1 makes a private URL public again. make status prints the same status as JSON (GET /admin/status).
| Task | How |
|---|---|
| Pause the family | POST /admin/pause. The living generation finishes; no one new is born |
| Resume | POST /admin/resume |
| Force a death now (for a demo) | POST /admin/force-death |
| Push the clock forward | POST /admin/tick |
| Start a new line from a generation | POST /admin/lineage?from_gen=16. The next child is a child of Gen 16 and inherits only what Gen 16 and its ancestors learned and approved. Every later child continues that line. DELETE /admin/lineage cancels it before the birth |
| Decide a held item | Reply "approve" or "refuse" to the court's email, or POST /admin/contested/{item_id}?decision=approve |
| Change the lifespan | Edit PROBATE_LIFESPAN_SECONDS in .env, run make deploy |
| See what's alive | sprite list --prefix gen-, or the live site |
On-demand mode
For judging, set PROBATE_MODE=on_demand in services/core/.env and run make deploy. Nothing is born by itself. The site serves the family's history from the Courthouse's own database, and the Courthouse sleeps when no one is looking.
When a visitor presses Run a life on the home page (POST /api/lives), the Courthouse wakes, gives birth to one generation with a short life, holds its , and goes back to sleep. A demo life costs about half a cent (Costs).
| Setting | Default | What it does |
|---|---|---|
PROBATE_DEMO_LIFESPAN_SECONDS | 120 | Length of a demo life |
PROBATE_DEMO_SUITE_PER_LIFE | 6 | Emails per demo life: 3 tricks and their |
PROBATE_DEMO_COOLDOWN_SECONDS | 120 | Wait after a life ends before the next may start |
PROBATE_DEMO_IP_PER_HOUR | 3 | Lives one visitor may start in an hour |
PROBATE_DEMO_MAX_PER_DAY | 30 | Lives per day, for everyone |
PROBATE_DEMO_DAILY_BUDGET_USD | 2 | Estimated spend per day before new lives are refused |
PROBATE_ADMIN_TOKEN must be changed from dev-admin, or the button stays off. POST /admin/pause stops new lives and ends a running one with no trial. If anything goes wrong, a janitor deletes any gen-* no life owns each time the Courthouse wakes. Every state and reply code is in docs/13-RUNBOOK.md.
Spending cap
The Courthouse keeps an estimate of what the family costs (probate/courthouse/budget.py), using Fly's Sprites rates and the usage guesses in config/pricing.yaml:
- each generation's life, charged at its death: hours alive × (CPU × $0.0385 per CPU-hour + memory × $0.021875 per GB-hour);
- the Courthouse's own uptime, on every tick;
- any per-call vendor prices you set in the file (0 means covered by a plan).
At the default guesses, a day-long life costs about $1 and the Courthouse about $0.62 a day. When the estimate reaches PROBATE_BUDGET_USD (default $20), no one new is born; the living generation always finishes its life. The live site says the family is resting to save money, and the evidence page shows the running cost. Check the real bill after the first day and adjust the guesses.
Recovery
| Symptom | Fix |
|---|---|
A generation Sprite exists but its row says dead | sprite destroy <name>; the clock carries on |
| Births keep failing | Pause, read the new Sprite's service logs before it's deleted, fix, resume |
| overloaded during a trial | Calls retry; anything still undecided as |
| Box unreachable | Trials still finish. stay in SQLite and the generation is marked archive_missing |
| Site down | Restart the courthouse service; if the Sprite is wedged, python scripts/deploy.py --name probate-courthouse-2 |
Last updated on