From 64148848e54251e541e4060df91b07ff99040c2b Mon Sep 17 00:00:00 2001 From: acamilo Date: Mon, 28 Sep 2026 22:19:53 +0000 Subject: [PATCH] loop recovery: check every minute, not every five The live timer's phase sat one second before each watchdog loop probe, so every confirmation waited almost a whole extra period. A run is a JSON read unless a step is due, and the ladder already ignores a probe it has seen, so a one-minute cadence costs nothing. --- infra/docs/loop-recovery.md | 2 +- infra/units/fly-loop-recover.timer | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/infra/docs/loop-recovery.md b/infra/docs/loop-recovery.md index afa9670..3f6bb8e 100644 --- a/infra/docs/loop-recovery.md +++ b/infra/docs/loop-recovery.md @@ -1,7 +1,7 @@ # Automated loop recovery `fly-watchdog` remains report-only. The separate `fly-loop-recover.timer` reads its -`/run/fly/wd/loop.json` every five minutes and unsticks a confirmed trap on its own, climbing +`/run/fly/wd/loop.json` every minute and unsticks a confirmed trap on its own, climbing a ladder one step per trap that outlives the previous step: | level | step | cost | diff --git a/infra/units/fly-loop-recover.timer b/infra/units/fly-loop-recover.timer index 59f5ce5..1f15a62 100644 --- a/infra/units/fly-loop-recover.timer +++ b/infra/units/fly-loop-recover.timer @@ -2,9 +2,12 @@ Description=Check for repeated macro loops after watchdog probes [Timer] -OnBootSec=7min -OnUnitActiveSec=5min -AccuracySec=10s +# Every minute: a run only reads /run/fly/wd/loop.json unless a step is due, and the ladder's +# state ignores a probe it has already seen. On a 5-minute cadence the timer's phase can sit just +# before each loop probe (live, 2026-09-28: one second), costing ~5 minutes per confirmation. +OnBootSec=2min +OnUnitActiveSec=1min +AccuracySec=5s Unit=fly-loop-recover.service [Install]