cadrumo.application.modelo.calculation_route module¶
Canonical staged resolver ownership for the production modelo calculation route.
- class CalculationRouteResolverOwnership(stage, resolver_type, resolver_id, owned_sources)[source]¶
Bases:
objectOne class-owned resolver identity at its production route stage.
- Parameters:
stage (CalculationRouteResolverStage)
resolver_type (type[ModeloSourceResolver])
resolver_id (str)
owned_sources (tuple[BindingSourceKind, ...])
-
stage:
TypeAliasType¶
-
resolver_type:
type[ModeloSourceResolver]¶
-
owned_sources:
tuple[BindingSourceKind,...]¶
- class CalculationRouteManualOwnership(stage, resolver_type, resolver_id, owned_sources)[source]¶
Bases:
objectThe sole manual-input pseudo-owner on the production route.
- Parameters:
- class CalculationRouteDesignConstantOwnership(stage, resolver_type, resolver_id, owned_sources)[source]¶
Bases:
objectThe sole design-constant pseudo-owner on the production route.
A SIBLING of the manual-input pseudo-owner rather than a widening of it, and the distinction is the point: manual input arrives from the operator, while a design constant is already carried on its own binding selector because AEAT’s diseño fixes it. Folding the second into the first would have meant relaxing that row’s
Literalpins until they admitted a second member – exactly the widen-the-matcher move the governing decision refuses. Declaring a new owner keeps every existing pin intact and makes the new route enumerable.Neither pseudo-owner names a resolver class: there is no aggregation to run, so there is nothing for a
ModeloSourceResolverto do. Enrolment here is what keeps the kind out of the novel-source refusal, which exists so a source nobody routed cannot resolve to a silent blank.- Parameters:
- validate_calculation_route_resolver_ownership(ownership)[source]¶
Refuse identity, stage, pseudo-owner, and source-disposition drift.
- MESH_ONLY_SOURCES: frozenset[BindingSourceKind]¶
The two routed sources no registry row may declare.
They own a resolver but are absent from the binding provider union on purpose: an AEAT borrador value and a wallet decision arrive at runtime, so “not a registry binding source” is a type error rather than a hand-written refusal. They are therefore the only sources the route may own without a registration.
- validate_calculation_route_against_binding_registrations(ownership)[source]¶
Refuse any disagreement between the route table and the registration table.
The binding registrations are the enrollment authority and carry each kind’s resolver id and stage; the route table is where those resolvers actually live. Only this module sees both, because the domain registration table must not import application code, so the join is asserted here at import time and a drift in either direction – a registration naming a route that does not exist, a deferred kind that turns out to be routed, or a routed source with no registration at all – refuses before anything resolves.
Returns the enrolled source set, so the published constant cannot be built from an unverified table.
- Return type:
- Parameters:
ownership (tuple[CalculationRouteOwnership, ...])