cadrumo.application.modelo.binding_readiness module¶
Binding-readiness query for the bindings list --missing surface.
bindings list reports the registry bindings a modelo revision
declares. --missing narrows that list to the bindings an operator
still owes — the ones not yet resolvable from the workspace’s current
state. A binding is resolvable when the active profile already holds the fact
the binding selects (source = "profile"). Every other binding —
ledger aggregations, prior-filing pulls, live observations — needs data
the operator has not supplied yet and is therefore missing.
This module owns the cross-domain step (registry snapshot + user
profile) so the registry-query CLI stays a thin caller. The revision is
fetched through a ValidatedRegistryAuthority given the
requested modelo, year, and period.
See also
cadrumo.application.modelo.profile_binding.resolve_profile_sourced_bindings()Profile binding resolver whose typed binding channels become the profile-resolved id set returned here.
cadrumo.application.state_projectionBroader modelo readiness projection that reports formula-consumed profile/manual bindings for the readiness command.
- profile_resolvable_binding_ids(*, modelo, bucket_id, filing_year, period, as_of=None, revision_id=None, operation)[source]¶
Return binding ids resolvable from the active profile’s stored facts.
Resolves the registry snapshot for
(modelo, filing_year, period)— or, whenperiodisNone, the revision coveringfiling_year— and projects the bucket’s user profile onto itssource = "profile"bindings. A suppliedPeriodmust matchfiling_yearand contributes the registry token used at the snapshot boundary. The returned set is the binding ids the profile already satisfies.Returns an empty set when the snapshot cannot be resolved or the bucket has no profile — the caller then treats every binding as missing, which is the correct conservative answer.
- annual_period_for_year(authority, *, modelo, filing_year, as_of=None)[source]¶
Return a registry period token a snapshot for
filing_yearaccepts.With no
--periodthe operator wants the revision covering the year. A snapshot still needs a concrete period token; pick the first period the covering revision declares so the snapshot resolves. The binding set is revision-wide, so the period choice does not change which bindings the revision declares.The shared temporal selector resolves same-year revision windows using
as_ofbefore this helper chooses the revision’s first legal period.Core types:
ValidatedRegistryAuthority.- Return type:
- Parameters:
authority (ValidatedRegistryAuthority | PinnedAuthorityOperation)
modelo (str)
filing_year (int)
as_of (date | None)