MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / failing_view_verification

Function failing_view_verification

atomic-cli/src/commands/triage/project.rs:62–77  ·  view source on GitHub ↗

If any acceptance criterion on `node` carries a view-scoped verification whose LATEST view-scoped record failed, return that record's `kind` (for the finding message). `None` means the view baseline is not known to be red.

(node: &CanonicalNode)

Source from the content-addressed store, hash-verified

60/// whose LATEST view-scoped record failed, return that record's `kind` (for the
61/// finding message). `None` means the view baseline is not known to be red.
62fn failing_view_verification(node: &CanonicalNode) -> Option<String> {
63 for ac in &node.has_acceptance_criterion {
64 // The latest view-scoped record is the last one in append order.
65 if let Some(rec) = ac
66 .verifications
67 .iter()
68 .rev()
69 .find(|v| v.scope.eq_ignore_ascii_case("view"))
70 {
71 if rec.outcome.eq_ignore_ascii_case("fail") {
72 return Some(rec.kind.clone());
73 }
74 }
75 }
76 None
77}
78
79/// Build the canonical triage report for `feature` relative to `target`.
80pub fn build_report(

Callers 1

build_reportFunction · 0.85

Calls 2

iterMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected