cadrumo.application.aggregation.catalogue_read_binding module

Refuse catalogue read ports bound to a different profile bucket.

require_catalogue_reads_bound_to(ports, *, bucket_id)[source]

Refuse ports whose readers declare a bucket other than bucket_id.

Composition binds both readers to one bucket, but an aggregation entry point is handed the ports and must not trust that: a reader bound to another bucket, or to none, would silently aggregate someone else’s ledger. A reader that declares no bucket at all is an in-memory projection with no store behind it and is not checked.

Return type:

None

Parameters: