Repository navigation
fix(recall): 遗忘继任者不再让被取代的旧值回潮(#532 存储层半边) - #681
modusensus wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Refs #532(只修存储层半边;§3 的 B/C 仍需 LLM 判断进写路径,未包含在本 PR)。
背景
#532 主楼:更正两个事实、只忘一个,保留的那个答回更正前的旧值。
docs/FORGET.md的定案把根因拆成三段接缝,其中第二、三段的交互有一个确定性缺陷:#650给supersededIds()加的守卫把「继任者归档、遗忘、删除」统一当成「继任者退场」,于是继任者一旦被遗忘,被它取代的旧行就重新回到注入面——而memory_forget的语义恰恰是「我不要再记得这个内容」,让用户明确抛弃的旧答案借继任者的退场回潮。改了什么
supersededIds()只要求继任者archived = 0,去掉forgotten = 0。旧行仍留在 suppressed 集合里、注入面不选它,但显式搜索照旧读得到(fuseRecall只降权 0.5,不是沉默的不可逆失效)。memory_forget回执报连带面:新增只读store.supersedeContext(id)({ supersededBy, predecessors })经 service 透传;抑制一行时若它取代过 N 条更早的记忆,回执明写「它们保持隐藏(显式搜索仍可达)、不应被当成当前值」。恢复与无链行不渲染那句话。supersedeContext的旧装配/测试替身降级为「无链信息」——回执增强不否决遗忘本身。验证
npm test:0 fail(合并最新 main 后重跑)。check-sync:124 文件一致。supersedeContext空行返回 null 与计数 / 旧装配缺方法时回执降级且遗忘照常完成。forgotten = 0/ 去掉archived = 0/ 回执计数恒 0 / 恢复也报连带面 / 删工具层typeof守卫)。forgotten = 0来自修复提交66a88c5be1,按红线以最高风险审过:它不是鉴权/边界校验,改动有原始现象支撑、有回归锁与文档。明确没修的部分(别读成闭环)
conflictLedgerMode关着)里,memory_forget依旧行粒度,docs/FORGET.md§4 合成轨迹的「旧值幸存」断言依旧成立。supersededIds是 INNER JOIN),旧值仍会回潮;该边界已写进注释与文档 §5,是否改口径待定。