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:
objectPersist 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:
objects (SecureObjectRepository | None)
objects_factory (Callable[[], SecureObjectRepository] | None)
namespace (SecureObjectNamespaceDefinition)
- async put(operand, *, written_at)[source]¶
Encrypt
operandunder 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:
reference (ContentDigest)
operand_type (type[OperandT])
- operation_secure_reference_repository(*, objects=None)[source]¶
Bind explicit test storage or lazily resolve the live active profile.
Core types:
SecureObjectRepository.- Return type:
- Parameters:
objects (SecureObjectRepository | None)