From 926bc5623f350f03b0077322b4873c5af437b97f Mon Sep 17 00:00:00 2001 From: ymq Date: Sat, 8 Aug 2026 11:09:55 +0800 Subject: [PATCH] fix: clear claimed_by when setting state=review (PM poller requires NULL) --- pipeline_service/agent_loop.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline_service/agent_loop.py b/pipeline_service/agent_loop.py index a397b61..a20381b 100644 --- a/pipeline_service/agent_loop.py +++ b/pipeline_service/agent_loop.py @@ -372,9 +372,9 @@ async def role_agent_run(project_id: str, role: str, agent_id: str = None, model "created_by": agent_id or role, }) - # 置为 review 状态,等待PM审核 + # 置为 review 状态,等待PM审核(清除 claimed_by 让 PM poller 能认领) await sor.sqlExe( - "UPDATE pipeline_tasks SET state=${st}$ WHERE id=${tid}$", + "UPDATE pipeline_tasks SET state=${st}$, claimed_by=NULL WHERE id=${tid}$", {"st": TASK_REVIEW, "tid": task_id}) logger.info(f"role_agent_run completed(review): task={task_id} role={role} deliverable={did} file={file_path}") return {"status": "completed", "task_id": task_id, "deliverable_id": did,