| name | python-wiring-failure |
| description | Fires when plumbing is about to be written wrong instead of as the matching construct in python-wiring-success — a top-level def outside a route file or the composition root, or a class/private helper with no modeled entry claiming it. |
Wiring — failure patterns
Two ways plumbing escapes its licensed home (config, route, composition root — python-wiring-success).
Module-level function
A top-level def outside route and composition-root files is free-floating behavior. Behavior lives on models as derivations, or in the two file kinds that license module functions.
A fact you are about to compute in a function is a derivation that has not found its model yet: name it on the value whose fields imply it, and the procedure is gone, the work done by the construction the derivation returns. A standalone function computing from a model's fields is that derivation escaped from its owner.
The two licensed homes are the only ones:
- a route is the function at transport ingress: one construction from raw transport data, one dispatch of the innermost value, one serialized reply.
- the composition root is the one
main() that wires config, clients, bindings, the consistency model, and routes.
Anywhere else, the meaning belongs on a model: a derivation for an implied fact, a verb for a state transition.
def normalize(x): ...
Unclaimed class
A class in a file no row claims is source the catalog is silent about. The ontology is the authority for what a file may hold; every class traces to a row that homes it there.
A class the code needs that no row claims is a meaning to place in the ontology, with its construct home, before it is written. A private helper carrying behavior is a derivation or verb that has not found its model.
class _Helper: ...