From 966113405c3e63a0c4f451dff1e0ee9bf6b9a539 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 16 May 2026 12:55:24 +0000 Subject: [PATCH] Reset monitor confidence to 1 on failure for fast outage detection Destination.Monitor adjusted polling cadence via a confidence counter (1-10 minutes) that grew on success and decremented on failure. After a long healthy run confidence saturated at 10, so the first failed check was delayed up to 10 minutes, and then 9+8+7+...+1 = 45 more minutes of accumulating failures were needed to reach 1-minute polling. Total detection lag from a healthy steady state: up to ~55 minutes -- exactly backwards for a tool meant to improve SRE responsiveness. Snap confidence back to 1 immediately on any failure so polling becomes tight as soon as a destination first looks unreachable. Fixes #16 https://claude.ai/code/session_01WjHPSobuzrRkjwUgjAJWMk --- destinations.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/destinations.go b/destinations.go index 32c7219..60438df 100644 --- a/destinations.go +++ b/destinations.go @@ -206,10 +206,7 @@ func (dest *Destination) Monitor() { confidence = 10 } } else { - confidence -= 1 - if confidence < 1 { - confidence = 1 - } + confidence = 1 } time.Sleep(time.Duration(confidence) * time.Minute)