diff --git a/lib/crates/fabro-workflows/src/context/mod.rs b/lib/crates/fabro-workflows/src/context/mod.rs index b1260f87b..f2f2e3c73 100644 --- a/lib/crates/fabro-workflows/src/context/mod.rs +++ b/lib/crates/fabro-workflows/src/context/mod.rs @@ -118,6 +118,13 @@ impl Context { // --- Internal accessors for bridge code --- + pub(crate) fn from_values(values: HashMap) -> Self { + Self { + values: Arc::new(RwLock::new(values)), + logs: Arc::new(RwLock::new(Vec::new())), + } + } + pub(crate) fn values_arc(&self) -> Arc>> { self.values.clone() } diff --git a/lib/crates/fabro-workflows/src/core_adapter/graph.rs b/lib/crates/fabro-workflows/src/core_adapter/graph.rs index dcc02c7a7..87e53eb89 100644 --- a/lib/crates/fabro-workflows/src/core_adapter/graph.rs +++ b/lib/crates/fabro-workflows/src/core_adapter/graph.rs @@ -101,10 +101,12 @@ impl Graph for WorkflowGraph { &self, node: &Self::Node, outcome: &Outcome, - _context: &CoreContext, + context: &CoreContext, ) -> Option> { - // Outcome is now the wf type directly — no conversion needed - let wf_context = crate::context::Context::new(); + // Build a wf Context from the core context snapshot so edge conditions + // that read context values (e.g. `context.failure_class=budget_exhausted`) + // evaluate correctly. + let wf_context = crate::context::Context::from_values(context.snapshot()); let selection = engine::select_edge( node.inner(), outcome,