fix: don't show 'All healthy' when patrol run had errors

When a patrol run encounters errors (e.g., LLM call failed), don't
display 'All healthy' in the summary as that's misleading - the
analysis didn't complete properly.

Now shows 'Analysis incomplete (N errors)' instead, which correctly
explains why the status badge shows red/error.
This commit is contained in:
rcourtman 2025-12-21 22:35:39 +00:00
parent 49fc86c70b
commit a4dcc1bac6

View file

@ -841,6 +841,10 @@ func (p *PatrolService) runPatrol(ctx context.Context) {
}
if runStats.errors > 0 {
status = "error"
// Don't claim "All healthy" if there were errors - the patrol didn't complete properly
if findingsSummaryStr == "All healthy" {
findingsSummaryStr = fmt.Sprintf("Analysis incomplete (%d errors)", runStats.errors)
}
}
// Create run record