Mark a human gate as resolved. Updates the gate node's detail and clears the pending gate state. The next node appended after this will get a `ResumedAfter` edge from the goal (if any), since the gate is cleared by `append_goal`.
(&mut self, gate_id: &str)
| 298 | /// The next node appended after this will get a `ResumedAfter` edge |
| 299 | /// from the goal (if any), since the gate is cleared by `append_goal`. |
| 300 | pub fn resolve_human_gate(&mut self, gate_id: &str) { |
| 301 | // Update the node's detail to mark it resolved |
| 302 | if let Some(node) = self.nodes.iter_mut().find(|n| n.id == gate_id) { |
| 303 | if let Some(ref mut detail) = node.detail { |
| 304 | if let Some(obj) = detail.as_object_mut() { |
| 305 | obj.insert("resolved".into(), serde_json::Value::Bool(true)); |
| 306 | } |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | // Clear pending gate if it matches |
| 311 | if self.pending_human_gate.as_deref() == Some(gate_id) { |
| 312 | self.pending_human_gate = None; |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | // ========================================================================= |
| 317 | // Edge inference |