Files
zclaw_openfang/crates/zclaw-kernel
iven adf0251cb1
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
fix(memory): 跨会话记忆断裂修复 — profile_store连接+双数据库统一+诊断日志
根因: 3个断裂点
1. profile_store未连接: create_middleware_chain()中GrowthIntegration未设置
   UserProfileStore, 导致extract_combined()的profile_signals被静默丢弃
2. 双数据库不一致: UserProfileStore写入data.db, agent_get读取memories.db,
   两库隔离导致UserProfile永远读不到
3. 缺少关键日志: 提取/存储/检索链路无info级别日志, 问题难以诊断

修复:
- create_middleware_chain()中添加 with_profile_store(memory.pool())
- agent_get改为使用kernel.memory()而非viking_commands::get_storage()
- Kernel暴露memory()方法返回Arc<MemoryStore>
- growth.rs增强日志: 存储成功/失败/提取详情/profile更新数

验证: Tauri端E2E测试通过
- 会话A发送消息 → 提取6记忆+4 profile signals → 存储成功
- 新会话B发送消息 → Injected memories → LLM回复提及之前话题
- 管家Tab显示: 用户画像(医疗/健康)+近期话题+53条记忆分组
2026-04-22 19:07:14 +08:00
..