cadrumo.adapters.persistence.profile._review_package_keypair module¶
Secure-object singleton keypair persistence shared by profile adapters.
The mint-or-load-winner transaction belongs to the persistence adapter: it knows secure-object namespaces, create-only revisions, and the storage row representation. Application modules receive typed capabilities instead of depending on any of those adapter details.
- ensure_singleton_keypair(*, repository, namespace, object_key, model_type, generate, bucket_id_of, created_at_of, expected_bucket_id, mismatch_error, write_provenance)[source]¶
Return a bucket singleton, minting once and returning a race winner.
Core types:
SecureObjectRepository.- Return type:
TypeVar(KeypairT, bound=BaseModel)- Parameters:
repository (SecureObjectRepository)
namespace (SecureObjectNamespaceDefinition)
object_key (str)
model_type (type[KeypairT])
generate (Callable[[], KeypairT])
created_at_of (Callable[[KeypairT], Annotated[datetime, AfterValidator(func=~cadrumo.core.time.utc.validate_utc_aware)]])
expected_bucket_id (str)
write_provenance (str)