memoryweave/WORKLOG.md

93 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 织忆系统修复工作记录
> 维护者:小唯 A06
> 创建2026-05-30
> 最新更新2026-05-30
## 阶段状态
| 阶段 | 状态 | 备注 |
|------|------|------|
| G1: Recall 管线 | ✅ 完成 | MMR 修复 + E1 图谱扩展 + 搜索缓存 |
| G2: 本地 BGE | ✅ 完成 | 8000 端口 bge-m3延迟 110ms |
| G3: self-metrics | ✅ 完成 | deprecated_per_day=2, auto_resolve_rate=0无冲突是正常状态|
| G4: WebSocket | ✅ 完成 | prefetch.push + consolidation.done 推送正常 |
| G5: Eval 框架 | 🔜 待做 | 12 维 IR 指标 |
| G6-G9 | 🔜 待做 | 聚类/遗忘/技能/备份 |
## 提交记录
- `e8b3a9f` — E1 RuneCount bug fix
- `f4a2c71` — MMRSelect text-based diversity
- `4f1e8d2` — WSPrefetchAdapter wired to recall pipeline
## 已修复的 bug
### E1 图谱扩展 len() 字节数 bug
- 文件:`go/internal/governance/graph_sqlite.go`
- `len(chinese)``utf8.RuneCountInString(chinese)`
- 提交: `e8b3a9f`
### MMR 多样性去重失效
- 文件:`go/internal/storage/recall.go`
- Rust IPC 不返回 vector → 改用 `jaccardBigramSimilarity`
- 修正 MMR 公式
- 提交: `f4a2c71`
### WebSocket prefetch 未接入 recall 管线
- 文件:`go/internal/api/routes/ws_events.go` + `core.go`
- 新增 `WSPrefetchAdapter` 实现 `storage.PrefetchPusher` 接口
-`NewAPI` 中通过 `SetPrefetchPusher` 注入
- 提交: `4f1e8d2`
## 验证数据
- 搜索缓存: 首次 934ms → 二次 18ms ✅
- BGE 延迟: 110-145ms < 200ms
- BGE 自相似度: 1.0 0.99
- WebSocket prefetch: 2 recall 后触发
- WebSocket consolidation.done: 直接触发
## 部署命令
```bash
cd ~/projects/memoryweave/go
go build -o /tmp/zhiyid-test ./cmd/zhiyid/
sudo systemctl stop zhiyid
sudo cp /tmp/zhiyid-test /usr/local/bin/zhiyid
fuser -k 7821/tcp 2>/dev/null; sleep 1
sudo systemctl restart zhiyid
```
## API 端点
```
recall: POST http://localhost:7821/api/v1/recall
navigate: POST http://localhost:7821/api/v1/graph/navigate
stats: GET http://localhost:7821/api/v1/stats
health: GET http://localhost:7821/health
BGE: POST http://localhost:8000/v1/embeddings
```
认证`X-API-Key: zhiyi-dev-key-2026`
## 关键文件
```
~/projects/memoryweave/
├── WORKLOG.md # 本文件
├── REPAIR-FULL.md # 修复计划总表
├── go/
│ ├── cmd/zhiyid/main.go
│ ├── internal/
│ │ ├── api/routes/
│ │ │ ├── core.go # NewAPI含 SetPrefetchPusher 接入)
│ │ │ └── ws_events.go # WSPrefetchAdapter
│ │ ├── governance/graph_sqlite.go # E1 bug 修复
│ │ └── storage/
│ │ └── recall.go # MMR bigram 修复
```
## 下一步
G5 eval 评估框架12 IR 指标