cadrumo.adapters.persistence.profile.modelos_edit_receipts module

Encrypted persistence adapter for Modelo edit mutation result receipts.

ModeloEditReceiptRepository persists one ModeloEditMutationResultReceiptV1 per encrypted row, keyed by its own content-addressed receipt_id, through SecureBoundRepository at FINANCIAL SensitivityClass. Each receipt is its own row rather than one whole-catalogue singleton blob, so a lookup by receipt_id is one atomic encrypted-SQL read – the domain proof a guarded compare-and-swap edit committed must be recoverable after a crash without decrypting every receipt a bucket has ever produced.

See also

ModeloEditMutationResultReceiptV1

The strict receipt payload this repository stores.

MODELO_EDIT_RECEIPT_NAMESPACE

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

SecureBoundRepository

Shared per-record Envelope-wrapped encrypted repository kernel this class binds to one payload family; exposes to_secure_object_write for the guarded co-commit the calculation-revision persistence writer composes this repository into.

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

Bases: SecureBoundRepository[ModeloEditMutationResultReceiptV1]

Store one bucket’s Modelo edit mutation result receipts, one row each.

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

alias of ModeloEditMutationResultReceiptV1

extract_identifier(payload)[source]

Return the receipt’s own content-addressed identity.

Return type:

str

Parameters:

payload (ModeloEditMutationResultReceiptV1)

to_secure_object_write(payload, *, expected_revision_id=None)[source]

Prepare the receipt write and translate storage-bound failures.

Return type:

SecureObjectWrite

Parameters: