Skip to content

[Bug]: workflow熔断机制失效 #15

@JJL-8

Description

@JJL-8

位置:在 /i18n/zh/workflow/auto-dev-loop/workflow_engine/runner.py 的 start_workflow 函数中,当 Step 5 判定验证失败并触发重试(回滚到 Step 2)时,代码使用了嵌套的 for 循环来执行重试步骤(第158行)。

问题:内层的 for retry_step 循环仅仅调用了 run_step,没有在 Step 4 重新读取 verify_status(验证结果),没有在 Step 5 重新判断是否需要再次回滚。如果重试的那一次依然失败,程序会直接退出内层循环并结束整个工作流,而无法触发第 2 次或第 3 次重试,导致重试机制失效。

代码片段:

# 如果需要回跳,递归处理(带熔断)
if state.get("target_step") == "step2":
    retry_count = state.get("retry_count", 0) + 1
    # ... 省略熔断检查 ...
    state["retry_count"] = retry_count
    
    # === 问题代码 ===
    # 这里只单纯执行了步骤,没有任何 if step == 'step4' 或 'step5' 的逻辑判断,并没有递归
    for retry_step in STEP_FLOW[1:]:  # step2 onwards
        run_step(retry_step, state) 
    
    break # 执行完一次重试后直接退出了

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions