aeat.domain.buckets._event_repository module¶
Domain boundary error and pure helper for the bucket-event-history catalogue.
BucketEventHistoryPersistenceError is the storage-boundary error the
persistence adapter raises when the encrypted
BucketEventHistoryCatalogue cannot be loaded or persisted safely;
append_bucket_event() is the pure insertion helper over a catalogue. The
concrete encrypted-SQL repository lives in the persistence adapter
(aeat.adapters.persistence.profile.buckets.BucketEventHistoryRepository),
behind BucketEventHistoryRepositoryProtocol; this module owns only the
domain error and the pure helper.
- exception BucketEventHistoryPersistenceError(message=None, *, context=None, suggestion=None, translated_message=None)[source]¶
Bases:
BucketsErrorRaised when the bucket-event-history catalogue cannot be persisted or loaded.
This wraps storage-boundary failures from the persistence adapter’s
aeat.adapters.persistence.profile.buckets.BucketEventHistoryRepositorywhile preserving translated recovery context for callers.- Parameters:
- Return type:
None
- code: ClassVar[ErrorCode]¶
- append_bucket_event(catalogue, event)[source]¶
Return a new
BucketEventHistoryCataloguewitheventinserted.Content-addressed: a re-emission of the same
BucketEventcollapses to the sameevent_idand the existing entry is left in place.- Return type:
- Parameters:
catalogue (BucketEventHistoryCatalogue)
event (BucketEvent)