document
The document uri publishes, or null when nothing registered it.
Two rules, and the order between them is the point.
A document this library ships is never displaceable, by anyone -- not by another catalog and not by the catalog in play. $id is a free string on a catalog, so a catalog declaring the $id of agent_to_renderer.json is making a claim it has no right to; honouring it would hand an agent the definition of Component, which is the whole of the check.
Below that, the catalog in play answers for its own URI whatever else claimed it. Two catalogs may publish the same $id and the map can only keep one, but the placeholder resolves through here and must reach the catalog the caller named rather than whichever namesake happened to register first. The same holds for its catalogId, which is the name the caller actually bound it by: two catalogs sharing a catalogId under different $ids would otherwise have the placeholder reach the bound one and the name reach the map's -- a definition read out of one catalog with its references resolved against another (#42). Another catalog's $id claiming that name does not change this: $id wins a name in the map, where nothing else decides, but the caller has already bound this catalog by that name, and letting the map answer would only move the definition to a catalog the placeholder is not bound to -- the same split on the other axis. Which also means a bound catalog whose catalogId is a name the placeholder joins to answers there, as one whose $id is already does; the reservation below withholds the name from everything else.
Below all three, the name the placeholder joins to answers for nothing at all. It is a filename the specification never binds to a document, so a registration standing at that URI is a catalog answering a reference meant for whichever catalog is in play -- and when none is, the reference has to stay unresolvable, because that is the fail-closed guarantee CatalogValidator.validateMessage documents. Reaching this means the catalog in play did not claim the URI, so the only thing left to reach is a namesake.
A catalog whose $id claims a library URI therefore reaches no branch as itself: the placeholder binds to that URI, the library document answers, and the pointer into it fails to resolve. That is reported as an unresolvable reference, which is the truth. It also means no schema text a catalog wrote is ever read at a library SchemaLocation.documentUri, which is what SchemaEvaluator keys its pattern trust decision on.