Broadside multi-channel campaign delivery with trust guarantees

The hard part of a messaging platform is not sending. It is not sending: not twice, not on a channel someone muted, not at 3am their time, and not a seventh time today. Those guarantees have to hold while many campaigns fan out at once, so they live in the schema and in one locked transaction rather than in a worker's if-statement.

Delivery ledger

Invariants, re-checked against the live database

Why messages were withheld

A message that vanishes with no recorded reason is the failure this rules out. Every recipient considered lands in exactly one bucket, so sent + withheld always equals the audience size.

Run it

Seeding gives roughly 15% of recipients a channel opt-out, 35% a 22:00 to 08:00 quiet window in their own timezone, and a few a hard bounce. With a cap of 3, firing 6 campaigns must drive the rest into rate_capped rather than over cap.

Ready.