cadrumo.adapters.persistence.storage.custody.paths module¶
Taxonomy-backed paths for one immutable profile capsule.
- profile_custody_directory_name(profile_id)[source]¶
Return the sole directory name a capsule for
profile_idmay occupy.This is where a profile identity becomes a filesystem name, so the value is treated as untrusted here regardless of what the calling signature claims – the same posture
zeroise()takes at the wipe boundary, and for the same reason: the damage of an unchecked value is silent. A bucket identity is a plain string in much of the system and its accepted set includes system-scoped sentinels that are not profile UUIDs at all, so a value of the wrong type arriving here would compose a directory beside real capsules – or, for a relative-path token, one outside the buckets root entirely.Shape rejection reuses the substrate’s
safe_repository_id()rather than restating separator and dot-token rules locally, so this boundary cannot drift from every other identifier-to-filename boundary.- Parameters:
profile_id (
object) – Must be aUUID. Any other value, including a string that merely parses as one, is rejected at runtime.- Return type:
- Returns:
The canonical directory name, which is exactly the name the anchored capsule discoverer recognises.
- Raises:
PathContainmentError – When
profile_idis not aUUID, when it is a UUID of a version the profile aggregate never mints, or when its canonical rendering would not compose into a safe single directory name.