feat(api): open incidents and notify channels when monitors go down

Results are evaluated as they arrive. Transitions open or resolve the
monitor's incident and queue a notification per enabled channel in the
same transaction; every API replica delivers the outbox with leases and
exponential retries. Organizations manage webhook and email channels,
can send test notifications and list incidents. Email requires
UPTIME_SMTP_URL.

Closes #14
Closes #15
Closes #16

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-22 01:23:37 +01:00
1 parent 01ef543e62
commit 5f42e3e650
12 files changed
+822 -13

No files matched your search

+12
View File
@@ -133,6 +133,18 @@ func TestEveryPermissionHasALabel(t *testing.T) {
}
}
// Notification mails are looked up as "email.<event>.subject|body".
func TestEveryMailEventHasTexts(t *testing.T) {
en := catalogKeys(t)["en"]
for _, ev := range []string{"opened", "resolved", "test"} {
for _, part := range []string{"subject", "body"} {
if id := "email." + ev + "." + part; !en[id] {
t.Errorf("en.json is missing %q", id)
}
}
}
}
// The language switcher builds "lang.<code>" dynamically.
func TestEveryLanguageHasAName(t *testing.T) {
c, err := Load()