cadrumo.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.

Core types: ModeloRevision.

class CensoModeloRole(*values)[source]

Bases: StrEnum

Lifecycle role for censo modelos under the registry foundation.

ACTIVE_FOUNDATION
HISTORICAL_METADATA
class CensoModeloEventKind(*values)[source]

Bases: StrEnum

Accepted event-triggered lifecycle kinds for active Modelo 036.

ALTA
MODIFICACION
BAJA
class CensoModeloOwnership(modelo, role, service_owner, event_kinds, active_work_unit_allowed, superseded_by=None)[source]

Bases: object

Non-CLI ownership record for one censo modelo code.

Parameters:
modelo: str
role: CensoModeloRole
service_owner: str
event_kinds: tuple[str, ...]
active_work_unit_allowed: bool
superseded_by: str | None
class CensoModeloFoundationContract(**data)[source]

Bases: BaseModel

Backend-owned service contract for censo modelo foundation routing.

Parameters:

data (Any)

schema_version: str
service_owner: str
active_modelo: str
historical_modelos: tuple[str, ...]
event_kinds: tuple[CensoModeloEventKind, ...]
error_codes: tuple[str, ...]
build_censo_modelo_foundation_contract()[source]

Build the immutable backend-owned censo modelo foundation contract.

Return type:

CensoModeloFoundationContract

Returns:

The validated CensoModeloFoundationContract for the active registry.

get_censo_modelo_foundation_contract()[source]

Return the cached backend-owned CensoModeloFoundationContract.

Return type:

CensoModeloFoundationContract

censo_modelo_ownership(modelo)[source]

Return the CensoModeloOwnership record for an exact string modelo code.

Return type:

CensoModeloOwnership

Parameters:

modelo (str)

active_036_ownership_from_registry(authority)[source]

Return modelo 036 ownership as the given authority declares it.

The authority is supplied explicitly so a caller holding a published generation and a caller holding a separately validated authority reach the same ownership derivation. censo_modelo_ownership() passes the bundled published operation.

Parameters:

authority (PinnedAuthorityOperation | ValidatedRegistryAuthority) – A PinnedAuthorityOperation leased over a published generation, or a ValidatedRegistryAuthority compiled for this derivation.

Return type:

CensoModeloOwnership

Returns:

The modelo 036 ownership the supplied authority declares.