cadrumo.adapters.persistence.profile.m036_lifecycle module¶
Persistence adapters for the Modelo 036 declaration lifecycle capability.
The application service speaks only the focused M036 lifecycle ports. This module binds those ports to the existing secure-object and bucket-event repositories, translating storage failures and keeping envelope, namespace, and object-store details outside the application boundary.
- class M036DeclarationRepositoryAdapter(*, repository)[source]¶
Bases:
M036DeclarationRepositoryPortTranslate the generic secure snapshot repository to the M036 port.
- Parameters:
repository (SecureSnapshotRepository[M036DeclarationResult])
- load(declaration_id)[source]¶
Load one declaration by full id while preserving lookup errors.
- Return type:
- Parameters:
declaration_id (str)
- list_snapshots()[source]¶
List declarations while translating malformed storage failures.
- Return type:
- resolve(declaration_id)[source]¶
Resolve one full id or unique prefix while hiding adapter errors.
- Return type:
- Parameters:
declaration_id (str)
- save(declaration)[source]¶
Persist one declaration through the secure-object repository.
- Return type:
- Parameters:
declaration (M036DeclarationResult)
- save_with_secure_object_writes(declaration, extra_writes)[source]¶
Commit a declaration and its related secure writes atomically.
- Return type:
- Parameters:
declaration (M036DeclarationResult)
extra_writes (tuple[SecureObjectWrite, ...])