mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-08 08:11:38 +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
|
|
@ -737,3 +737,14 @@ def test_config_from_runtime_config_carries_aux_and_model():
|
|||
def test_config_from_runtime_config_handles_empty_input():
|
||||
assert kd.config_from_runtime_config(None) == {}
|
||||
assert kd.config_from_runtime_config({}) == {}
|
||||
|
||||
|
||||
def test_severity_at_or_above_uses_threshold_semantics():
|
||||
assert kd.severity_at_or_above("warning", "warning") is True
|
||||
assert kd.severity_at_or_above("error", "warning") is True
|
||||
assert kd.severity_at_or_above("critical", "warning") is True
|
||||
assert kd.severity_at_or_above("critical", "error") is True
|
||||
assert kd.severity_at_or_above("warning", "error") is False
|
||||
assert kd.severity_at_or_above("error", "critical") is False
|
||||
assert kd.severity_at_or_above("mystery", "warning") is False
|
||||
assert kd.severity_at_or_above("warning", None) is True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue