ReMe/reme
Joshua 0e5a9f5034
fix(reme_light): dedupe default watch paths on case-insensitive filesystems (#234)
* fix(reme_light): dedupe default watch paths on case-insensitive filesystems

On Windows NTFS and macOS HFS+, ``MEMORY.md`` and ``memory.md`` resolve to
the same physical file. ``ReMeLight.__init__`` hardcoded both spellings in
the default ``watch_paths`` list, so the memory markdown file was indexed
twice on those filesystems, wasting embedding calls and producing duplicate
search hits.

Dedupe the default candidate list using ``os.path.normcase`` as the
comparison key. On case-sensitive filesystems normcase is the identity
function, so both spellings continue to be watched there. The original
path strings are preserved, the caller-supplied ``watch_paths`` path is
untouched, and only the built-in fallback is affected.

Fixes #228

* refactor(reme_light): simplify watch path dedup via existence check

Replace the os.path.normcase-based dedup loop with a direct exists()
check that picks one of MEMORY.md / memory.md. On case-insensitive
filesystems both spellings resolve to the same file so exists() returns
true for both, naturally avoiding a duplicate watch — including on
macOS where os.path.normcase is the identity function and the previous
approach silently did nothing.

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

---------

Co-authored-by: jinli.yl <jinli.yl@alibaba-inc.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 15:18:23 +08:00
..
config refactor(file_io): update file I/O operations and truncation logic (#177) 2026-03-25 20:21:37 +08:00
core fix(file-watcher): enable force polling for file watcher 2026-05-14 14:40:07 +08:00
extension feat(memory): replace memory formatter with AsMsgHandler for enhanced message processing 2026-03-06 16:29:52 +08:00
memory fix(user profile): update locomo benchmark and update vector based profile code (#225) 2026-04-30 10:19:36 +08:00
__init__.py fix(file-watcher): enable force polling for file watcher 2026-05-14 14:40:07 +08:00
reme.py 提供支持向量数据库的profile功能 (#221) 2026-04-28 15:11:45 +08:00
reme_cli.py refactor(cli): using AgentScope components to reimplement the reme_cli logic (#153) 2026-03-12 11:23:36 +08:00
reme_light.py fix(reme_light): dedupe default watch paths on case-insensitive filesystems (#234) 2026-05-18 15:18:23 +08:00