fix: 部署以应用为单位——模块级 develop(PM派发)approved 后不创建 deploy_test

模块级 develop(params 含 pm_assigned)是 PM 按模块派发的开发任务,模块不独立部署,
approved 后不应创建模块级 deploy_test(否则每个模块一个 deploy_test = 部署以模块为单位,
即多端口问题的部署侧根源)。deploy_test 是应用级,只由应用脚手架 develop 触发。
This commit is contained in:
ymq 2026-08-22 18:21:08 +08:00
parent 191d28547b
commit ec0a0936d3

View File

@ -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 "迭代已结束,链终止"}
# 部署以应用为单位:模块级 developPM 按模块派发params 含 pm_assignedapproved 后
# 不创建 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: