cadrumo.domain.calculations.registry.modelo_pending_orden module

Filing years an annual modelo cannot answer for because its Orden is unwritten.

An annual modelo is re-approved once per ejercicio: the Orden that approves ejercicio N is published partway through year N+1. A registry that promises filing year N therefore has a year no author can supply, and no amount of diligence closes it — the authority does not exist yet.

That is a third state, and the corpus previously had no way to say it. A cell with no revision reads as a coverage gap, which invites two wrong responses: authoring a revision against an invented Orden, or opening the preceding revision’s window so the old design silently governs a year it was never approved for. The second is the more dangerous, because it produces an answer. Modelo 100’s 2025 revision carries 77 parameter files whose every valid_to is 2025-12-31; opening that span would present a filing-grade answer for a year in which no rate scale resolves at all.

A declaration here says the year is legally-not-yet rather than unattended. It is not an excuse and not free text: it names the approval cadence, the newest Orden the modelo actually rests on, and when the missing one is expected, so a reader can check the claim and a gate can refuse it once the Orden appears.

Not every annual modelo needs one. Modelo 200 carries an open -y-siguientes span legitimately, because its parameter values extend past the window; the same idiom is correct there and wrong for 100, decided by whether the values outlive the window rather than by the cadence alone.

class ModeloApprovalCadence(*values)[source]

Bases: StrEnum

Typed token for a registry-declared approval cadence.

PER_EJERCICIO_ORDEN
class PendingEjercicioOrden(**data)[source]

Bases: RegistryModel

Typed pending-filing-year declaration hydrated from a registry manifest.

Parameters:

data (Any)

filing_year: FilingYear
approval_cadence: ModeloApprovalCadenceField
rests_on: LegalRefId
expected_publication_year: FilingYear
pending_orden_vocabulary(*, authority=None)[source]

Resolve pending-filing vocabulary through the governed mapping seam.

Return type:

Mapping[str, str]

Parameters:

authority (GovernedFactSource | None)