9862bcccae07daa39e54f1cc1999131490e23a61
Phase 4 added a NOT NULL tenant_id column to both tables (migrations 0022/0023, backfilled via a join through alert_rules.id), but Store's Create and ApplyTransition were never updated to populate it on new inserts -- every existing row already had a value from the backfill, which is exactly why this went uncaught: nothing created a *new* rule against a Phase-4-or-later database until now. Every alert rule creation since those migrations landed was silently broken. Create's alert_state insert now passes rule.TenantID explicitly. ApplyTransition only receives a rule ID, not a full Rule, so its delivery_log insert resolves tenant_id via a subquery against alert_rules. Confirmed against a live stack: rule creation, evaluation, firing, and a real delivery attempt all completed end to end.
Description
Imported from github.com during the 2026-09-20 standup (local dir: cairnobs)
2.1 MiB
Languages
Go
72.5%
Svelte
12.1%
Rust
8%
TypeScript
4%
Shell
1.3%
Other
2%