cadrumo.adapters.persistence.profile.modelo_reconciliation module

Encrypted persistence for modelo reconciliation records and audit events.

Core types: SensitivityClass.

modelo_reconciliation_record_key(*, work_unit_id, bucket_event_id)[source]

Return the storage key for one reconciliation of one work unit.

The event id keeps repeated reconciliations distinct and joins the encrypted detail row to the audit event co-written with it.

Return type:

str

Parameters:
  • work_unit_id (str)

  • bucket_event_id (str)

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

Bases: SecureBoundRepository[ModeloReconciliationRecord]

Repository over encrypted SQL-backed reconciliation records.

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

alias of ModeloReconciliationRecord

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 (ModeloReconciliationRecord)

class ModeloReconciliationPersistence(*args, **kwargs)[source]

Bases: ModeloReconciliationPersistencePort

Concrete atomic persistence for reconciliation detail and audit event.

persist_with_event(record, event)[source]

Atomically persist record and its matching bucket event.

Return type:

None

Parameters:
iter_records()[source]

Iterate authenticated records for the active profile.

Return type:

Iterator[ModeloReconciliationRecord]

build_modelo_reconciliation_persistence()[source]

Construct the concrete reconciliation persistence adapter.

Return type:

ModeloReconciliationPersistencePort