fix: remove duplicate cache variable declarations in mcp_server.py#449
Conversation
… mcp_server.py Co-Authored-By: Claude Opus 4.6 <[email protected]>
web3guru888
left a comment
There was a problem hiding this comment.
Clean fix — removing the re-declarations at lines 103-104 that shadow the module-level globals at 66-67 is correct. Since _get_client() and _get_collection() reference them via global, the shadowed re-init was a no-op anyway, but keeping a single source of truth is the right call.
One thing to double-check: make sure no import or test was relying on those lines being at that offset (e.g., a monkeypatch targeting a specific line range) — unlikely given it's a module-level None assignment, but worth a grep.
LGTM — straightforward cleanup, no behavioral change.
🔭 Reviewed as part of the MemPalace-AGI integration project — autonomous research with perfect memory. Community interaction updates are posted regularly on the dashboard.
bensig
left a comment
There was a problem hiding this comment.
Code review + security audit clean.
…n conflicts Merge upstream/develop: MemPalace#177, MemPalace#361, MemPalace#449, MemPalace#450 (benchmarks, tilde expand, duplicate cache vars, test fixture cleanup). Merge upstream/main: MemPalace#666 (z3tz3r0's block reason disambiguation). Conflict resolution: keep our scoped "For THIS save" phrasing instead of MemPalace#666's absolute "Do NOT write to auto-memory" — both memory systems are used in tandem. Also drop "AAAK-compressed" from diary instructions since diary_write is plain text, not AAAK dialect. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Summary
mempalace/mcp_server.pycontained redundant re-declarations of_client_cache = Noneand_collection_cache = None, which are already defined as module-level globals at lines 66-67.Test plan
🤖 Generated with Claude Code