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:
parent
49fc86c70b
commit
a4dcc1bac6
1 changed files with 4 additions and 0 deletions
|
|
@ -841,6 +841,10 @@ func (p *PatrolService) runPatrol(ctx context.Context) {
|
||||||
}
|
}
|
||||||
if runStats.errors > 0 {
|
if runStats.errors > 0 {
|
||||||
status = "error"
|
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
|
// Create run record
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue