(change: &ChangeInspection, intent: &IntentCriteria)
| 70 | } |
| 71 | |
| 72 | fn governed(change: &ChangeInspection, intent: &IntentCriteria) -> bool { |
| 73 | change.intent_context["status"] == "recorded" |
| 74 | && change.intent_context["plans"] |
| 75 | .as_array() |
| 76 | .is_some_and(|plans| { |
| 77 | plans.iter().any(|plan| { |
| 78 | [ |
| 79 | plan["plan_id"].as_str(), |
| 80 | plan["intent"]["uid"].as_str(), |
| 81 | plan["intent"]["id"].as_str(), |
| 82 | ] |
| 83 | .into_iter() |
| 84 | .flatten() |
| 85 | .any(|alias| intent.aliases.contains(alias)) |
| 86 | }) |
| 87 | }) |
| 88 | } |
| 89 | |
| 90 | fn catalog(report: &IncrementalReport) -> Vec<IntentCriteria> { |
| 91 | report |