mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 06:17:23 +01:00
loki.orangecat.ch was down ~06:00-07:53 UTC on 2026-10-01 (next-server alive, no listening socket; Caddy 502 after 20s) and nobody was paged. The watchdog's curl times out at 15s, prints 000 itself, and the fallback '|| echo 000' appended another: "000000" is neither "000" nor a number, so check() kept the site UP. Any app that hangs rather than refuses was invisible. check() now counts UP only on a proven 2xx/3xx; test-watchdog-check.sh runs the shipped check() against a fake curl (old code fails timeout/refused/garbage). The deploy verifiers had the same append (failing closed) and are normalised. Also from the same journal: closeStaleAgentTurns threw ERR_INVALID_ARG_TYPE every hour — postgres-js cannot serialise a Date in a raw sql fragment. Same shape in the calendar overlap, the digest previous window and two more; all now use lt/gt/gte, and no-raw-sql-comparisons.ts keeps it that way. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>