From ec0a0936d31d9a39203b26d94f8087d062d1518e Mon Sep 17 00:00:00 2001 From: ymq Date: Sat, 22 Aug 2026 18:21:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E7=BD=B2=E4=BB=A5=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E4=B8=BA=E5=8D=95=E4=BD=8D=E2=80=94=E2=80=94=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E7=BA=A7=20develop(PM=E6=B4=BE=E5=8F=91)approved=20?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E5=88=9B=E5=BB=BA=20deploy=5Ftest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 模块级 develop(params 含 pm_assigned)是 PM 按模块派发的开发任务,模块不独立部署, approved 后不应创建模块级 deploy_test(否则每个模块一个 deploy_test = 部署以模块为单位, 即多端口问题的部署侧根源)。deploy_test 是应用级,只由应用脚手架 develop 触发。 --- pipeline_service/agent_loop.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pipeline_service/agent_loop.py b/pipeline_service/agent_loop.py index 402c3ba..0467ed9 100644 --- a/pipeline_service/agent_loop.py +++ b/pipeline_service/agent_loop.py @@ -1782,6 +1782,18 @@ async def pm_review_run(project_id, agent_id=None, model_name=None): if _it_status in ('completed', 'cancelled'): logger.info(f"迭代边界:任务 {task_id} 归属迭代「{task_iter}」已 {_it_status},链终止") return {"status": "completed", "task_id": task_id, "comment": comment or "迭代已结束,链终止"} + # 部署以应用为单位:模块级 develop(PM 按模块派发,params 含 pm_assigned)approved 后 + # 不创建 deploy_test——模块不独立部署,deploy_test 是应用级,由应用脚手架 develop 触发。 + # 否则每个模块都会生成一个 deploy_test,导致「部署以模块为单位」(多端口问题的部署侧根源)。 + _tp = {} + try: + _tp = json.loads(getattr(task, 'params', '{}') or '{}') + except Exception: + _tp = {} + if task_role == 'agent.develop' and _tp.get('pm_assigned'): + logger.info(f"模块级 develop approved,跳过 deploy_test(部署以应用为单位): {task_id}") + return {"status": "approved", "task_id": task_id, "comment": comment, + "next_role": "", "skip_next": "module_not_deployed_independently"} next_tid, next_title = await _create_next_task(sor, project_id, task, next_role, comment) return {"status": "approved", "task_id": task_id, "next_task_id": next_tid, "next_role": next_role, "comment": comment} else: