From 8bd1b45cba92f8e6579925d1638a49bb12b481d6 Mon Sep 17 00:00:00 2001 From: ymq Date: Sun, 23 Aug 2026 08:54:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=5Fcreate=5Fnext=5Ftask=20=E6=B8=85?= =?UTF-8?q?=E9=99=A4=20pm=5Fassigned=EF=BC=8C=E9=98=B2=E5=85=B6=E4=BB=8E?= =?UTF-8?q?=20PM=20=E6=B4=BE=E5=8F=91=E4=BB=BB=E5=8A=A1=E6=B1=A1=E6=9F=93?= =?UTF-8?q?=E5=88=B0=E8=87=AA=E5=8A=A8=E5=88=9B=E5=BB=BA=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E6=B8=B8=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:PM 派发的 design 任务带 pm_assigned=True,design approved 后 _create_next_task 用 {**params} 继承,导致自动创建的应用脚手架 develop 也带 pm_assigned=True, 被 deploy_test 触发判断(1785 行)误判为「模块级 develop」,跳过 deploy_test, 迭代停在 11 模块 develop approved、永远不部署不测试。 pm_assigned 是「PM 按模块清单派发」标记,只作用于当前任务,下一角色任务由系统 自动创建,必须清除。 --- pipeline_service/agent_loop.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pipeline_service/agent_loop.py b/pipeline_service/agent_loop.py index 0467ed9..3a09ad1 100644 --- a/pipeline_service/agent_loop.py +++ b/pipeline_service/agent_loop.py @@ -780,6 +780,11 @@ async def _create_next_task(sor, project_id, task, next_role, pm_comment=''): new_title = f"{title}({next_role}阶段)" new_params = {**params, 'previous_role': _normalize_role(getattr(task, 'role', '')), 'previous_task_id': getattr(task, 'id', ''), 'pm_comment': pm_comment} + # 清除 pm_assigned:它是「PM 按模块清单派发」的标记,只作用于当前任务; + # 下一角色任务是系统自动创建(非 PM 派发),若继承会污染——例如 PM 派发的 design 任务 + # 带 pm_assigned=True,design approved 后自动创建的 develop 任务继承了它,被 1785 行的 + # deploy_test 触发判断误判为「模块级 develop」,导致应用脚手架 develop approved 后跳过 deploy_test。 + new_params.pop('pm_assigned', None) new_task_id = getID() await sor.C('pipeline_tasks', { 'id': new_task_id, 'tenant_id': project_id, 'pipeline_id': 'role_task',