Map every non-supported decision to a canonical-gate violation.
(&self)
| 94 | impl EvidenceReport { |
| 95 | /// Map every non-supported decision to a canonical-gate violation. |
| 96 | pub fn violations(&self) -> Vec<Violation> { |
| 97 | self.decisions |
| 98 | .iter() |
| 99 | .filter(|decision| decision.decision != "supported") |
| 100 | .map(|decision| Violation { |
| 101 | focus_node: decision.criterion_id.clone(), |
| 102 | shape: "EvidenceReplay".into(), |
| 103 | path: Some("evidence".into()), |
| 104 | message: format!( |
| 105 | "{}: {} ({})", |
| 106 | decision.claim_type, decision.decision, decision.reason |
| 107 | ), |
| 108 | }) |
| 109 | .collect() |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | /// What the gate and the pins agree on for one stored intent. |