Pulse/internal/alerts
rcourtman 6f1774f76a feat(ai): Wire alert history to pattern detector for event tracking
Connect alert system to failure prediction:

1. Add AlertCallback to HistoryManager:
   - OnAlert() method to register callbacks
   - Callbacks invoked when alerts are added
   - Called outside lock to prevent deadlocks

2. Expose OnAlertHistory() on alerts.Manager:
   - Pass-through to HistoryManager.OnAlert()
   - Enables external systems to track alerts

3. Wire pattern detector in router startup:
   - Register callback when pattern detector is created
   - Convert alert types to trackable events
   - Pattern detector now learns from production alerts

Now every alert (memory_warning, cpu_critical, etc.) is recorded as
a historical event for pattern analysis. The AI can predict:
'High memory usage typically occurs every ~3 days (next expected in ~1 day)'

All tests passing.
2025-12-12 14:16:03 +00:00
..
alerts.go feat(ai): Wire alert history to pattern detector for event tracking 2025-12-12 14:16:03 +00:00
alerts_test.go feat: AI features, agent improvements, and host monitoring enhancements 2025-12-05 10:37:02 +00:00
clone_test.go Add unit tests for Alert clone and metadata utility functions (alerts) 2025-11-30 05:19:38 +00:00
concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
filter_evaluation.go Refactor alert system: fix race conditions, memory leaks, and improve code quality 2025-12-02 23:31:36 +00:00
filter_evaluation_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00
history.go feat(ai): Wire alert history to pattern detector for event tracking 2025-12-12 14:16:03 +00:00
history_concurrency_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
history_test.go Refactor alert system: fix race conditions, memory leaks, and improve code quality 2025-12-02 23:31:36 +00:00
host_dedup_test.go Add host alert deduplication with tests 2025-12-07 12:38:38 +00:00
offline_toggle_test.go feat: finalize swarm service monitoring (#598) 2025-10-26 09:35:49 +00:00
per_metric_delay_example_test.go style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
quiet_hours_test.go test: Add comprehensive tests for isInQuietHours function 2025-12-01 15:14:44 +00:00
threshold_update_test.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
time_threshold_test.go style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
utility_test.go style: Apply gofmt to 37 files 2025-12-02 17:21:48 +00:00