aeat.domain.calculations.registry._validate_constructs module

Construct closure and support-removal validation helpers.

Validates that every construct and support-removal decision declared on a ModeloRevision has coherent member references and legal grounding.

Construct member closure compares each member’s LegalReference and SourceReference requirements with the refs declared by the owning construct. Support-removal decisions are separately gated through the EvidenceValidator.

See also

aeat.domain.calculations.registry._validate_revision_closure._validate_revision_closure_sections()

Revision-level runner that invokes both validators in this module.

aeat.domain.calculations.registry.resolve_revision_constructs()

Runtime projection of validated construct declarations.

validate_construct_closure(scope, revision, *, member_objects, legal_refs, source_refs, evidence)[source]

Return construct member and grounding failures for one revision.

The ModeloRevision supplies construct declarations; member_objects is the prebuilt member index from the revision validation context. Each member’s legal/source refs must be included by the construct that claims it, and EvidenceValidator enforces official-source grounding for the construct itself.

Return type:

list[str]

Parameters:
validate_support_removal_decisions(scope, revision, *, export_layout_ids, extraction_profile_ids, cross_reference_ids, workbook_parity_ids, verification_expectation_ids, application_link_ids, deadline_window_ids, legal_refs, source_refs, evidence, filing_schedule_ids=())[source]

Return support-removal decision failures for one revision.

Each SupportRemovalDecisionDefinition declared by the ModeloRevision must cite known legal/source refs and one accepted source tier. A decision also fails when it claims to remove a subject id that remains active in the supplied subject-id indexes.

Return type:

list[str]

Parameters: