From 6bc97297b1714129da3e0c7e88507353abd60cd8 Mon Sep 17 00:00:00 2001 From: h Date: Sat, 25 Jul 2026 03:47:04 +0200 Subject: [PATCH] fix(alerts): drop stand-down prefix on one-shot failures --- src/healthbot/alerts.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/healthbot/alerts.py b/src/healthbot/alerts.py index 7f8233e..b9be185 100644 --- a/src/healthbot/alerts.py +++ b/src/healthbot/alerts.py @@ -17,6 +17,17 @@ INFORMATIONAL = frozenset( } ) +FAILURE = frozenset( + { + "ProcedureFailed", + "ActionFailed", + "BuildFailed", + "RepoBuildFailed", + } +) + +ONE_SHOT = INFORMATIONAL | FAILURE + def _gb(value: Any) -> str: # noqa: ANN401 try: @@ -104,7 +115,7 @@ def format_alert(payload: dict) -> str: inner = data.get("data") or {} informational = kind in INFORMATIONAL - resolved = bool(payload.get("resolved")) and not informational + resolved = bool(payload.get("resolved")) and kind not in ONE_SHOT if informational: icon = "ℹ️"