auto-sync: 2026-05-30 21:32:20
This commit is contained in:
@@ -504,10 +504,15 @@ openclaw agent 子进程退出
|
||||
→ 有信号 → 标 review
|
||||
→ 三无 → 留 working(ticker 重查,最多 3 次 → failed)
|
||||
|
||||
庞统 review
|
||||
司马懿 review(_dispatch_reviews 确定性路由)
|
||||
→ review 通过 → 标 done
|
||||
→ review 不通过 → 打回 working
|
||||
|
||||
庞统 review(_check_round_complete → _spawn_pangtong_review)
|
||||
→ 第二层(文件存在性:content_path 验证)
|
||||
→ 第三层(AI 验证:产出是否覆盖 must_haves)
|
||||
→ 通过 → GOAL_ACHIEVED 或创建新 sub task
|
||||
→ GOAL_ACHIEVED → parent done
|
||||
→ 创建新 sub task → 新一轮执行
|
||||
→ 不通过 → 打回重做
|
||||
```
|
||||
|
||||
|
||||
@@ -226,10 +226,19 @@ class Dispatcher:
|
||||
_task_id = task.id
|
||||
_task_db = Path(project_config["db_path"]) if project_config and "db_path" in project_config else None
|
||||
_dispatcher = self
|
||||
_is_review = action_type == "review"
|
||||
|
||||
def _task_on_complete(aid, outcome):
|
||||
try:
|
||||
_dispatcher._task_auto_complete(_task_id, _task_db)
|
||||
if _is_review:
|
||||
# 审查 Agent(司马懿)完成 → 直接标 done
|
||||
# 不走 _task_auto_complete(否则又标 review → 死循环)
|
||||
# 详见 #01 §4.6 任务状态机完整流转
|
||||
if _task_db:
|
||||
_dispatcher._mark_task_status(_task_db, _task_id, "done")
|
||||
logger.info("Task %s: review complete, marking done", _task_id)
|
||||
else:
|
||||
_dispatcher._task_auto_complete(_task_id, _task_db)
|
||||
except Exception as e:
|
||||
logger.error("Task %s: on_complete error: %s", _task_id, e)
|
||||
on_complete = _task_on_complete
|
||||
|
||||
Reference in New Issue
Block a user