diff --git a/pipeline_service/agent_loop_v2.py b/pipeline_service/agent_loop_v2.py index 5f9dde7..de4886e 100644 --- a/pipeline_service/agent_loop_v2.py +++ b/pipeline_service/agent_loop_v2.py @@ -1352,6 +1352,10 @@ class AgentExecutor: db = DBPools() async with db.sqlorContext("pipeline") as sor: + # 产线隔离(2026-08-31):generic 会话不挂产线标签——generic 的 + # pipeline_id 会回退 DEFAULT_ABILITY_ID(sdlc_general),若落库会污染 + # 开发产线历史。存空串 = 通用对话,各产线读取时按产线过滤自然排除。 + store_pl = "" if self.generic else (self.pipeline_id or "") # 用户消息 await sor.C("pipeline_conversations", { "id": getID(), @@ -1360,7 +1364,7 @@ class AgentExecutor: "created_by": self.user_id or "", "iteration_id": self.project_id or "", "session_id": self.session_id or "", - "pipeline_id": self.pipeline_id or "", + "pipeline_id": store_pl, }) # 助手回复(不含 tool_call JSON!) reply_clean = reply @@ -1373,7 +1377,7 @@ class AgentExecutor: "created_by": self.user_id or "", "iteration_id": self.project_id or "", "session_id": self.session_id or "", - "pipeline_id": self.pipeline_id or "", + "pipeline_id": store_pl, }) except Exception as e: logger.warning(f"Session save failed: {e}")