Commit eba648f
fix: exclude seed data from anomaly detection history when processing live metrics
When a seed scenario TTL expires, the ring buffer may still contain seed spike
data. If the agent loop then processes live metrics (no seedTtlExpiry), the old
spike history was causing false anomaly detection (e.g. txPool↑ medium when
live tx=1, because spike history caused monotonic/Z-score triggers).
Fix: filter history to exclude seed points (seedTtlExpiry set) when the current
dataPoint is a live metric. Seed-mode cycles still use full history unchanged.
Side-effect: if <5 live points exist after filtering, MIN_HISTORY_POINTS guard
naturally suppresses detection — correct behavior while live data accumulates.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d17076b commit eba648f
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
0 commit comments