cadrumo.application.aggregation.source_profile module

Source-mesh resolver for user-profile backed registry bindings.

Owns PROFILE and returns the profile-sourced values as a CalculationSourceResolution. Accepts an optional RegistrySnapshot at construction; when none is supplied the resolver fetches the matching snapshot lazily from the resident registry authority at resolution time.

class ProfileSourceResolver(*, caller_binding_ids=(), registry_snapshot=None, profile_record=None, operation)[source]

Bases: object

Resolve calculation-relevant source = "profile" bindings.

Parameters:
resolver_id: ClassVar[str]
owned_sources: ClassVar[tuple[BindingSourceKind, ...]]
resolve(context)[source]

Resolve all source="profile" bindings for the given calculation context.

Fetches the RegistrySnapshot lazily from the resident registry authority when none was supplied at construction, then delegates to resolve_profile_sourced_bindings, which returns the complete CalculationSourceResolution (typed binding channels plus a CalculationSourceProvenance row per profile-sourced binding).

Parameters:

context (CalculationSourceContext) – A CalculationSourceContext carrying the modelo, filing year, period, and bucket identifier needed to select the correct registry snapshot.

Return type:

CalculationSourceResolution

Returns:

A CalculationSourceResolution with typed binding maps and a provenance tuple covering every profile-sourced binding.