mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-20 18:23:47 +00:00
a801bbf810
Adds FindingsTrustSummary struct and GetTrustSummary() method that walks the in-memory findings store and returns a snapshot of how currently-tracked findings have resolved: tracked, currently-active, resolved (auto-resolved subset), fix-verified vs fix-failed, dismissed broken out by reason (noise / expected / later), suppressed, and regressed-at-least-once. This is the data layer for the user's "trust metrics" arc — concrete counts an operator can use to answer "do I trust Patrol?" Operators see fix-verified and dismissed-as-noise grow over time as Patrol's analysis gets sharper. The summary is intentionally a snapshot, not lifetime totals; once findings are cleaned up they no longer contribute, so the AutoResolved counter (which includes both Resolve(auto=true) and UpdateInvestigationOutcome(fix_verified) paths) is a current-state distribution, not a historical aggregate. The struct doc string is explicit about this so downstream surfaces do not misframe it. Adds a unit test covering each bucket (active, auto-resolved, fix-verified, fix-failed, dismissed-as-noise, dismissed-as-expected, regressed) with a fixture that exercises the real lifecycle methods rather than mutating the store directly. Updates the ai-runtime contract to pin the snapshot semantics and the AutoResolved-path union.