aeat.domain.calculations.registry._censo_modelos module¶
Registry-owned censo modelo foundation map.
Resolves lifecycle routing for Modelo 036 (active) and Modelo 037 (historical)
censo registration forms. All routing decisions are derived from the
ValidatedRegistryAuthority so the registry TOML remains the single
authority for event periods and ownership rules.
- class CensoModeloRole(*values)[source]¶
Bases:
StrEnumLifecycle role for censo modelos under the registry foundation.
- ACTIVE_FOUNDATION¶
- HISTORICAL_METADATA¶
- class CensoModeloEventKind(*values)[source]¶
Bases:
StrEnumAccepted event-triggered lifecycle kinds for active Modelo 036.
- ALTA¶
- MODIFICACION¶
- BAJA¶
- class CensoModeloFoundationLogFields(**data)[source]¶
Bases:
BaseModelStable, non-secret log fields emitted by the censo foundation service.
- Parameters:
service_name (str)
service_owner (str)
modelo (str)
role (CensoModeloRole)
decision (Literal['active_work_unit_allowed', 'historical_metadata_only'])
event_kind (CensoModeloEventKind | None)
active_work_unit_allowed (bool)
superseded_by (str | None)
- service_name: str¶
- service_owner: str¶
- modelo: str¶
- role: CensoModeloRole¶
- decision: Literal['active_work_unit_allowed', 'historical_metadata_only']¶
- event_kind: CensoModeloEventKind | None¶
- active_work_unit_allowed: bool¶
- superseded_by: str | None¶
- class CensoModeloOwnership(modelo, role, service_owner, event_kinds, active_work_unit_allowed, superseded_by=None)[source]¶
Bases:
objectNon-CLI ownership record for one censo modelo code.
- Parameters:
-
role:
CensoModeloRole¶
- class CensoModeloFoundationContract(**data)[source]¶
Bases:
BaseModelBackend-owned service contract for censo modelo foundation routing.
- Parameters:
- schema_version: str¶
- service_owner: str¶
- active_modelo: str¶
- historical_modelos: tuple[str, ...]¶
- event_kinds: tuple[CensoModeloEventKind, ...]¶
- error_codes: tuple[str, ...]¶
- class CensoModeloFoundationCommand(**data)[source]¶
Bases:
BaseModelCommand contract for resolving one censo modelo foundation request.
- Parameters:
modelo (str)
event_kind (CensoModeloEventKind | None)
- modelo: str¶
- event_kind: CensoModeloEventKind | None¶
- class CensoModeloFoundationResult(**data)[source]¶
Bases:
BaseModelResult contract describing the registry-owned censo foundation decision.
- Parameters:
modelo (str)
role (CensoModeloRole)
service_owner (str)
event_kind (CensoModeloEventKind | None)
event_kinds (tuple[CensoModeloEventKind, ...])
active_work_unit_allowed (bool)
superseded_by (str | None)
- modelo: str¶
- role: CensoModeloRole¶
- service_owner: str¶
- event_kind: CensoModeloEventKind | None¶
- event_kinds: tuple[CensoModeloEventKind, ...]¶
- active_work_unit_allowed: bool¶
- superseded_by: str | None¶
- property log_fields: CensoModeloFoundationLogFields¶
Return stable logging fields for this foundation decision.
- Returns:
A
CensoModeloFoundationLogFieldsrecord with all structured log fields.
- censo_modelo_ownership_map()[source]¶
Return the registry-owned censo modelo ownership map.
- Return type:
- Returns:
Tuple of
CensoModeloOwnershiprecords, one per censo modelo.
- build_censo_modelo_foundation_contract()[source]¶
Build the immutable backend-owned censo modelo foundation contract.
- Return type:
- Returns:
The validated
CensoModeloFoundationContractfor the active registry.
- get_censo_modelo_foundation_contract()[source]¶
Return the cached backend-owned
CensoModeloFoundationContract.- Return type:
- censo_modelo_ownership(modelo)[source]¶
Return the
CensoModeloOwnershiprecord for an exact string modelo code.- Return type:
- Parameters:
modelo (str)
- resolve_censo_modelo_foundation(command)[source]¶
Resolve one censo modelo foundation command and return a
CensoModeloFoundationResult.- Return type:
- Parameters:
command (CensoModeloFoundationCommand)
- resolve_censo_modelo_work_unit_foundation(*, modelo, period)[source]¶
Resolve a work-unit period through the censo foundation when it applies.
- Return type:
- Returns:
A
CensoModeloFoundationResultwhen the modelo is a censo modelo, orNonewhen the modelo is not registered as a censo modelo.- Parameters: