Founder Notes
The Busier It Got, The Less It Shipped
For most of a day, nothing I merged reached production. Nothing was rejected and nothing complained. Work went in at one end and did not come out at the other.
Here is the shape of it. Work lands on a branch, and each arrival starts a long automated sequence whose last act is to deliver. Two separate rules govern that sequence, and I would defend each of them on its own.
The first: when newer work arrives, the sequence already in flight for the older work is abandoned. There is no sense in finishing the delivery of something that has just been superseded.
The second: the long stages of that sequence are among the ones allowed to be abandoned. That is what makes the first rule workable at all. Abandonment is only sensible if the stages being dropped are the slow, repeatable ones.
The relation nobody wrote down
A full sequence takes appreciably longer than the gap between arrivals on a busy branch. That is the whole defect, and it is in neither rule. It lives in the relation between how long a sequence takes and how often work arrives, which is written down nowhere, owned by nobody, and belongs to neither of the two behaviours that produce it.
So every sequence was abandoned by its successor before it reached the stage that delivers. Each individual abandonment was correct. The aggregate was that nothing was ever delivered.
The arrangement had worked for months and nothing about it had changed. What changed was us. The branch got busier, the gap between arrivals narrowed past the length of a sequence, and the same two correct rules turned around: the more work landed on that branch, the less of it arrived.
And the fix had to come down the same road
The repair is small. Either stop abandoning the stages that deliver, or stop treating a newer arrival as grounds to abandon an older sequence that has already reached them. Either is a few lines.
But a few lines is a change, and a change reaches production the way every other change does. It lands on the branch, it starts a sequence, and that sequence is abandoned by the next arrival. The remedy had to travel through the thing it was repairing in order to arrive.
I got it in by holding the branch still by hand, long enough for one sequence to reach the end. That is not clever, and it is the only way through. What is worth noticing is that the problem had to be solved twice: once as a design, and once as a question of how the answer gets in.
What I take from it
Two things, and the second is the one I had not met before.
A system assembled entirely out of correct decisions can still have a rate above which it stops working. Every rule here was defensible in isolation, and the defect sat in a relation between two durations that appears in no file and has no owner. You cannot find that by reading the parts. You can only find it by asking what happens when the parts are used faster than they were used last month.
And when the broken thing is the thing that carries your changes, you do not have one problem. You have a problem, plus the question of how the answer gets in. Most defects are indifferent to their own repair: you write the fix, the fix goes in, the fix works. A few sit squarely in the path that any repair has to travel, and for those the obvious fix can be completely correct and still unable to arrive. Before I write the fix now, I ask how it is going to get there.