mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 22:36:10 +00:00
* fix(usage-bar): bound template file cache to prevent unbounded watcher growth Add MAX_CACHED_TEMPLATE_FILES=64 limit; evict the oldest entry (closing its fs.watch watcher) before allocating a watcher for a new key when the cache is full. Eviction runs before watcher allocation so we never create a watcher only to close it immediately. Eviction triggers only when inserting a new key (!fileCache.has(path)) — retries for an existing key must not evict other entries. Fixes #98960 Co-Authored-By: Claude <noreply@anthropic.com> * refactor(test): replace mutable dir variable with cleanup-stack pattern in template.test.ts Co-Authored-By: Claude <noreply@anthropic.com> * chore(test): add curly braces for eslint curly rule Co-Authored-By: Claude <noreply@anthropic.com> * test(usage-bar): register watcher proof cleanup --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
5.1 KiB
5.1 KiB