优化: 清理无意义注释(走查编号前缀/过时历史标注/死代码注释)
This commit is contained in:
@@ -207,7 +207,7 @@ impl DagExecutor {
|
||||
Err(e) => {
|
||||
let error_msg = e.to_string();
|
||||
// 已取消的节点(如 HumanNode 审批取消)跳过 set_failed:
|
||||
// Cancelled 已是终态,transition(Cancelled→Failed) 非法会 bail 致工作流崩溃(B-03b-R1)
|
||||
// Cancelled 已是终态,transition(Cancelled→Failed) 非法会 bail 致工作流崩溃(b-R1)
|
||||
if self.state_machine.is_cancelled(&node_id) {
|
||||
// emit NodeCancelled(非 NodeFailed):取消语义有别于失败,前端按 type 归「取消」非「失败」
|
||||
self.event_bus
|
||||
@@ -239,7 +239,7 @@ impl DagExecutor {
|
||||
}
|
||||
|
||||
let total = start.elapsed().as_millis() as u64;
|
||||
// B-03b-R10 ③: WorkflowCompleted 携带 execution_id,供 forward 循环按 exec_id 匹配
|
||||
// b-R10 ③: WorkflowCompleted 携带 execution_id,供 forward 循环按 exec_id 匹配
|
||||
// (全局 event_bus 单例下并发工作流的终态事件不再误触发他人 forward 的完成判定)。
|
||||
self.event_bus
|
||||
.send(WorkflowEvent::WorkflowCompleted {
|
||||
|
||||
@@ -198,7 +198,7 @@ impl Node for CancelSelfNode {
|
||||
}
|
||||
}
|
||||
|
||||
/// B-03b-R1:取消的节点返回 Err 时,executor 跳过 set_failed(Cancelled→Failed transition 非法会 bail),
|
||||
/// b-R1:取消的节点返回 Err 时,executor 跳过 set_failed(Cancelled→Failed transition 非法会 bail),
|
||||
/// 状态保持 Cancelled,run 返回取消相关 Err 而非状态转换错误。
|
||||
#[tokio::test]
|
||||
async fn test_cancelled_node_skips_set_failed() {
|
||||
@@ -248,7 +248,7 @@ impl Node for CancelSelfThenOkNode {
|
||||
}
|
||||
}
|
||||
|
||||
/// R-P1-3:Ok 后取消的 TOCTOU 防护。节点返回 Ok 但执行期间已被 set_cancelled,
|
||||
/// Ok 后取消的 TOCTOU 防护。节点返回 Ok 但执行期间已被 set_cancelled,
|
||||
/// executor Ok 分支必须跳过 set_completed(transition Cancelled→Completed 非法会 bail),
|
||||
/// 状态保持 Cancelled,run 返回 Ok(已批准审批不应误报失败)。
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user