auto-sync: 2026-05-25 13:20:06
This commit is contained in:
+4
-10
@@ -533,16 +533,10 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
if cls["release_counter"]:
|
||||
await self._do_on_complete_async(on_complete, agent_id, outcome)
|
||||
elif cls["should_retry"]:
|
||||
# WORKAROUND (BUG-2a): 设计文档规定续杯期间 counter 保持占用,
|
||||
# max_retries 到达后自然 release。但因 BUG-2b(retry_count 广播计数失效)
|
||||
# 导致续杯死循环、counter 永不释放。此处提前 release 作为安全兜底。
|
||||
# 待 BUG-2b 修好稳定 3 轮 E2E 后考虑撤回,恢复设计一致性。
|
||||
# on_complete 不传入续杯链(避免 double release)
|
||||
# 续杯 Agent 退出后由 ticker 自然发现状态变化
|
||||
if on_complete:
|
||||
on_complete(agent_id, "retry_release")
|
||||
# 续杯期间 counter 保持占用(设计文档规定)
|
||||
# on_complete 传入续杯链:最终完成或超限时由 _do_retry 调用 release
|
||||
await self._do_retry(
|
||||
session_id, agent_id, task_id, None, db_path,
|
||||
session_id, agent_id, task_id, on_complete, db_path,
|
||||
cls.get("retry_field", "retry_count")
|
||||
)
|
||||
# else: 暂时性失败(A8/A9/A11),不 release,不 retry,等 ticker
|
||||
@@ -686,7 +680,7 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_
|
||||
fallback_hint=fallback_hint,
|
||||
)
|
||||
|
||||
# 续杯 spawn(counter 已在 _handle_exit 释放,见 WORKAROUND BUG-2a)
|
||||
# 续杯 spawn(counter 保持占用,直到 max_retries 或最终完成时 release)
|
||||
try:
|
||||
await self.spawn_full_agent(
|
||||
agent_id=agent_id,
|
||||
|
||||
Reference in New Issue
Block a user