cadrumo.application.calculations._per_grupo_member_keys module

Shared derivation of the per_grupo_member cross-member fan-in keys.

A previous_filing binding whose selector declares grouping = "per_grupo_member" (the 353<-322 cross-member aggregation) is satisfied by EVERY grupo member’s filing for a (modelo, filing_year, period) key, not by a single filer’s. Both the binding-prefill gatherer (binding_prefill, which must enumerate the members rather than load one observation by key) and the cross-period clean-state gate (cross_period_clean_state, which must mark the requirement requires_member_fan_in) need the same key set, so it is derived once here.

Sister shared module to revision_carry_gate.

per_grupo_member_requirement_keys(revision, *, filing_year, period)[source]

Return the (modelo, filing_year, period) keys whose binding declares per_grupo_member.

A structural fold over the revision’s declared bindings and the law-determined filing coordinate; it never reads validated evidence, so it takes the compiled ModeloRevision directly rather than a filing-grade RegistrySnapshot.

Parameters:
  • revision (ModeloRevision) – The ModeloRevision whose bindings are scanned for a previous_filing selector declaring grouping = "per_grupo_member".

  • filing_year (int) – The filing coordinate’s year.

  • period (str) – The filing coordinate’s period token.

Return type:

set[tuple[str, int, str]]