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)
| 385 | /// The next node appended after this will get a `ResumedAfter` edge |
| 386 | /// from the goal (if any), since the gate is cleared by `append_goal`. |
| 387 | pub fn resolve_human_gate(&mut self, gate_id: &str) { |
| 388 | // Update the node's detail to mark it resolved |
| 389 | if let Some(node) = self.nodes.iter_mut().find(|n| n.id == gate_id) { |
| 390 | if let Some(ref mut detail) = node.detail { |
| 391 | if let Some(obj) = detail.as_object_mut() { |
| 392 | obj.insert("resolved".into(), serde_json::Value::Bool(true)); |
| 393 | } |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | // Clear pending gate if it matches |
| 398 | if self.pending_human_gate.as_deref() == Some(gate_id) { |
| 399 | self.pending_human_gate = None; |
| 400 | } |
| 401 | } |
| 402 | |
| 403 | // ========================================================================= |
| 404 | // Edge inference |