spaxel/mothership/internal/api
jedarden 3254fcaf67 ota: implement auto-update with canary strategy and quiet window
Implements Component 6 OTA auto-update system with:

- Canary deployment strategy: update one node first, monitor quality
  for configurable duration (default 10 min), then roll out fleet-wide
- Configurable quiet window (default 02:00-05:00 local time) for
  automatic updates
- Auto-update mode toggle (auto_update_enabled setting)
- Quality-based rollback: if canary degrades detection quality
  beyond threshold (default 5%), abort and alert
- Zone vacancy check: only update when all zones vacant for >10 min
- Dashboard broadcaster integration for real-time progress updates
- Event notifier integration for timeline events
- REST API endpoints: /api/ota/auto/status, /api/ota/auto/trigger,
  /api/ota/auto/cancel, /api/ota/auto/config, /api/ota/auto/history

New settings:
- auto_update_enabled (bool, default false)
- quiet_window_start (string, default "02:00")
- quiet_window_end (string, default "05:00")
- canary_duration_min (int, default 10)
- auto_update_quality_threshold (float, default 0.05)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 11:48:07 -04:00
..
alerts.go feat: complete crowd flow visualization implementation 2026-04-11 07:27:21 -04:00
analytics.go feat: complete anomaly detection & security mode dashboard UI 2026-04-09 05:59:54 -04:00
analytics_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
backup.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
backup_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
ble_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
briefing.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
briefing_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
diurnal.go fix: resolve all test and vet failures across mothership packages 2026-04-15 18:38:35 -04:00
diurnal_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
events.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
events_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
feedback.go feat(feedback): enhance false positive explanations with diagnostic context 2026-04-25 12:11:39 -04:00
guided.go fix: resolve remaining Go compilation errors across mqtt, analytics, localization, ingestion 2026-04-11 08:15:00 -04:00
integrations.go feat: home automation integration (MQTT and webhooks) 2026-04-11 06:29:51 -04:00
localization.go fix: resolve all test and vet failures across mothership packages 2026-04-15 18:38:35 -04:00
localization_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
notification_settings.go test(notify): add comprehensive tests for notification system 2026-04-13 17:42:26 -04:00
notification_settings_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
notifications.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
notifications_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
prediction.go feat: complete crowd flow visualization implementation 2026-04-11 07:27:21 -04:00
prediction_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
replay.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
replay_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
security.go feat: implement anomaly detection and security mode 2026-04-09 09:48:44 -04:00
security_test.go test: add missing GetSystemMode method to mockDetectorProvider 2026-04-11 06:39:16 -04:00
settings.go ota: implement auto-update with canary strategy and quiet window 2026-05-05 11:48:07 -04:00
settings_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
simulator.go feat: complete crowd flow visualization implementation 2026-04-11 07:27:21 -04:00
tracks.go fix: resolve analytics API test failures and improve corridor response format 2026-04-11 08:34:24 -04:00
tracks_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
triggers.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
triggers_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
utils.go feat: verify dashboard WebSocket feed supports events, alerts, BLE, triggers, health 2026-04-07 09:54:14 -04:00
volume_triggers.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
volume_triggers_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00
zones.go feat(dashboard): anomaly detection & security mode UI with WS consistency fix 2026-04-25 09:03:51 -04:00
zones_test.go test: implement acceptance scenario integration tests (AS-1 through AS-6) 2026-05-05 05:45:15 -04:00