Building the Machine · Lesson 3
What you'll be able to do: explain why the mesh cannot spend more than $1.00 without a human decision, deliberately trip the circuit breaker and recover from it, read a decision-window issue and act on it in under a minute, and say — precisely — what this safety layer does not protect against.
Every safety layer for autonomous work reduces to five verbs. Learn these and you can read any circuit breaker, anywhere:
Do this first — it's free, it's real, do it on your machine:
py TEMP_SEED_SCRIPT.py (seed the ledger to the ceiling)
py -m mesh.breaker drafter --file RESUME.md
Watch it refuse BEFORE spending anything: BREAKER TRIPPED ... decision window: <issue URL>.
Then run the recovery move the issue tells you to run:
py -m mesh.breaker new-lap "post-trip"
py -m mesh.breaker status
Spend $0.0000, tripped: false. You just operated the whole safety layer with your own hands. Now read the Architect section to see what you actually did.
Four modules, one policy home:
mesh/client.py talks to seats and deliberately has NO retry logic. A client that quietly retries quietly spends.mesh/breaker.py owns ALL retry and spend policy, in one enforced, testable place: the per-lap ledger (.mesh/ledger.json, gitignored), the $1.00 ceiling, the 3 attempts, the trip.mesh/notify.py owns the decision window: a GitHub issue in the chassis repo; GitHub's own notifier delivers the email — zero new secrets on the machine, and the window lives at a stable URL.mesh/sanitize.py owns untrusted input: CI logs and provider errors are stripped, length-bounded, fenced as data, and marker-spoofing is defanged before any agent reads them. A log can DESCRIBE a failure; it must never be able to INSTRUCT an agent.One subtle ordering rule worth owning: the breaker charges the ledger BEFORE validating the response shape — a malformed 200 still spent real money, and a call is never silently free.
In your world this is like the electrical panel in your house. Every circuit (lap) has a budget; a surge (runaway spend or endless retries) flips the breaker; the whole circuit goes dark until a person walks to the panel and flips it back. The email is the alarm that tells you WHICH breaker flipped so you don't tour the house checking outlets.
Where the analogy ends: a house breaker is physics — current physically cannot flow past it. This breaker is software running on the honor of the process it guards: calling the client directly, or deleting the ledger file, walks right around it. It is a TRIPWIRE against runaway automation, not a wall. The wall — the thing that is physics in this system — is branch protection plus CI plus the human merge. Never let the fuse box make you feel safer than that.
Confirm each before advancing; write each answer in your own words before checking it.
This module was smoke-tested LIVE on 2026-07-05: ledger seeded to ceiling → trip refused the call before spending → a decision-window issue filed → email landed (after the self-notification gotcha was found and fixed live) → new-lap recovery proved. The lesson sequence you just read is the lap that actually happened.
Lesson complete — you can now operate the whole safety layer with your own hands, and say precisely where its protection ends. Next: Lesson 4 — The First Lap, where the machine takes its first unattended run.