aeat.adapters.persistence.profile.modelos_verification_reports module

Encrypted SQL repository for modelo verification reports.

VerificationReportCatalogueRepository persists and loads VerificationReport entries in a VerificationReportCatalogue via SecureObjectRepository at FINANCIAL SensitivityClass. The catalogue is stored as a single encrypted BLOB per profile bucket, wrapped in Envelope before serialisation.

This concrete repository is the persistence adapter behind the read-side VerificationReportCatalogueRepositoryProtocol. It lives in the persistence adapter (not in modelos) because its secure-object coupling is SQL/crypto-bound; the domain package owns only the typed VerificationReportCatalogue model and its pure mutators.

See also

_modelo_runtime

Bucket-id resolution and runtime secure-object factory shared by modelo persistence adapters.

VerificationReportCatalogue

Domain catalogue payload encrypted by this repository.

VerificationReportCatalogueRepositoryProtocol

Domain port this concrete persistence adapter implements.

MODELO_VERIFICATION_REPORT_CATALOGUE_NAMESPACE

Central namespace, sensitivity, schema-version, and singleton-key contract for these secure objects.

modelos_calculation

Sibling calculation-revision repository whose revisions are assessed by verification reports stored here.

list_verification_reports()

Read-side application service that loads reports through this repository boundary.

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

Bases: object

Repository over encrypted SQL-backed verification-report catalogue storage.

The catalogue payload is wrapped in Envelope before SecureObjectRepository persists it; this class is the concrete load/save implementation behind VerificationReportCatalogueRepositoryProtocol.

Parameters:
property bucket_id: str | None

Return the profile bucket id when this repository resolved one.

exists()[source]

Report whether a stored verification-report catalogue is present.

Return type:

bool

load()[source]

Load and decrypt this bucket’s verification-report catalogue.

Return type:

VerificationReportCatalogue

Returns:

The stored VerificationReportCatalogue, or an empty one when nothing has been persisted for this bucket.

Raises:

VerificationReportPersistenceError – If the stored record fails the sensitivity-class check, carries an envelope schema version newer than this consumer supports, or trips a storage-layer classification or envelope-version integrity error.

save(catalogue)[source]

Encrypt and persist the verification-report catalogue for this bucket.

Parameters:

catalogue (VerificationReportCatalogue) – The full VerificationReportCatalogue to store, keyed by each report’s verification-report identifier.

Return type:

None