mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-04 07:31:58 +00:00
fix(kanban): honor severity thresholds in diagnostics
Salvages #26431 by @LeonSGP43. Dashboard plugin_api list_diagnostics was using exact-match (severity == filter), so '--severity warning' hid 'error' and 'critical' diagnostics. Adds severity_at_or_above() helper to kanban_diagnostics and uses it in the dashboard endpoint (CLI already used SEVERITY_ORDER comparison correctly).
This commit is contained in:
parent
9f008bcd5c
commit
a94ddd8073
3 changed files with 22 additions and 1 deletions
|
|
@ -49,6 +49,7 @@ from fastapi import APIRouter, HTTPException, Query, WebSocket, WebSocketDisconn
|
|||
from pydantic import BaseModel, Field
|
||||
|
||||
from hermes_cli import kanban_db
|
||||
from hermes_cli import kanban_diagnostics as kd
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
|
@ -1001,7 +1002,7 @@ def list_diagnostics(
|
|||
if severity:
|
||||
filtered: dict[str, list[dict]] = {}
|
||||
for tid, dl in diags_by_task.items():
|
||||
keep = [d for d in dl if d.get("severity") == severity]
|
||||
keep = [d for d in dl if kd.severity_at_or_above(d.get("severity"), severity)]
|
||||
if keep:
|
||||
filtered[tid] = keep
|
||||
diags_by_task = filtered
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue