cadrumo.adapters.persistence.operations.secure_references module

Encrypted, content-addressed secure operands for durable operations.

Core types: SensitivityClass.

class OperationSecureReferenceRepository(*, objects=None, objects_factory=None, namespace)[source]

Bases: object

Persist typed operation operands in an injected encrypted namespace.

The journal carries only the SHA-256 content digest. The corresponding serialized operand is encrypted by SecureObjectRepository, which is injected by the caller that owns secure-storage routing and namespace registration.

Parameters:
async put(operand, *, written_at)[source]

Encrypt operand under its exact typed-content digest, off the awaiting loop.

Return type:

TypeAliasType

Parameters:
  • operand (BaseModel)

  • written_at (datetime)

async resolve(reference, operand_type)[source]

Load, re-hash, and strictly hydrate one typed secure operand, off the awaiting loop.

Return type:

TypeVar(OperandT, bound= BaseModel)

Parameters:
operation_secure_reference_repository(*, objects=None)[source]

Bind explicit test storage or lazily resolve the live active profile.

Core types: SecureObjectRepository.

Return type:

OperationSecureReferenceRepository

Parameters:

objects (SecureObjectRepository | None)