aeat.application.filing._history_repository module

Governed-persistence repository for filing-history records.

This repository persists lightweight application.filing.ModeloHistory payloads keyed by modelo. Each payload contains submitted modelos, typed periods, timestamps, and recorded status strings; richer current / superseded filing lifecycle records live in domain.modelos.ModeloRecordCatalogue.

Records are stored as encrypted byte objects in the primary SQL backend at AUDIT SensitivityClass via a SecureObjectRepository; no plaintext filing-history JSON or envelope file lands on disk.

See also

application.filing.ModeloHistory

Strict payload persisted by this repository.

application.filing._runtime_repository

Active-profile bucket resolution and runtime secure-object creation.

domain.modelos.ModeloRecordCatalogueRepository

FINANCIAL-class repository for authoritative work-unit filing records.

adapters.persistence.storage.APPLICATION_FILING_HISTORY_NAMESPACE

Namespace, sensitivity, schema-version, and object-key contract for these secure objects.

class ModeloHistoryRepository(*, bucket_id=None, objects=None)[source]

Bases: SecureBoundRepository[ModeloHistory]

Encrypted filing-history store for bucket-local ModeloHistory.

The SecureBoundRepository base wraps each payload in an Envelope and binds it to adapters.persistence.storage.APPLICATION_FILING_HISTORY_NAMESPACE. The modelo identifier is the natural object key, so list and iteration APIs expose one lightweight history per modelo rather than the authoritative work-unit filing catalogue. The namespace definition supplies the AUDIT SensitivityClass, schema version, bucket-local scope, {modelo} key grammar, and custody contract.

See also

ModeloHistory

Strict payload stored by this repository.

domain.modelos.ModeloRecordCatalogueRepository

FINANCIAL-class filing-record catalogue for current and superseded work-unit lifecycle records.

Parameters:
namespace: ClassVar[str]
sensitivity: ClassVar[SensitivityClass]
schema_version: ClassVar[int]
payload_type

alias of ModeloHistory

property bucket_id: str | None

Return the profile bucket id when this repository resolved one.

extract_identifier(payload)[source]

Return the natural id for payload (used as the SQL object key).

Subclasses MUST override. The base implementation raises NotImplementedError.

Return type:

str

Parameters:

payload (ModeloHistory)

list_modelos()[source]

Return every modelo persisted in this repository, sorted.

Return type:

tuple[str, ...]

iter_histories()[source]

Yield (modelo, history) tuples of ModeloHistory for every persisted modelo.

Return type:

Iterator[tuple[str, ModeloHistory]]