cadrumo.domain.calculations.registry.record_design_coverage module¶
Off-load-path record-design coverage and calculation-closure derivations.
calculation_closure_casilla_ids() and
calculation_closure_legal_refs derive bounded closure projections from
a ModeloRevision; DisenoCoverageReport remains the advisory
full-Dise�o inventory.
- calculation_closure_casilla_ids(revision, modelo_id)[source]¶
Return canonical casilla ids in a revision’s calculation closure.
The calculation closure is the set of casillas the cross-connecting calculation engine traverses within this modelo revision:
every
formula.target_casilla_idcasilla;every casilla referenced inside any
formula.expression, walked transitively via the runtime-graphexpression_casilla_refswalker;every casilla that declares a
formula(a computed endpoint) or abinding(a bound endpoint) � the engine-visible casillas;every verification-expectation operand casilla (
computed_casilla_idsand thereconciliation_total_casilla_idstargets);every within-modelo binding
source_casilla_ids/source_casilla_idselector casilla, and every within-modelo the relation-prefill provider’ssource_casilla_id.
A binding
source_casilla_ids/source_casilla_idselector � and a the relation-prefill provider’ssource_casilla_id� is excluded from this closure only when it is genuinely cross-modelo: when the selector explicitly names asource_modelothat differs frommodelo_id. A cross-modelo selector’ssource_casilla_ids/source_casilla_idname casillas on that foreign modelo, not on the modelo whose closure is being derived; the cross-modelo edge enters the current modelo through the bound casilla � the current-modelo casilla that declares the binding (or, for a relation,relation.target_binding) � which is already counted above as a binding endpoint. Folding a foreign-modelo casilla id into this closure would make the completeness gate demand it from the wrong modelo’s registry.A selector that omits
source_modeloor sets it equal tomodelo_idis a within-modelo selector: aprevious_filingself-binding or aprevious_periodself-relation names a casilla on the modelo being derived, so that casilla is a genuine closure member and is kept.References are not normalised through record-design metadata. A formula, binding, relation, or verification token must already be the canonical
casilla.idfor this revision. A reference token that matches no declared casilla id is kept verbatim so the manifest derivation and registry validation fail loudly on the unresolved canonical reference.- Parameters:
revision (
ModeloRevision) – TheModeloRevisionwhose formula and binding graph is walked to derive the closure.modelo_id (
str) – The AEAT modelo identifier used to exclude cross-modelo selector casillas from the closure.
- Return type:
frozenset[TypeAliasType]