Gate raw-data verdict override on states being absent
All checks were successful
continuous-integration/drone/push Build is passing

When ctx.States() provides verdicts, let them control the overall
status; only fall back to deriving crit from FCrDNS failure count
when no states are available.
This commit is contained in:
nemunaire 2026-05-17 23:58:57 +08:00
commit 91a179e0cf

View file

@ -231,7 +231,7 @@ func buildReportView(data *ReverseZoneData, states []sdk.CheckState) *reportView
}
}
if len(v.FCrDNSFailures) > 0 && severityWeight(worst) < severityWeight("crit") {
if len(states) == 0 && len(v.FCrDNSFailures) > 0 && severityWeight(worst) < severityWeight("crit") {
worst = "crit"
}