aeat.application.aggregation package

Public aggregation facade for rollup helpers and typed source-mesh resolvers.

This package exposes two related surfaces. The pure aggregation helpers (aggregate_* functions plus value records such as CasillaAggregation and RetencionesAggregation) roll classified observations into family-specific totals. The live calculation surface is the source mesh: ModeloSourceResolver implementations claim one or more core.BindingSourceKind members and return the canonical CalculationSourceResolution envelope consumed by the modelo calculate path.

aggregate_per_modelo() remains the provider-grouped service for per-modelo rollup workflows. It is not the resolved-source envelope used by calculation; mesh helpers such as merge_source_resolutions(), merge_source_resolutions_by_precedence(), collect_unhandled_source_diagnostics(), and build_binding_source_dispositions() enforce exclusive ownership, declared precedence, no-silent-blank diagnostics, and the enrolled / deferred / reserved BindingSourceDisposition registry.

Concrete resolvers re-exported here include LedgerIvaAggregationSourceResolver, RetencionesAggregationSourceResolver, OssIossLedgerSourceResolver, ProfileSourceResolver, and WithholdingSourceResolver. The calculation path also composes prior-filing, relation-prefill, invoice, borrador, and IVA-wallet resolvers from neighboring application packages; their shared contract is still CalculationSourceResolution, not CasillaAggregation.

Aggregation resolvers prepare provenance-carrying source values; they do not execute registry formulas, decide filing readiness, or mutate work-unit filing state. Those steps remain in domain.calculations.registry and application.modelo.

The facade also re-exports encrypted observation repositories for the retenciones and percepciones stores, informativa rollups, and the shared AggregationError failure taxonomy.

See also

application.modelo

Work-unit calculate services that consume CalculationSourceResolution values and persist contributing source_transaction_ids on calculation revisions.

domain.transactions

Ledger transaction catalogue resolved by ledger IVA, Renta, OSS/IOSS, evidence-advisory, and filing-snapshot aggregation paths.

domain.invoices

Invoice catalogue and purchase-evidence records adapted into invoice source resolutions.

domain.attachments

Encrypted document bytes referenced by ledger evidence diagnostics and advisory surfaces without becoming plaintext calculation inputs.

domain.calculations.registry

Pure registry formulas, binding declarations, and observation contracts that consume the resolved source payload.

Submodules