Files
ServerKit/backend
Juan DenisandClaude Opus 4.8 fe7415842f feat(jobs): scheduled backups as backup.run jobs; fix dormant scheduler (Phase 7)
Wire scheduled backups onto the unified job system and retire the orphaned
backup scheduler thread.

- BackupService.start_scheduler/_scheduler_loop were defined but NEVER called,
  so scheduled backups never actually ran. Replace with check_backup_schedules()
  (enqueues a backup.run job per due schedule) driven by a new
  builtin.backup_scheduler tick, plus a run_backup_job handler that executes one
  schedule via the existing _run_scheduled_backup. max_attempts=1 (backups
  aren't idempotent); a failed run marks the job failed. This activates
  scheduled backups, but stays gated by the existing backup config.enabled
  (default False), so installs without configured backups are unaffected.
- Fix a latent bug in _send_backup_notification: it called
  NotificationService.send_all(title=, message=, severity=) but send_all takes
  a list of alert dicts — corrected (faithful: still routes to system channels
  via the queue-backed bus).
- Monitoring intentionally left as-is: a user-toggled continuous stream whose
  alert delivery already goes through the queued send_all. Phase 8 orchestration
  is already met — send_all is a non-blocking shim over broadcast_system.
- tests: backup.run register/handler success+failure; scheduler tick enqueues
  only due+enabled schedules and is inert when disabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 21:50:27 -04:00
..