修复: 工作流审批闭环(execution_id 下沉 + 共享状态机 + HumanNode 真审批)

- B-06: DagExecutor 接收 execution_id 下沉到 NodeContext,消除 dummy-execution-id 硬编码
- B-07: NodeContext.node_status 共享 self.state_machine.clone()(is_cancelled 可工作)
- B-03a: HumanNode execute 重写为 subscribe→send→select! 循环(响应/超时/取消 + execution_id+node_id 双键 + Lagged 容忍),删假返回"同意"
- eventbus.rs 删 try_recv_human_approval 死代码
- 新增 human_node 7 单测(正常/双键过滤/超时/非法决策/自由文本)

照 B-03-人工审批响应机制.md 设计。cargo check 0 error,df-nodes 14 + df-workflow 11 test 全过
This commit is contained in:
2026-06-14 14:27:08 +08:00
parent 02ff88fc61
commit 22964a2e20
4 changed files with 254 additions and 39 deletions

View File

@@ -101,7 +101,7 @@ pub async fn run_workflow(
let db = state.db.clone();
let exec_id = execution_id.clone();
tauri::async_runtime::spawn(async move {
let mut executor = DagExecutor::new(event_bus.clone());
let mut executor = DagExecutor::new(event_bus.clone(), exec_id.clone());
let result = executor.run(&runtime_dag, config).await;
let (status, error) = match &result {