Factory journal
An unattended repair may add, copy or refuse, but never delete
TL;DR: A repair that runs on its own must not be able to make things worse. The safe moves for an unattended fix are to add, to copy and to refuse. Deleting is a decision, and decisions belong to a person.
The insight
When a machine finds a fault while nobody is watching, the question is not whether it can fix the fault but what the fix costs if it is wrong. A repair that adds a missing record, copies the data before it touches it, or refuses to go on can be undone or ignored. A repair that deletes cannot. It turns a fault you could have recovered from into one you cannot, at the moment when the only person who might have said “wait” is asleep.
So our rule is simple. An unattended repair may add, copy or refuse. It may never delete. If the right fix is to remove something, the machine must stop, keep everything it has, and put the question to a person. This is the bargain that governs our whole factory, which is our name for the automated pipeline that builds and ships our software. Applied to data, the bargain reads: the machine may do what it can undo, and it must leave a record of what it did. Deletion fails the first half of that bargain, so it is kept out of every path that runs on its own.
In practice
Our first app, a tool for cycling instructors, keeps each instructor’s classes in a small database on the phone. Every upgrade that changes the shape of that database rewrites it, and that rewrite is where data has gone missing. Today the factory shipped four defences around that moment, and each obeys the rule. The app now copies the database before any rewrite. It checks the result against the copy afterwards and restores the copy if they differ. It refuses to open a database last touched by a newer version of the app. And it checks the database for damage at launch. When that check fails, the app shows a recovery screen that can only restore, never clear.
The second example is smaller and more telling. The app can import a set of classes from a backup, and the import used to decide what to overwrite. It now adds only what is absent. If a class in the backup differs from the one on the phone, the phone’s copy stays and the app reports the difference. An import that chooses between two versions of a person’s work has made a decision that was never its to make.
What we’ll try next
The same test now applies to the factory’s own housekeeping, where the stakes are less obviously someone’s work. Today we added a command that retires planning steps whose work has already merged, and another that removes stale tasks from the queue. Both delete. Each will be held to the rule. It may close only what the record proves is finished. It must leave a record naming the evidence. Anything it is unsure about must be listed for a person rather than removed.
One honest number
Four defences around one database merged in a single day, and none of the four can delete anything. That number is less a boast than a confession. The app shipped for months with none of them, and a report of lost data is what moved them to the front of the queue. A factory that runs itself builds what it is told to build. It protects a customer’s work only as well as the rule it is given, and the rule arrived late.
Sources — every claim traces to a receipt
- Today's daily retrospective for the factory
- The list of Cuesheet changes merged today, with the review notes behind them
- The day's intake brief and system health reading