feat(governance): t_944344b5 自动遗忘(decay/auto_forget)保护守卫 — 命中保护规则的记忆禁止软删
- 新增 internal/memprotect:与 zhiyi_protection.py 同口径的 4 条保护规则
(category∈{decision,preference,pref}/distilled决策关键词, V值≥2.0,
freshness=verified, id∈zhiyi:protected_ids);Redis 宕机降级为纯行内规则。
- server.go decay 循环 + admin.go 自动遗忘路由:在 fragment/ShouldForget
两条 SoftDelete 道之前拦截,命中即 skip 并打 [decay|forget] protected skip 日志。
- redis.go 增补 SMembers/SIsMember(读 protected_ids)。
- lancedb_ipc.go:IPC 候选补 Freshness 列;forgetCursorPath 支持
ZHIYI_FORGET_CURSOR 环境变量覆盖(测试不碰生产游标);
抽出 unmarshalMemoryRecordsTolerant 统一 ScanAll/ScanDeleted 宽容解析
(修复 ScanDeleted 遇空时间列 time.Time 解析报错的潜在 bug)。
- 新增 memprotect 单测(8) + 端到端回归测试 forget_guard_e2e_test.go
(复制数据目录+独立 socket,未设 PROT_TEST_SOCK 自动跳过)。
AC1/AC2 已在副本 /tmp/mw-prot-copy-20261016-122000 上验证通过;
生产二进制已备份(zhiyid-new.bak-t_944344b5-20261016-115413, sha 7d9ed410…)
并另存 staged 二进制,**未**上活库(待 default 终审,AC5)。