From 73bd9ea2e297a88ae8de11414819cf45e5fc0bb2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 19 Oct 2026 09:18:10 +0200 Subject: fix(notify): bound config timeouts to a day A hand-edited timeout near 1e10 seconds overflowed time.Duration and wrapped to an immediate or negative expiry with no log line. Out of range now reads as the default, like a negative value. Co-Authored-By: Claude Opus 5.5 --- internal/notify/config_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/notify/config_test.go') diff --git a/internal/notify/config_test.go b/internal/notify/config_test.go index 46032ee..818e88f 100644 --- a/internal/notify/config_test.go +++ b/internal/notify/config_test.go @@ -58,8 +58,8 @@ func TestLoadConfigWrongTypeKeepsThatDefault(t *testing.T) { } func TestLoadConfigClamps(t *testing.T) { - got := LoadConfig(writeConfig(t, `{"liveCap": 0, "historyCap": 1000, "timeouts": {"normal": -4}}`)) - if got.LiveCap != 1 || got.HistoryCap != 100 || got.Timeouts.Normal != 10 { + got := LoadConfig(writeConfig(t, `{"liveCap": 0, "historyCap": 1000, "timeouts": {"normal": -4, "low": 99999999999}}`)) + if got.LiveCap != 1 || got.HistoryCap != 100 || got.Timeouts.Normal != 10 || got.Timeouts.Low != 10 { t.Errorf("got %+v", got) } } -- cgit v1.2.3