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 ValidatedRegistryAuthority first resolves the modelo definition. If the modelo exists but revision_id is absent from its revision map, this raises ModeloError with the available revision ids.

Return type:

None

Parameters:
reject_unknown_period_for_revision(*, modelo, revision_id, period, operation)[source]

Refuse a work-unit create whose Period is absent from the revision schedules.

The guard inspects the named revision’s filing schedules and compares the caller’s period.registry_token to the declared period tokens. A revision with no declared schedule is accepted here; a missing revision is also left alone because reject_unknown_revision() owns that refusal.

Return type:

None

Parameters: