Founder Notes
I Switched It On And The Bill Was Mine
I wanted one small piece of evidence. There was a behaviour I had changed and I wanted to show it working against a real database rather than against a hand-built stand-in, and a test for exactly that already existed. It had never run. The setting that tells it which database to talk to was defined nowhere, so it had always reported itself as skipped, which is not a pass and I had been careful not to call it one.
So I defined the setting. That is the whole of what I set out to do that morning.
It did not only wake the test I wanted
The same setting gated an entire file of other tests, and when it was finally defined, every one of them ran, and every one of them failed. Not on the behaviour they were written to check. On their own setup.
That setup inserts rows directly, and it had been written at a time when inserting a row meant supplying its primary key and letting everything else take care of itself. That was true once. Since then the database had gained columns that require a value, and a default declared up in the application layer does nothing at all for an insert written as raw statements. The setup was describing a database that had stopped existing some time ago, and it had gone on describing it confidently the whole while, because nothing ever asked it to.
Dormant is not the same as still. That file had been accumulating wrongness at exactly the rate the rest of the system was changing, and the first thing it told me when it woke up was not whether any behaviour worked. It was how far the world had moved while it slept.
What I actually bought
Here is the part I keep thinking about, and it is not a point about databases.
Before I defined that setting, nothing was failing. There was no bad news anywhere. Nobody was wrong about anything. Ten minutes later there was a file full of failures with my change sitting at the top of the history, and a perfectly reasonable reading of events in which I had broken it.
I had not broken it. I had made it legible. And those are very hard to tell apart from the outside, because the visible difference between a condition that was always there and a condition you introduced is nothing at all. The work expanded at the exact moment the problem became something a person could see, and it attached itself to the person who made it visible.
Which means the cheapest available action was not to define the setting. I could have got my evidence another way, or let the skipped test stand as the nearest thing to proof and moved on with my day. Nobody would have had a worse morning. That option was sitting right there and it was free, and I want to be straight that I could see it.
What I did instead was read the required columns off the live schema rather than guessing at them, fix the setup against what the database actually is now, run the whole file for real, and refuse to accept the one small thing I had come for until it reported passed rather than skipped. The fix was not hard. It was just mine, and it was much larger than the thing I had set out to do.
The general shape
Making a hidden condition visible is not a discovery. It is a transfer of ownership.
That is true wherever something has been true and unexamined for long enough that examining it is the expensive part. The condition has no cost while nobody can see it. The moment somebody can, it acquires one, and the bill goes to whoever opened it rather than to whoever created it. Everyone in the chain before that moment is clean, and the person who looked is now holding something that reads, to anybody arriving later, like something they did.
So the question to ask before you look is not what you expect to find. It is whether you are willing to own what you find, because you will. And if you are running a team and you want people to look — and you do want people to look — then that is the thing to fix first. The cost of making something visible has to land somewhere other than on the person who made it visible. Otherwise you have built a place where the rational move is to leave every switch exactly where it is, and people will take it, and you will never know, because everything will look fine.