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

Preflight

Ordered draft, finding, deadline-window, and auth-provider gate runner delegated to by SubmissionEngine.preflight().

DeadlineWindowChecker

Injected protocol that answers the filing-window question without coupling this domain package to the deadline engine implementation.

SubmissionEngineAdapter

Application workflow wrapper that invokes this read-only preflight surface from the RUNNING_PREFLIGHT stage.

aeat.application.modelo._workflow_gate

Modelo 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: object

Runs 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:
preflight(draft, *, today, skip_deadline_window=False)[source]

Run preflight gates without browser work or AEAT writes.

Parameters:
  • draft (ModeloDraftLike) – Draft conforming to ModeloDraftLike.

  • today (date) – Calendar date used to evaluate the AEAT filing window.

  • skip_deadline_window (bool) – When True, 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:

None

load_submission(submission_id)[source]

Load a historical ModeloPresentado by id.

Parameters:

submission_id (str) – Stable submission identifier.

Return type:

ModeloPresentado

Returns:

The persisted ModeloPresentado record.

Raises:

SubmissionError – If submission_id is malformed or no secure object exists for the supplied id.

list_submissions(*, modelo=None, status=None)[source]

Return historical persisted records, optionally filtered.

Parameters:
Return type:

tuple[ModeloPresentado, ...]

Returns:

A chronologically reverse-sorted tuple of ModeloPresentado records. Returns an empty tuple when no submission objects exist.