Founder Notes
It Was Not An Address, It Was A Distance
An endpoint came back not found, and I had an explanation ready before I looked. A change had gone in days earlier that altered which parts of the service get registered when it starts, and this route sat squarely inside what that change touched. So I said what seemed obvious: the earlier change probably took this route with it.
That was wrong. The service had been serving the route correctly the whole time.
Two places, the same string
There were two groupings of routes in the file. One held everything and had never been registered with the application at all. The other was a small grouping holding the single route that anything actually needed, and that one was registered. Both of them were created with the same path prefix, written out in full, in both places. And between them sat a line whose job was to attach the small grouping to the big one, so that anything taking the big one would get the route too.
Attaching it did not alias the route onto the larger grouping. It nested it. The prefix on the parent applied and then the prefix on the child applied again, so the route arrived at the prefix written twice, one copy inside the other.
The application registers the small grouping directly, so the live path was the one I expected it to be. A set of tests build their own application around the larger grouping instead. Those got the doubled path, asked for the single one, and were told it did not exist.
The same string means two different things
Here is what I did not have straight. I had been reading that prefix as an address, as the place the route lives. It is not an address. It is a distance from wherever the thing carrying it gets attached.
Mounted on the application, the distance is measured from the root, and a distance from the root is indistinguishable from an address. That is exactly what makes it look like one. Mounted on another grouping that carries a prefix of its own, the same string is measured from there instead, and it composes. Parent distance, then child distance.
So both lines were right about where that route ought to be reachable, and neither of them was lying. The system had nothing to compare them against. It does not hold a position and check a new claim against it. It adds up steps. Two components each stating the same step produce two steps.
Stating something twice
That is the part I want to keep. When a value composes, writing it in a second place is not the same claim made twice. It is an accumulation. Two components can agree completely about a relative fact, each writing it where they can see it, and what comes out is not agreement but the total, with no error raised, because the total is a perfectly legal value.
It also explains where the fix belongs. The smallest correction was to take the prefix off the smaller grouping entirely and apply it at each site where that grouping gets attached. Not because that reads better, but because the thing being attached is the one participant that cannot know where it will end up. The prefix was a claim about position, written from inside a component, by the only party with no view of the answer.
Where this generalises
Anything that composes has this shape. An offset applied on top of an offset. A transform inside a transform. A time zone applied to a value that already carries one. A relative path resolved against a base that somebody else chose. The symptom is never a contradiction, because nothing contradicts. You get a value that is the sum of every claim made along the way, and it looks like something a person meant.
A value that composes cannot be confirmed by being stated twice. So when two components both describe where something is, the question is not which of them is correct. It is which of them is in a position to know, and that is almost always whichever one is doing the attaching.