cadrumo.application.modelo._registry_resources module¶
Registry-backed work-unit guards shared by modelo application actions.
Modelo application services access the packaged registry through one generation-pinned indexed operation. This module owns work-unit revision and period guards.
The revision and period guards are create-work-unit checks: they reject user input that names a modelo revision or filing period the committed registry does not declare, before a work unit records a law-determined registry identity.
See also
cadrumo.core.resources:Owns the packaged resource registry and bundled-path resolution.
cadrumo.domain.calculations.registry.authority.PinnedAuthorityOperation:Loads and validates modelo definitions, then serves registry snapshots.
cadrumo.application.modelo._registry_helpers:Owns import/amendment registry checks.
- reject_unknown_revision(*, modelo, revision_id, operation)[source]¶
Refuse a work-unit create that names an undeclared revision id.
The central
ValidatedRegistryAuthorityfirst resolves the modelo definition. If the modelo exists butrevision_idis absent from its revision map, this raisesModeloErrorwith the available revision ids.- Return type:
- Parameters:
modelo (str)
revision_id (RevisionId)
operation (PinnedAuthorityOperation)
- reject_unknown_period_for_revision(*, modelo, revision_id, period, operation)[source]¶
Refuse a work-unit create whose
Periodis absent from the revision schedules.The guard inspects the named revision’s filing schedules and compares the caller’s
period.registry_tokento the declared period tokens. A revision with no declared schedule is accepted here; a missing revision is also left alone becausereject_unknown_revision()owns that refusal.- Return type:
- Parameters:
modelo (str)
revision_id (RevisionId)
period (Period)
operation (PinnedAuthorityOperation)