fix(nextcloud-talk): cap room info cache size#101662
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 7, 2026, 9:06 AM ET / 13:06 UTC. Summary PR surface: Source +19, Tests +40. Total +59 across 2 files. Reproducibility: yes. from source inspection: current main can call resolveNextcloudTalkRoomKind with unbounded distinct room tokens and keep growing the module-level roomCache. I did not run the failing path locally in this read-only review, but the PR's new focused test exercises the cache-cap scenario. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the bounded cache fix with the focused test after normal exact-head CI and maintainer merge gates; no core API, config, or migration change is needed. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: current main can call resolveNextcloudTalkRoomKind with unbounded distinct room tokens and keep growing the module-level roomCache. I did not run the failing path locally in this read-only review, but the PR's new focused test exercises the cache-cap scenario. Is this the best way to solve the issue? Yes. The fix is narrow and sits in the owning Nextcloud Talk room-info module; the existing plugin-sdk pruneMapToMaxSize helper would trim local boilerplate, but the proposed helper is behaviorally equivalent and not a merge blocker. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4e29b2f5ab4b. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +19, Tests +40. Total +59 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Consolidated into #101650 so these same-author related cache caps land as one focused, VISION.md-aligned change. #101650 uses the shared plugin SDK pruning helper, keeps both limits private, and preserves existing cache and request behavior. It landed as Closing this fragment in favor of the landed combined PR. |
Summary
extensions/nextcloud-talk/src/room-info.tsbefore opening.Verification
node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-messaging.config.ts extensions/nextcloud-talk/src/room-info.test.ts -t "caps cached room info entries"- passed, 1 file / 1 spec selected.git diff --check- passed.Real behavior proof
Behavior or issue addressed: Nextcloud Talk room info lookups now keep the process-local room cache bounded at 1000 entries and evict the oldest cached room when the cap is exceeded.
Real environment tested: Local OpenClaw checkout on Linux at commit c615207, Node.js v22, using the modified
extensions/nextcloud-talk/src/room-info.tsfrom this branch.Exact steps or command run after this patch: Ran a Node terminal check against the branch source and an in-process FIFO cache using the same configured max entry count.
Evidence after fix: Terminal output from the after-fix Node check:
Observed result after fix: The output shows the only raw Map write is inside the cache helper, all three caller write paths use that helper, the oldest entry is evicted after the cap, and the newest entry remains cached.
What was not tested: No known gaps for this local branch behavior; a live Nextcloud Talk server was not exercised.