Commit Graph

3 Commits

Author SHA1 Message Date
小唯 3872294045 fix(graph-cleanup): CleanupNoiseNodes NULL-id panic + 新增 scoped 卫安/A03/A04 测试污染清理端点 (t_1dfaaa4a)
- graph_sqlite.go CleanupNoiseNodes: row[id] 为 NULL(daemon-distill pattern 模板行)时直接
  .(string) panic → HTTP 连接被关(HTTP=000);改为 nil 安全跳过
- 新增 CleanupScopedNodes(dryRun, namespaces, nameContains):namespace+名称子串精确圈定,
  清理 2026-06 多 agent 测试污染(openclaw-main/a06-main/hermes-main 的 A03/A04/卫安 节点)
- graph_cache.go: cachedGraphStore 透传(inner 可选接口断言,非 SQLite 后端静默 0)
- server.go: GET/POST /api/v1/graph/cleanup/scoped?dry_run=&namespace=&name=
  实际执行后 InvalidateAll 保证 graph_cache 一致性 —— 禁外部 SQL 的官方通道
2026-09-08 09:02:35 +08:00
小唯 72cbf73583 feat: P0 recall fallback + P2 trust scoring for graph edges
P0: When bge-embed/IPC recall fails, fall back to graph.db keyword search (FallbackTextSearch) instead of 500 error. Response includes X-Fallback: graph header.

P2: Add trust_score, retrieval_count, helpful_count columns to graph_edges table. New POST /api/v1/graph/edge/feedback endpoint. UpdateEdgeTrustScores batch calculation.
2026-07-02 00:22:28 +08:00
小唯 23c6547503 perf: add graph navigate cache (TTL 5min, 500 entries) + cache invalidation + cache stats API
- NewCachedGraphStore: governance.GraphStore wrapper, only Navigate() is cached
- GraphCacheRef: expose InvalidateAll() + Stats() for cache management
- Cache invalidation on graph/edge add, graph/cleanup (non-dry-run)
- New /api/v1/cache/stats endpoint for cache monitoring
- /api/v1/health now registered at /api/v1/health path too
- normalizeEntity: preserve Unicode letters (Chinese chars not stripped)
2026-06-16 18:09:51 +08:00