From a966de25b3639c94042908cdd9c8daaed51f7575 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp <19+brynary@users.noreply.github.com> Date: Sat, 1 Aug 2026 12:17:16 -0400 Subject: [PATCH] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Bryan Helmkamp <19+brynary@users.noreply.github.com> --- .../fabro-workflow/src/graph/routing.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/components/fabro-workflow/src/graph/routing.rs b/lib/components/fabro-workflow/src/graph/routing.rs index afb0147de..cb294aa6d 100644 --- a/lib/components/fabro-workflow/src/graph/routing.rs +++ b/lib/components/fabro-workflow/src/graph/routing.rs @@ -99,11 +99,17 @@ pub(crate) fn check_goal_gates( graph: &GvGraph, node_outcomes: &HashMap, ) -> std::result::Result<(), String> { - for (node_id, node) in &graph.nodes { - if node.goal_gate() - && !node_outcomes - .get(node_id) - .is_some_and(|outcome| outcome.status.is_successful()) + let mut goal_gate_ids: Vec<&String> = graph + .nodes + .iter() + .filter_map(|(node_id, node)| node.goal_gate().then_some(node_id)) + .collect(); + goal_gate_ids.sort(); + + for node_id in goal_gate_ids { + if !node_outcomes + .get(node_id) + .is_some_and(|outcome| outcome.status.is_successful()) { return Err(node_id.clone()); }