fix: persistent state — uptime, status, latency, and logs survive restarts #13

Merged
lerko merged 3 commits from fix/uptime-percentage into develop 2026-05-16 19:27:24 +00:00
Owner

Summary

  • Uptime percentage now computed from windowed statuses (last 60 checks), not unbounded counters
  • Status and latency seeded from last DB record on startup (no more all-PENDING after restart)
  • Logs persisted to DB table, loaded on startup (last 100 entries)
  • Logs auto-pruned to 200 rows

Test plan

  • go test ./... passes
  • Restart app — status shows UP/DOWN immediately, not PENDING
  • Restart app — Logs tab shows previous session entries
  • Simulate a failure — uptime percentage drops visibly within the check window
## Summary - Uptime percentage now computed from windowed statuses (last 60 checks), not unbounded counters - Status and latency seeded from last DB record on startup (no more all-PENDING after restart) - Logs persisted to DB table, loaded on startup (last 100 entries) - Logs auto-pruned to 200 rows ## Test plan - [x] `go test ./...` passes - [ ] Restart app — status shows UP/DOWN immediately, not PENDING - [ ] Restart app — Logs tab shows previous session entries - [ ] Simulate a failure — uptime percentage drops visibly within the check window
lerko added 3 commits 2026-05-16 19:27:19 +00:00
lerko merged commit fa1042a2ec into develop 2026-05-16 19:27:24 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerkolabs/uptop#13