Files
openclaw/extensions/memory-core
qingminlong de27d8306e fix(memory): keep QMD file hints after stale docid misses (issue #113041) (#113515)
* fix(memory): keep qmd file hints after docid misses

* fix(memory): 不要将 hint-only 的 QMD 文档位置缓存到 docid 缓存中

当本地 docid 索引查询无结果时,使用 QMD 文件提示回退来解析文档位置。
但之前的代码将 hint-only 的结果也缓存到了 docPathCache 中,这导致
索引恢复后依然使用旧的回退位置。

修改:
1. qmd-document-resolver.ts: 分离索引查询结果和 hint 回退结果,
   只缓存来自索引查询的 pickDocLocation 结果。
2. qmd-manager.test.ts: 添加索引恢复回归测试,验证索引为空时
   使用 hint 回退,索引恢复后使用索引中的记录而不是缓存的回退位置。

Co-Authored-By: Claude <noreply@anthropic.com>

* test(memory): expect qmd hint provenance

* chore(memory): clarify QMD hint cache behavior

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-05 19:56:03 -07:00
..
2026-06-04 21:40:44 -04:00