diff --git a/internal/monitor/pusher.go b/internal/monitor/pusher.go index f0103ee..ff59427 100644 --- a/internal/monitor/pusher.go +++ b/internal/monitor/pusher.go @@ -166,11 +166,26 @@ func (p *Pusher) Stats() PushStats { func (p *Pusher) recordOK(status int) { p.mu.Lock() - defer p.mu.Unlock() + wasFirst := p.successHits == 0 p.lastSentAt = time.Now().UTC() p.lastStatus = status p.lastErr = "" p.successHits++ + count := p.successHits + p.mu.Unlock() + + // First success is an operator signal that the push loop is live; + // log it loud so the journal carries proof. Subsequent successes + // log on a slow heartbeat (every 60 cycles) so the journal stays + // quiet but still proves the loop hasn't drifted into "0 successes + // but no errors either" territory. + if wasFirst { + p.log("info", "monitor push started", map[string]any{"status": status}) + } else if count%60 == 0 { + p.log("info", "monitor push heartbeat", map[string]any{ + "successes": count, "status": status, + }) + } } func (p *Pusher) recordErr(msg string) {