auto-sync: 2026-05-30 09:01:30
This commit is contained in:
@@ -395,9 +395,9 @@ def _task_verify_completion(self, task_id, db_path) -> bool:
|
||||
if output_count > 0:
|
||||
return True
|
||||
|
||||
# 信号 3:有评论/handoff(Agent 至少写了交接文档)
|
||||
# 信号 3:有评论/handoff(Agent 至少写了交接文档,且 ≥ 50 字符)
|
||||
comment_count = conn.execute(
|
||||
"SELECT COUNT(*) FROM comments WHERE task_id=? AND author != 'system'",
|
||||
"SELECT COUNT(*) FROM comments WHERE task_id=? AND author != 'system' AND LENGTH(content) >= 50",
|
||||
(task_id,)
|
||||
).fetchone()[0]
|
||||
if comment_count > 0:
|
||||
@@ -413,6 +413,8 @@ def _task_verify_completion(self, task_id, db_path) -> bool:
|
||||
- 通过 → 标 review(等待庞统 review)
|
||||
- 不通过 → 留 working,ticker 重查(最多 3 次,然后标 failed)
|
||||
|
||||
**重试计数器存储**:在 tasks 表中复用 `retry_count` 字段(现有字段,用于续杯计数)。Daemon 在 `_task_verify_completion` 返回 False 后递增该字段,达到 3 次后标 failed。不走内存维护(重启丢失)。
|
||||
|
||||
### 第二层:Daemon 产出物文件验证(review 阶段触发)
|
||||
|
||||
对 `outputs` 表中有 `content_path` 的产出,验证文件是否真实存在。放在 Daemon(确定性代码,成本低、不依赖 AI):
|
||||
|
||||
Reference in New Issue
Block a user