pub struct Diagnosis {
pub rule_id: String,
pub likely_cause: String,
pub confidence: f32,
pub evidence: Vec<Evidence>,
pub next_steps: Vec<String>,
pub escalation: String,
}Expand description
One firing diagnosis: the rule’s claim, its confidence, the supporting evidence, and the rule’s recommended remediation.
Every field is owned (no borrows) so a Diagnosis can be cloned
across rule boundaries and serialised cheaply.
Fields§
§rule_id: StringStable identifier of the rule that produced this diagnosis
(e.g. "auth_missing"). Matches Rule::id.
likely_cause: StringOne-sentence summary of the rule’s claim. Rendered as the
LIKELY CAUSE: line.
confidence: f32Posterior confidence in the diagnosis, in [0.0, 1.0]. The
rubric for these values lives in docs/confidence_model.md
and is held accountable by tests/calibration.rs.
evidence: Vec<Evidence>Supporting observations. Each is a single sentence with an
optional source pointer; the explain subcommand surfaces the
pointers so the diagnosis can be audited.
next_steps: Vec<String>Customer-facing remediation steps in priority order.
escalation: StringEngineering-facing escalation paragraph. Names the divergence space and the artefacts the on-call engineer needs.