aeat.domain.calculations.registry._validate_algorithms module

Algorithm provider and binding validation helpers.

Validates algorithm provider and binding sections declared on a ModeloRevision for legal and source reference closure.

Provider declarations define deterministic callable contracts; binding declarations connect those contracts to CasillaId inputs and outputs. Both must carry LegalReference and SourceReference grounding enforced by the EvidenceValidator.

See also

aeat.domain.calculations.registry._validate_revision_sections.validate_revision_definition()

Per-revision dispatcher that calls these algorithm validators.

aeat.domain.calculations.registry._validate_reference_sections.check_algorithm_binding_refs()

General id-reference checker for algorithm-binding references.

validate_algorithm_provider_section(failures, *, prefix, revision, legal_refs, source_refs, evidence)[source]

Append provider reference and source-tier failures.

The ModeloRevision contributes AlgorithmProviderDefinition rows. Each provider must cite known legal/source refs and carry official_source_guidance evidence.

Return type:

None

Parameters:
validate_algorithm_binding_section(failures, *, prefix, revision, provider_by_id, casillas, resolvable_values, parameters, legal_refs, source_refs, evidence)[source]

Append binding reference, schema-shape, and source-tier failures.

The supplied ModeloRevision provides the algorithm bindings. The validator checks each AlgorithmBindingDefinition against its AlgorithmProviderDefinition, declared CasillaId values, resolvable input values, constants, and evidence-grounding requirements.

Return type:

None

Parameters: