aeat.domain.submission package¶
Public facade for local-only submission audit records.
This package exposes preflight gates, historical/imported audit records,
repository storage, and narrow protocol types for submission-adjacent flows.
SubmissionEngine is read-only: it runs Preflight and reads
persisted ModeloPresentado records. It does not present to AEAT, create
submission records, or transition a draft or revision into presentado.
Preflight checks approved draft status, absence of error findings, the
deadline window unless skipped, and auth-provider readiness. The engine depends
on deadline and auth-provider probes; ModeloDraftLoader remains an
exported adapter contract, not a dependency consumed by SubmissionEngine.
ModeloPresentado is a strict local-only historical/imported audit
record persisted through the SubmissionRepositoryProtocol port —
implemented by the adapter
SubmissionRepository — as
encrypted AUDIT data under aeat.domain.submission.records. It is distinct from
domain.modelos.ModeloRecord:
application.modelo.file_modelo_revision() creates a local work-unit filing
record with aeat_accepted=False and no external evidence, while
application.filing.import_filing_from_justificante() imports historical
filing evidence into the audit trail.
Live AEAT writes are blocked by
core.access_gate.AeatAccessGate.require_live_write(), which raises
core.access_gate.LiveSubmitForbiddenError; preflight denials raise
SubmissionPreflightError.
Major declarations:
SubmissionEngine— runs preflight and reads historical audit records.PreflightandSubmissionPreflightError— the pre-submission checks and their refusal.ModeloPresentado,SubmissionAttempt, andSubmissionStatus— the persisted lifecycle records, keyed bymake_submission_id().SubmissionRepositoryProtocol— the read-side persistence port (the concrete repository lives in the persistence adapter).The
ModeloDraftLoader,ModeloDraftLike,DeadlineWindowChecker, andAuthProviderProbeprotocols — exported narrow contracts that keep the domain free of live adapters.
See also
application.modelo.file_modelo_revision()Local work-unit filing action that creates
domain.modelos.ModeloRecordentries without AEAT acceptance.application.liveRead-only AEAT evidence capture and justificante verification surface; it is not a live-submit path.
application.filing.import_filing_from_justificante()Historical filing-evidence import into the submission audit trail.
domain.justificanteReceipt metadata that can seed imported submission-audit baselines without becoming casilla-value authority.
application.modelo.import_external_filing_evidence()Separate work-unit path that stamps
domain.modelos.ExternalEvidenceon current filing records; it does not createModeloPresentadoaudit records.domain.filingDraft construction and review records used before preflight or evidence import.
core.access_gate.AeatAccessGateCore live-write refusal authority that keeps these audit records local.
Submodules¶
- aeat.domain.submission._engine module
- aeat.domain.submission._errors module
- aeat.domain.submission._models module
SubmissionStatusSubmissionAttemptModeloPresentadoModeloPresentado.submission_idModeloPresentado.draft_idModeloPresentado.modeloModeloPresentado.periodModeloPresentado.profile_tax_idModeloPresentado.statusModeloPresentado.justificante_csvModeloPresentado.justificante_pdf_pathModeloPresentado.submitted_atModeloPresentado.acknowledged_atModeloPresentado.attempts
make_submission_id()
- aeat.domain.submission._preflight module
- aeat.domain.submission._protocols module