mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-22 19:36:46 +00:00
The overall-health "Recent Patrol errors" coverage factor in
summarizeRecentPatrolCoverage was anchoring the score to a
stale ratio: it counted errors across the last 10 runs without
weighting recency. After Pulse fixed two compounding Patrol
bugs today, four consecutive successful runs (50+ tool calls
each) followed six earlier failures. The assessment kept
showing C/65 with the prediction "most recent Patrol runs
encountered errors (6 of 10)" — directly contradicting the
fact that *every* recent run had succeeded.
Operators reading that score would conclude Pulse Patrol is
still broken. It isn't. The fix dragged the grade.
This commit adds a recovery-suppression check: count trailing
successful full Patrol runs from the most-recent end of the
window (GetAll returns newest-first), skipping non-full runs.
When three or more consecutive trailing successes exist —
roughly a 9-hour clean stretch at the default 3-hour cadence —
the error penalty drops entirely. The score reflects current
reality.
Three is conservative: a single recovery run could be a
transient win; three consecutive demonstrate the underlying
fix is sticking. Below the threshold, the existing ratio-tiered
penalty still applies so partially-recovered states still
register.
Two tests guard the boundary:
- 6 historical errors + 3 trailing successes → no coverage
factor (suppressed)
- 6 historical errors + 2 trailing successes → coverage
factor remains (recovery incomplete)
Live verified after this commit lands: the assessment that's
been stuck at C/65 since the malformed-history fix will
recompute to A/B grade as soon as the trailing 3 successful
runs are recognized by the same recent-runs query.
ai-runtime contract updated.
|
||
|---|---|---|
| .. | ||
| actionplanner | ||
| agentexec | ||
| agenttls | ||
| agentupdate | ||
| ai | ||
| alerts | ||
| api | ||
| bootstrap | ||
| cloudcp | ||
| config | ||
| crypto | ||
| deploy | ||
| discovery | ||
| dockeragent | ||
| hostagent | ||
| hosted | ||
| hostmetrics | ||
| kubernetesagent | ||
| license | ||
| logging | ||
| metrics | ||
| mock | ||
| mockmode | ||
| mockmodel | ||
| mockruntime | ||
| models | ||
| monitoring | ||
| notifications | ||
| platformsupport | ||
| recovery | ||
| relay | ||
| remoteconfig | ||
| repoctl | ||
| securityutil | ||
| sensors | ||
| servicediscovery | ||
| ssh/knownhosts | ||
| storagehealth | ||
| system | ||
| telemetry | ||
| testutil | ||
| truenas | ||
| unifiedresources | ||
| updates | ||
| updatesignature | ||
| utils | ||
| vmware | ||
| websocket | ||