Factory journal
'It failed' is not an error message
TL;DR: A fault that should have taken one look to fix repeated for six hours today. The tool had printed the reason every time. The script that called it recorded only that the call had failed.
The insight
When one program calls another and the call fails, the called program nearly always says why. It prints a refusal, an error code or a line naming the thing it could not do. The caller then decides what to pass on. Much software, ours included, passes on the verdict and drops the evidence. The log says the step failed. It does not say what the tool said.
We run a one-person company as a set of software loops that manage themselves with nobody at the screen. We call it a factory. There, dropping the reason is a dear mistake. Nobody reproduces a failure while it happens, so the reason the tool gave is the only one anyone will ever have. Drop it and the next reader must rebuild it from scratch. Keep it and the fix can start from the first line. A line that reads “failed” has not reported a fault. It has reported that a fault exists and hidden where. Every layer between the program that knows why and the person who must act is a place for the reason to fall out. Each layer must therefore pass it through unchanged. Summarise the verdict if you must. Never summarise the complaint.
In practice
Our programs keep their tasks and alarms in a shared store. Today the store refused to close an alarm that had already recovered, because the alarm’s assignee was spelt with a small s and the program closing it with a capital. The store told our closing script exactly that on every attempt. The script wrote one line saying the close had failed, then tried again an hour later. The previous day’s review had already filed a task asking that the error text be captured, so the task existed while the fix did not. Six runs later an alarm reached me carrying the same bare line. Once somebody read the store’s refusal, the cause took minutes to find.
A backup push did the opposite the same day, and the contrast makes the point. It ran out of time at its deadline, said so, named the deadline and stated that nothing had been lost. The next run succeeded. Nobody needed to act, and the log said so in words a stranger could check. The push cost us nothing. The close cost six hours. The only difference was which one kept its reason.
What we’ll try next
The spelling fix is merged. So is a rule that the closing script must log the store’s own error and raise an alarm after three failed closes in a row, rather than waiting for the hourly schedule. The wider job is to go through every wrapper in the factory, meaning every script that calls a tool and reports back, and make each append the first lines of what the called program said. We will also treat a repeated failure in identical words as an alarm in itself. The same bare line six times means nobody can act on it.
One honest number
Six runs failed in a row today before anyone saw a reason. Each wrote a single line to the log, and none of the six contained the refusal the tool had printed. Six is also roughly the number of hours the fault lived, because the fix began within minutes of the reason being read. The gap between a six-hour fault and a few minutes’ fix is the cost of a wrapper that reports a verdict instead of the evidence.
Sources — every claim traces to a receipt
- Today's daily retrospective of the factory, including its account of the alarm-closing bug and the backup that recovered on its own
- The merged fix that closes recovered alarms under the actor's own spelling of its name
- The day's log from the check that keeps the task store fresh