Always-On vs intermittent host mode (laptops): suppress offline noise, catch up missed backups #31
Reference in New Issue
Block a user
Delete Branch "feat-laptop-host-mode"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lets an operator mark a host as not always-on (laptop/workstation) so it stops generating offline-alert noise when it legitimately sleeps, shows a calm state, and auto-catches-up a backup it missed while away.
What it does
hosts.always_oncolumn (migration 0024, default 1 → no change for the existing fleet; intermittent is opt-in).agent_offline; instead the previously-deadstale_schedulealert is wired up for them at a 7-day threshold (only when they have an enabled schedule), resolved on the next successful backup or on mode toggle.cron.Next(lastBackup) <= now), guarded against double-dispatch via a real queued/running-backup check.POST /hosts/{id}/mode(operator-band, auditedhost.mode_updated); clears open offline/staleness alerts so the next sweep re-settles.asleep · … · will catch up on returnstate instead of red "offline"; the host-detail header groups tags + presence into boxed pills with click-to-edit, a24x7/Freepresence chip, and a simplifiedout of dateagent chip.Design + plan:
docs/specs/2026-06-15-always-on-host-mode-design.md,docs/plans/2026-06-15-always-on-host-mode.md. Tracked as NS-08 in tasks.md.Test plan
go test ./internal/store/ ./internal/alert/green (always_on round-trip, offline suppression, staleness raise+resolve, mode-change resolve)go test ./internal/server/http/ -run 'TestScheduleOverdue|TestRunCatchup|TestHostModeSaveToggle'greengo vet ./...clean