cadrumo.adapters.persistence.storage.bucket package¶
Per-bucket directory model under <cadrumo-root>/buckets/<bucket-id>/.
Pydantic v2 strict records, error types, and filesystem primitives that compose
the multi-bucket on-disk layout. The namespace is an inert marker and exports
nothing: every consumer imports from the module that defines the symbol.
directory_layout owns BucketPaths / bucket_paths() for the
db/ and blobs/ tree, and lockfile owns the per-bucket .lock
concurrency primitive.
The plaintext per-bucket manifest that once registered a bucket here is
retired: profile discovery, labels and key material all belong to the custody
capsule, and nothing in production reads or writes a manifest. The keystore
helpers in keystore_paths enforce that custody material lives outside the
buckets/ tree and the per-bucket database directory.
The sealed-archive surface spans three modules: export_archive_header
defines ARCHIVE_SCHEMA_VERSION and ExportArchiveHeader, while
sealed_archive_writer and sealed_archive_reader own
write_sealed_archive() and read_sealed_archive() for
application-level bucket export/import. These helpers own archive shape and
metadata normalisation only; profile payload composition remains in
application.user_profile, while application.bucket_maintenance
orchestrates operator-facing export and import. The archive is a transport for
committed profile data alone: recovery material is a separate per-profile
artifact and never travels as an archive member.
See also
directory_layoutResolves the per-bucket directory tree without performing lifecycle IO.
export_archive_headerPlaintext frontmatter record for sealed bucket-export archives.
sealed_archive_writerHost-metadata-normalising writer for sealed export archives.
sealed_archive_readerReader that validates archive member order and header shape before returning encrypted payload bytes.
application.bucket_maintenanceApplication service facade that composes these archive primitives with profile lifecycle and domain event history.
Submodules¶
- cadrumo.adapters.persistence.storage.bucket._sealed_archive_errors module
- cadrumo.adapters.persistence.storage.bucket.directory_layout module
- cadrumo.adapters.persistence.storage.bucket.errors module
- cadrumo.adapters.persistence.storage.bucket.export_archive_header module
- cadrumo.adapters.persistence.storage.bucket.keystore_paths module
- cadrumo.adapters.persistence.storage.bucket.lockfile module
- cadrumo.adapters.persistence.storage.bucket.output_language_hint module
- cadrumo.adapters.persistence.storage.bucket.sealed_archive_reader module
- cadrumo.adapters.persistence.storage.bucket.sealed_archive_writer module