hub v0.24.0: dispatcher routes critical severity (+ nil-prefs crash guard)

ProcessEvent routed only warning/error; a critical-severity event was silently dropped.
Now routes warning/error/critical, logs unrecognized severities, and guards a nil
GetNotificationPrefs (which would panic/crash the hub). host_disk_critical emits its
natural critical severity.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HxLA1mZurFq9kt8hneFeCs
This commit is contained in:
2026-06-30 14:18:45 +02:00
parent 6882d853ed
commit 0ff1d3c883
6 changed files with 159 additions and 14 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ func init() {
// FormatOperatorEmail returns (subject, textBody) for the operator channel.
func FormatOperatorEmail(customerID, eventType, severity, message, detailsJSON string) (string, string) {
icon := "⚠️"
if severity == "error" {
if severity == "error" || severity == "critical" {
icon = "🔴"
}