Skip to content

fix(alerts): guard anomaly tick resolves and lease escalation claims - #2315

Merged
Makisuo merged 9 commits into
mainfrom
fix/alert-lifecycle-races
Nov 6, 2026
Merged

Makisuo merged 9 commits into
mainfrom
fix/alert-lifecycle-races

fix(db): regenerate escalation_claim_lease on top of alert_silences

be4a14b
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Nov 6, 2026 in 36s

Confidence 10/10 · No issues found

🟢 Confidence 10/10 · safe to merge. The only change since the last review is the regenerated snapshot, which chains to alert_silences and carries both new columns.
no findings · tests covered · risk high

Guards the anomaly tick's resolves and turns escalation dispatch into a leased, attempts-fenced claim. The change since the last review is only the regenerated escalation_claim_lease snapshot, which is now correct.

  • Anomaly tick resolves are CAS'd on reopenCount/lastTriggeredAt
  • Escalation claims take a claimed_at lease fenced by attempts

Before merge

What was checked
  • 20261106194851_escalation_claim_lease/snapshot.json prevIds is the alert_silences snapshot id, so it is the sole leaf
  • Head snapshot carries alert_silences (14), alert_delivery_events.silence_id and issue_escalations.claimed_at
  • Migration is a nullable ADD COLUMN IF NOT EXISTS, matching PG.nullable(PG.timestamptzMillis) in tables/escalations.ts:57

be4a14b · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.