auto-sync: 2026-06-01 18:40:32
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# #07 Spawner Acquire-First 设计
|
||||
|
||||
> 状态:设计待评审
|
||||
> 状态:评审通过,实施中
|
||||
> 作者:庞统
|
||||
> 日期:2026-06-01
|
||||
> 评审:司马懿
|
||||
@@ -298,6 +298,18 @@ Executor 和 Review 的唯二必须差异:
|
||||
- review agent crash → 进程死 → process_dead → 推回 pending → `_dispatch_reviews` 重新 dispatch → crash_limit 拦截
|
||||
- Fix-3b 用超时时间(15min)做同一件事,是冗余的特殊路径
|
||||
|
||||
#### 6.3.1b process_dead 对 review 状态的处理
|
||||
|
||||
process_dead 检测到进程死后,区分任务状态:
|
||||
- `working` → 推回 `pending`(原有行为)
|
||||
- `review` → **不推 pending**,只 release counter,任务保持 `review`,等 `_dispatch_reviews` 下个 tick 自然 dispatch
|
||||
|
||||
**理由**:review → pending 后走 `_dispatch_pending`(executor dispatch),可能分配给非 reviewer。保持 review 状态让 `_dispatch_reviews` 正确处理。
|
||||
|
||||
#### 6.3.1c 实施顺序
|
||||
|
||||
6.3.1(删 Fix-3b)和 6.3.3(on_complete 统一)**必须在同一 commit 中完成**。否则中间窗口期 review crash 后 current_agent 未回退,会导致 `_dispatch_reviews` 的 exclude_current 卡死。
|
||||
|
||||
#### 6.3.2 crash_limit 统一到 `_check_timeouts`
|
||||
|
||||
把 `_dispatch_reviews` 里的 `_check_crash_limit` 调用移到 `_check_timeouts`,覆盖 working 和 review 状态:
|
||||
@@ -344,6 +356,8 @@ def _task_on_complete(aid, outcome):
|
||||
- 检查产出 → 无产出标 failed
|
||||
- 调度 review agent
|
||||
|
||||
保留独立函数的理由:review 的前置检查(产出验证、已有 review 防重复)与 executor 的 dispatch 逻辑不同,不适合合并到 `_dispatch_pending`。
|
||||
|
||||
### 6.4 改动范围
|
||||
|
||||
| 文件 | 改动 | 行数 |
|
||||
|
||||
Reference in New Issue
Block a user