Master health (the three lanes that watch and repair your main branch)
Three scheduled lanes watch your main branch after work lands: one tests a pinned commit every fifteen minutes, one has the fleet run the whole merge gate against a pinned commit every hour, and one asks the fleet to build that pinned commit every hour. A red branch is answered first by reverting the single merge the lane blames, for free. Only a red it cannot pin on one merge starts a paid agent session.
On this page
What it is
The auto-lander and Lander V3 only land. Neither one runs a check after a train, so a main branch that goes red an hour after a merge is nobody's job unless something is watching on a clock. These three lanes are that watch, and they are also the repair:
- The master-health job tests your main branch on a fifteen-minute clock.
- The master-health full job has the fleet run the whole merge gate against a pinned commit on an hourly clock.
- The master-health build job asks the fleet to build that same pinned commit on an hourly clock.
All three ship switched on. Between them they decide, without asking you, whether a red main branch gets reverted and whether a paid session is started — which is why they have a page of their own.
Where to find it
- Each lane's history is one line per run, in
~/.amc/master-health.jsonl,~/.amc/master-health-full.jsonland~/.amc/master-health-build.jsonl. The build job also keeps its latest state in~/.amc/master-health-build.json. A build-history line markedcollectis the build job's second look at a build it gave up on, not a verdict about your newest commit. - The lanes appear with every other scheduled job in the app's scheduled-jobs list, where each row can be switched off on its own.
How it behaves
The test job, every fifteen minutes
Each run pins one commit of your main branch and judges that exact commit from an immutable snapshot: the specs that depend on everything changed since the last judged commit, plus the lint guards. The green pin only advances for the exact commit it pinned when every ask answered — a check that times out, a snapshot that cannot be taken or a base that moved under it is a no answer, never green. A failure the branch's own accepted-failure floor already carries is not treated as a new red, so an old known failure cannot hold the pin still. That is what stops a quiet check from reading like a healthy branch.
A run asks and leaves; the next run collects the answer. The fleet can take longer to answer than a fifteen-minute slot, so a run does not wait for it: it numbers its own question, sends it, writes the number down and exits. The next run looks that question up first, judges the answer against the commit it was asked about, moves the green pin to that commit, and only then asks its own new question. One question is outstanding at a time, and one older than three quarters of an hour is written down as a no answer and dropped. An answer about a different commit is never green and never red.
The whole merge gate used to be one hourly fire of this job, and it could not finish inside the fifteen-minute slot. It is its own lane now (see below), and this job no longer runs it.
The job widens its own interval when a run takes longer than the clock, so two passes never overlap.
The full-check job, every hour
The full-check job pins one commit and has the fleet run the repository's whole merge gate against that exact commit. Nothing heavy runs on your own computer: your checkout is read for git objects only. An answer counts only when the ask ran from a checkout on that commit and the commit never moved while the ask was out, so a verdict about some other commit is a no answer — never green, and never red. A failure the accepted-failure floor already carries is not a new red here either. On a red it takes the same repair arm as the other lanes.
The gate is a long run, so this lane does not sit through it either. A run starts the gate at the
pinned commit with its output going to ~/.amc/master-health-full-ask.log, writes down the commit,
the process and the log, and exits. The next run leaves that checkout alone while the gate is still
running, and once the process is gone it reads the log, checks the checkout is still on the pinned
commit, and records the answer. A gate that dies without printing a verdict is a no answer, never a
red.
What a red main branch costs you
The repair runs in a fixed order, cheapest first.
- Revert first, always — and this costs nothing. The job proves which single merge is to blame, builds an ordinary forward commit that reverts it, and moves your main branch onto that commit through the sanctioned landing road. Nothing is rewritten, no history is destroyed, and no card asks you to approve it: a red main branch is repaired unattended.
- Only then, and only on the second red answer, one paid session. A single red is recorded and left alone. The job starts one agent session only when two answers in a row of the same lane are red and name at least one of the same failing files — your own rule, "only when the same failure shows up in two answers in a row". A run that gives no answer between them neither counts nor breaks the pair, and a green answer clears it. A red that names no failing file can never pair, so it never buys a session. It records a 90-minute lease before it starts anything, so a red that is already being worked starts nothing, and an expired lease allows exactly one more. All three lanes share that same lease, so one red main branch buys at most one fixer however many lanes noticed it.
There is no path here that buys a session for a red a revert could have settled, or for a failure only one answer has shown.
The build job, every hour
The build job pins one commit, asks the fleet to build that exact commit (build:verify --cloud --ship-commit) and records green, red or no answer against that sha. Nothing builds on your own
computer — your checkout is read for git objects only. A verdict that does not name the pinned tree
is a no answer, never green. On a red it tries the same automatic revert as the test lane, and only
a red it cannot pin on one merge starts a fixer session under that same shared lease.
A build now takes nearly as long as the job's own 40-minute wait, so a build that finishes a few minutes
late would be dropped when the next run moved on to a newer commit. To keep that work, the job gives every
build request its own number and remembers the number of the one it is waiting on. A run whose
predecessor got no answer first looks that request up with the fleet's coordinator, whether the
predecessor waited the whole 40 minutes or gave up sooner: a finished answer for that exact commit is
collected without asking for a second build. If nothing final is stored (the request is still open, the
coordinator closed it unanswered, the look-up failed or no number was saved), a predecessor that waited the
whole 40 minutes makes the job fall back to asking the fleet about that same commit once more, for at most
three minutes, under a fresh number. A predecessor that gave up sooner usually had no build in flight, and a
second ask would start one nobody waits for, so nothing is asked and no history line is written; the look-up
only leaves a line in the job's log. Whatever the job collected is written down as its own history line,
marked collect.
A late green moves the job's green pin, writes the measured size of the main file through the same recorder an ordinary build uses, and refreshes the main-file headroom card; a late red is only written down, because the revert and the paid agent session are for a red commit that is still the newest one. The look-up can only recover a build the coordinator answered before its own deadline: in every case measured so far (tests, typecheck and lint requests; no build request has been read yet) the coordinator closed a request it had not answered by its deadline, so a build that runs past the full 40-minute wait is probably not recovered this way. Almost half of the job's no-answers (28 of 61 since 2026-10-25) ended before the 40 minutes, and those are the requests this look-up can reach. This change makes the rest visible; it does not make a build finish sooner and it does not repair a red main branch.
Turning them off
Each lane is one row in the app's scheduled-jobs list, and setting that row to enabled: false
switches it off on its own. With the test job off, your main branch goes back to being tested per
land rather than on a clock; with the build job off, build health goes back to the six-hourly check;
with the full-check job off, the whole merge gate stops being run on a clock at all. Switching one
off does not switch the others off, and does not change what the auto-lander lands.
Related
- Lander V3 (the train lander) — the landing step that runs no check after a train, which is why these jobs exist.
- Auto-lander dashboard — part 2 — the lander's own fixers, which are a different set of paid sessions from the one master health may start.
Last verified 2026-11-12