aeat.domain.calculations.registry._casilla_membership module

Registry-scoped casilla id membership helpers.

The helpers inspect one ModeloRevision and return canonical CasillaDefinition membership keyed only by declared casilla.id values.

See also

core._casilla_id

Shape validation for CasillaId.

domain.calculations.registry._formula_runtime_ops

Runtime input canonicalisation that rejects undeclared casillas through these helpers.

application.modelo._registry_helpers

Application boundary that refuses non-canonical casilla metadata tokens.

casillas_by_id(revision)[source]

Return casilla definitions keyed by canonical casilla.id.

Parameters:

revision (ModeloRevision) – The ModeloRevision whose CasillaDefinition declarations are inspected.

Return type:

dict[TypeAliasType, CasillaDefinition]

declared_casilla_ids(revision)[source]

Return canonical ids declared by a registry revision.

The returned CasillaId set is scoped to one ModeloRevision; it is stronger than shape validation alone.

Return type:

frozenset[TypeAliasType]

Parameters:

revision (ModeloRevision)

undeclared_casilla_ids(revision, casilla_ids)[source]

Return ids not declared by a registry revision.

The revision argument is a ModeloRevision. Use this after raw keys have already been validated as CasillaId shape-compatible.

Return type:

tuple[TypeAliasType, ...]

Parameters:
casilla_noncanonical_reference_tokens(revision)[source]

Return refused metadata tokens for a registry revision.

The revision argument is a ModeloRevision. The keys are printed numbers, form numbers, and export refs that are not canonical casilla.id values. Values are the canonical candidate CasillaId entries.

Return type:

dict[str, tuple[TypeAliasType, ...]]

Parameters:

revision (ModeloRevision)

casilla_noncanonical_reference_targets(revision, token)[source]

Return canonical ids whose revision metadata matches a token.

The revision argument is a ModeloRevision. Callers use this to reject printed numbers, form numbers, and export refs while still naming the canonical casilla candidates in diagnostics.

Return type:

tuple[TypeAliasType, ...]

Parameters: