修复: B-03b-R6 human_node send 缺 await + R7 前端契约失配(P0 审批链断裂)

R6: human_node.rs:41 发 HumanApprovalRequest 缺 .await(async fn send 的 Future 被 let _ = 丢弃未 poll,Request 从未进 channel,审批链最上游断裂,B-03a 重写引入,7 单测不覆盖 Request 发出故漏)
R7: project.ts:214 type 'HumanApprovalRequest'→'human_approval_request'(serde rename snake_case) + :215 payload.event.data→payload.event 扁平取字段(WorkflowEvent 无 data 包装)
来源: workflow-approval-review-2026-06-14.md §0/§1(31-agent 审查头号 P0);cargo/vue-tsc 0 err / df-nodes 14 test pass
This commit is contained in:
2026-06-14 16:32:14 +08:00
parent 3e042f049b
commit 0bb96fc509
2 changed files with 13 additions and 9 deletions

View File

@@ -38,13 +38,16 @@ impl Node for HumanNode {
let mut rx = ctx.event_bus.subscribe();
// 2. 发送人工审批请求到事件总线
let _ = ctx.event_bus.send(WorkflowEvent::HumanApprovalRequest {
execution_id: ctx.execution_id.clone(),
node_id: ctx.node_id.clone(),
title: title.to_string(),
description: description.to_string(),
options: options.clone(),
});
// send 是 async fn(broadcast 同步发但 async 包装),必须 await 否则 Future 不 poll、Request 不进 channel(B-03b-R6)
let _ = ctx.event_bus
.send(WorkflowEvent::HumanApprovalRequest {
execution_id: ctx.execution_id.clone(),
node_id: ctx.node_id.clone(),
title: title.to_string(),
description: description.to_string(),
options: options.clone(),
})
.await;
// 3. select! 循环Response / 超时 / 取消
let deadline = tokio::time::Instant::now() + Duration::from_secs(timeout_secs);