mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 18:53:37 +00:00
47eefe6763
Complete Phase 2 baseline integration: - Add baseline_exports.go for clean type aliasing - Wire baseline store initialization into StartPatrol - Implement startBaselineLearning background loop - Runs initial learning after 5 min delay - Updates baselines every hour from metrics history - Learns from 7 days of data for nodes, VMs, containers - Add SetBaselineStore methods throughout the chain (Router -> AIHandler -> Service -> PatrolService) - Persists baselines to data directory as JSON The baseline learning loop: 1. Starts automatically when AI patrol starts 2. Queries metrics history for all resources 3. Computes mean, stddev, percentiles for cpu/memory/disk 4. Saves baselines to disk for durability 5. Anomaly detection uses these baselines in context builder All tests passing.