feat(memory): 记忆整理 v1(design/23)——低峰定期扫描 + 事实包含判定 + 规则否决 + 只产建议队列(不自动应用)
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled

This commit is contained in:
AskaEth committed 2026-10-05 11:29:36 +08:00
1 parent 012e9f3ad4
commit 91a3209c9b
25 files changed
+3418 -13

No files matched your search

+6
View File
@@ -90,6 +90,12 @@ func run() error {
return fmt.Errorf("start automations: %w", err)
}
a.backthink.Start(ctx)
// 记忆整理(design/23 §4):低峰定期后台任务。它不做启动即跑 —— 只在
// 安静时段起点开跑,因此进程重启不会触发一次全库扫描;配置关闭时只记
// 一条日志并立即返回。
if a.memoryTidy != nil {
a.memoryTidy.Start(ctx)
}
// 文档回收(切片 S7):启动期清扫一次 + 此后按 DOCUMENT_GC_INTERVAL 定时清扫。
// 它不等这一次跑完就去拉网关(见 wire_document_gc.go 的取舍 1)。
a.startDocumentGC(ctx)