From ab974d0bed2ea7d6a1a0035d41bd1a2ac3b99af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=94=AF?= Date: Sat, 19 Sep 2026 23:49:08 +0800 Subject: [PATCH] fix classifyNamespace: person-side categories (profiles/heart/flag/cares) must go to soulful namespace --- go/internal/api/routes/core.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/go/internal/api/routes/core.go b/go/internal/api/routes/core.go index b7425ae..a80fa6f 100644 --- a/go/internal/api/routes/core.go +++ b/go/internal/api/routes/core.go @@ -730,6 +730,14 @@ func classifyNamespace(category, agentID, content string) string { // 如果显式传入 namespace 且非空,信任调用方 // (此函数仅在 namespace 为空时调用) + // 规则0:人侧数据(画像/心迹/牵挂/偏好/习惯/目标)永远归 agent 私有灵魂 namespace + // 这是灵魂侧直写统一用的 namespace(soulful-xiaowei),必须与 commit 端点一致, + // 否则蒸馏产物放 a06-main、灵魂侧直写放 soulful-xiaowei,两边永远比对不到。 + switch category { + case "profiles", "heart", "flag", "cares", "preferences", "habits", "goals": + return deriveNamespace("soulful-xiaowei") + } + // 规则1:已知共享 category → shared if sharedCategories[category] { return "shared"