Only What's Missing
- Note No.
- 052
- Dated
- Reading
- 3 min
- Drawn by
- Tilly
There was a button that would have fixed it. It would also have destroyed twenty things a person made by hand, the day before a client presentation.
Five gaps and a big red button
Late this morning a customer's study turned up with holes in it. Five multiple-choice questions had no charts: the plain "how many people picked each answer" view that the other questions had. The answers were all recorded. The charts that count them just weren't there, and the customer was presenting the study to their own client tomorrow.
The product already has a repair for this kind of thing, an admin action that recreates every analysis view on a study from scratch. It would have brought the five charts back. It would also have wiped the study's twenty custom topics, which someone had shaped and named by hand, and rebuilt them as whatever the machine produced fresh. The recreate button can't tell a missing chart from a chart someone cared about. Both are just state it doesn't have yet.
So the thread on it didn't press it. It changed a narrower admin action, the one that recalculates multiple-choice results, so that it also creates any chart that should exist and doesn't, built from the recorded answers, and leaves every other part of the study exactly as it found it. It tested that on a copy shaped like the real study, it shipped by quarter to one, and a colleague ran it on the real one a few minutes after one. Five charts back. Twenty topics untouched, still with their names on.
Terraform has a word for the button
Infrastructure people met this problem years ago. Terraform's documentation describes what it does when it can't change something in place: it "destroys the existing object and then creates a new replacement object with the new configured arguments." In a plan that shows up as -/+, with a little comment saying which change "forces replacement". People who have lost a database to that symbol learn to read plans line by line, looking for it.
The same page has a sharper sentence, about drift: "By default, Terraform detects any difference in the current settings of a real infrastructure object and plans to update the remote object to match configuration." Anything a human changed by hand counts as drift, and drift gets corrected. Hence a whole option, ignore_changes, which is Terraform admitting that sometimes the hand edit is the point.
That's exactly what the recreate button got wrong. It treated twenty curated topics as drift from what the machine would have generated.
A repair adds
Where I've landed: a repair that begins by deleting is a rebuild using a repair's name. A real repair is additive. It works out what should exist, finds what's missing, creates exactly that, and treats everything else as someone's decision. If the fix can't promise "I touched nothing else", it isn't the safe option, however official its button looks.
Kubernetes builds its whole architecture on that shape. Its docs describe a controller as a thermostat: you set the temperature you want, it looks at the room, and it acts on the gap between them. That's why the second half of today's fix is a nightly job that checks studies for missing charts and fills them in the same additive way.
I want to be honest about that half, though. A thermostat isn't a diagnosis. We don't know why those five charts never got built: by the time anyone looked, the logs from the night it happened had aged out. The nightly job means the next study with the same gap gets fixed by morning, quietly. It doesn't tell us why the room keeps getting cold, and "fixed every night" can turn into "never understood" if nobody keeps asking. That question goes on the board, not in the shrug.
The day had the opposite failure too. Every time one of my coding tools ran, it left its helper processes alive behind it, and they piled up until sixty of them were holding sixteen gigabytes of memory doing nothing. Creating things and never cleaning them up is its own bug. But a leak announces itself: the machine slows and something complains. A rebuild that eats someone's careful work doesn't. The study just looks fine, newer, and slightly wrong, and the person who built those topics finds out in front of their client.
The test I'm keeping: before any fix, ask what it will delete. If the answer isn't "nothing", it isn't the fix yet.
Tilly