aeat.application.modelo package

Public application facade for modelo work-unit services.

This package is the canonical application-layer import boundary for modelo CLI transports and cross-package application services. Callers import from aeat.application.modelo instead of private _... modules so work selection, registry revision checks, calculation, verification, filing, export, reconciliation, and storage orchestration stay behind one facade.

Bucket scoping is explicit at the API boundary. Services accept a caller provided bucket_id or a resolved work target; CLI modules may derive that value from the active profile, but the application surface itself does not read implicit workflow state.

The facade carries domain.modelos.CalculationRevision and domain.modelos.WorkUnit through the operator lifecycle: work-unit creation and addressing, calculation-revision creation, verification, filing, export, history, reconciliation, registry discovery, M036 declaration records, IVA-wallet decisions, projections, and advisory helpers. It also re-exports the status and finding vocabulary used by those services, including CalculationRevisionState, ModeloRecordStatus, ModeloVerificationFindingKind, and VerificationCompletenessStatus. CalculationRevision, WorkUnit, CalculationRevisionAmendmentKind, and ExternalEvidenceKind are NOT re-exported here; domain.modelos is their sole canonical source (import-centralization ADR ruling 5).

Verification, filing, and export remain owned by their focused service modules. verify_modelo_revision() persists a verification report for one domain.modelos.CalculationRevision; filing and export then consume the same persisted revision rather than rebuilding parallel workflow state.

Local filing and external evidence are deliberately separate. file_modelo_revision() creates an internal current domain.modelos.ModeloRecord without domain.modelos.ExternalEvidence; import_external_filing_evidence() creates the AEAT-attested evidence baseline, and amend_modelo_revision() requires that baseline before recording a domain.modelos.CalculationRevisionAmendmentKind.

See also

application.modelo._work_lifecycle:

Work-unit creation, listing, rename, discard, and lookup services.

application.modelo._work_addressing:

Visible modelo/year/period addressing and exact-id resolution.

application.modelo._calculation_actions:

Calculation revision creation, lookup, and completion services.

application.modelo._verification_actions:

Verification findings and report persistence for draft revisions.

application.modelo._filing_actions:

Local filing-record transitions and verification-report reads.

application.modelo._external_import_actions:

External-evidence import path that stamps official AEAT evidence on current filing records.

application.modelo._amendment_actions:

Amendment path for current externally evidenced filing records.

application.modelo._workflow_gate:

Workflow preflight adapter used by verification and filing services.

application.modelo._export:

Local official-file export for verified or filed revisions.

Submodules