Files
openclaw/src/node-host
wings1029 8dfb310b56 fix(infra): bound three warning dedupe caches with createDedupeCache (#101746)
* fix(infra): bound three warning dedupe caches with createDedupeCache

Replace unbounded Set<string> warning dedupe caches with the shared
createDedupeCache helper (ttlMs=0, maxSize=4096) to prevent unbounded
memory growth:

- safeBinTrustedDirWarningCache in invoke-system-run.ts
- chmodWarnedTargets in openclaw-state-db.ts
- clobberCapWarnedPaths in io.clobber-snapshot.ts

All three follow the same anti-pattern: .has()/.add() only, no eviction,
no size cap. Matches the fix pattern from #101696 and #101738.

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

* chore: refresh PR body evidence for ClawSweeper re-review

* test(io.clobber-snapshot): add clobber-cap warning deduplication test

Exercises warnClobberCapReached through the production API
(persistBoundedClobberedConfigSnapshot) to prove that
clobberCapWarnedPaths.check() suppresses duplicate warnings
on the same config path.

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

* test(infra): tighten warning cache coverage

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-16 12:45:51 -07:00
..