aeat.domain.submission._engine module¶
Read-only submission record loader and preflight engine.
Exposes SubmissionEngine, the only sanctioned surface for
running preflight gates and reading historical
aeat.domain.submission.ModeloPresentado records persisted under
the secure SQL object backend.
AEAT remote writes and write-shaped portal walks are permanently forbidden; the engine intentionally exposes no transport method.
See also
PreflightOrdered draft, finding, deadline-window, and auth-provider gate runner delegated to by
SubmissionEngine.preflight().DeadlineWindowCheckerInjected protocol that answers the filing-window question without coupling this domain package to the deadline engine implementation.
SubmissionEngineAdapterApplication workflow wrapper that invokes this read-only preflight surface from the
RUNNING_PREFLIGHTstage.aeat.application.modelo._workflow_gateModelo work-unit bridge that configures the deadline-window checker for calculation revisions before verification or local mark-as-filed paths.
- class SubmissionEngine(*, auth_provider, deadline_checker, settings, repository)[source]¶
Bases:
objectRuns preflight and reads historical submission records.
AEAT remote writes and write-shaped portal walks are permanently forbidden. This class intentionally exposes no transport method.
- Variables:
auth_provider – Narrow auth-provider probe used by preflight.
deadline_checker – Narrow window checker used by preflight.
settings – Resolved
aeat.core.config.Settings.
- Parameters:
auth_provider (AuthProviderProbe)
deadline_checker (DeadlineWindowChecker)
settings (Settings)
repository (SubmissionRepositoryProtocol)
- preflight(draft, *, today, skip_deadline_window=False)[source]¶
Run preflight gates without browser work or AEAT writes.
- Parameters:
draft (
ModeloDraftLike) – Draft conforming toModeloDraftLike.today (
date) – Calendar date used to evaluate the AEAT filing window.skip_deadline_window (
bool) – WhenTrue, the AEAT filing-window gate is skipped. Workflow callers use this for local verification and local mark-as-filed paths; callers that perform an actual AEAT submission must leave the gate enabled.
- Return type:
- load_submission(submission_id)[source]¶
Load a historical
ModeloPresentadoby id.- Parameters:
submission_id (
str) – Stable submission identifier.- Return type:
- Returns:
The persisted
ModeloPresentadorecord.- Raises:
SubmissionError – If
submission_idis malformed or no secure object exists for the supplied id.
- list_submissions(*, modelo=None, status=None)[source]¶
Return historical persisted records, optionally filtered.
- Parameters:
modelo (
str|None) – Optional AEAT modelo identifier to filter by (filing.modelo == modelo).status (
SubmissionStatus|None) – OptionalSubmissionStatusto filter by.
- Return type:
- Returns:
A chronologically reverse-sorted tuple of
ModeloPresentadorecords. Returns an empty tuple when no submission objects exist.