Two control planes send a notification once

Each kept its own hour of quiet per event, so a budget spent on a team
both control planes served was announced by each. An event is now claimed
in the store before it is sent (notify_sent, migration 0043; one statement,
so two asking at once cannot both win), and only the claimer sends it. A
store that cannot be asked sends it anyway.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-10 13:36:08 +02:00
1 parent 8d7b96621e
commit 39bb8ee557
9 files changed
+179 -2

No files matched your search

@@ -0,0 +1,7 @@
-- When each notification was last sent, by its kind and subject: every
-- control plane raises the same events — a budget spent is seen by each one
-- serving its requests — and the one that claims an event here sends it.
CREATE TABLE notify_sent (
key TEXT PRIMARY KEY,
sent_at BIGINT NOT NULL
);