aeat.domain.buckets package

Public facade for bucket-scoped append-only event history.

A bucket is the storage slice associated with the active profile. Material workflow transitions (modelo calculation / verification / filing, ledger imports, profile lifecycle, etc.) emit immutable BucketEvent records into a bucket-scoped history so the operator can reconstruct how current state was reached, not only what it is now. The history is audit context, not the source of relational truth for ledger, profile, modelo, or filing state. Those domains keep their current-state catalogues; bucket history preserves the structured transition record and object references that tie them together.

Each BucketEvent is content-addressed by bucket id, BucketEventType, occurrence time, actor, BucketEventObjectType, object id, and payload. payload_version tracks the per-event payload contract, while the closed event and object taxonomies prevent emitters from persisting ad-hoc strings.

Public surface:

The adapter repository also exposes a to_secure_object_write method so sibling catalogue updates can co-emit the same encrypted event-history write. Ordinary operators consume this history through profile and application services such as application.bucket_maintenance; this domain facade does not create an operator-facing bucket command root.

See also

BucketEvent

Append-only event record emitted by workflow, modelo, ledger, profile, and bucket-maintenance transitions.

BucketEventHistoryRepositoryProtocol

Narrow read/write port for the append-only history; its concrete encrypted per-bucket implementation lives in the persistence adapter.

BucketEventHistoryPersistenceError

Storage-boundary error raised when the encrypted catalogue cannot be loaded or persisted safely.

application.bucket_maintenance

Application facade that composes profile lifecycle operations and emits bucket-maintenance events through this domain history.

application.workflow

Active-profile state and bucket-pointer workflows that provide the current storage slice observed by bucket event consumers.

application.modelo

Work-unit calculation, verification, filing, import, export, and reconciliation services that emit modelo events while persisting modelo catalogues separately.

application.ledger

Ledger transaction lifecycle that emits bucket events for imports, edits, classifications, evidence attachment, and removal.

application.invoices

Invoice import, reconciliation, and ledger-link workflows whose events reference invoice and transaction objects without replacing catalogues.

Submodules