From eaebca297d279d35bb2948bdc4457482f7839c29 Mon Sep 17 00:00:00 2001 From: ymq Date: Sat, 29 Aug 2026 09:21:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=A7=E7=BA=BF=E9=9A=94=E7=A6=BB?= =?UTF-8?q?=E2=80=94=E2=80=94=E4=BC=9A=E8=AF=9D=E9=A1=B9=E7=9B=AE=E8=B7=A8?= =?UTF-8?q?=E4=BA=A7=E7=BA=BF=E6=97=B6=E6=B8=85=E7=A9=BA,=E9=98=B2?= =?UTF-8?q?=E5=85=83=E6=99=AF=E9=A1=B9=E7=9B=AE=E5=8A=AB=E6=8C=81=E5=95=86?= =?UTF-8?q?=E6=9C=BA/=E6=8A=95=E6=A0=87=E4=BA=A7=E7=BA=BF=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_service/gateway.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pipeline_service/gateway.py b/pipeline_service/gateway.py index ad3e5cf..638fb6f 100644 --- a/pipeline_service/gateway.py +++ b/pipeline_service/gateway.py @@ -151,8 +151,13 @@ class Gateway: ctx = {"pid": "", "pipeline_id": "", "name": "", "project_model_name": ""} else: ctx = await self.resolve_project(user_id, session_id) - # 无当前项目 → 用入口指定的默认产线(投标/开发产线各自独立入口的关键) - if not ctx.get("pipeline_id") and pipeline_id: + # 产线隔离:入口指定产线时,会话项目必须同产线才生效—— + # 防止"元景项目"(sdlc_general)劫持商机/投标产线会话。 + if pipeline_id and ctx.get("pipeline_id") and ctx["pipeline_id"] != pipeline_id: + ctx["pid"] = "" + ctx["pipeline_id"] = pipeline_id + # 无当前项目 → 用入口指定的默认产线 + elif not ctx.get("pipeline_id") and pipeline_id: ctx["pipeline_id"] = pipeline_id # 1.5 模型解析与项目级持久化(优先级:本次显式选择 > 项目已设 > 个人全局 > 产线默认)