From c570ddfc96a57971c36382d96034c25295a0a94d Mon Sep 17 00:00:00 2001 From: Ariel Memory Date: Mon, 6 Jul 2026 02:27:42 +0300 Subject: [PATCH] =?UTF-8?q?refactor:=20rename=20memory=5Fsearch=5Frrf=20?= =?UTF-8?q?=E2=86=92=20memory=5Fsearch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed function and registry entry - Added backward compatibility alias: memory_search_rrf = memory_search - Updated tests and auth_backup check - All 499 tests pass --- mcp_server/tools_ops.py | 10 +++++++--- tests/test_auth_backup.py | 2 +- tests/test_mcp/test_tools_ops_e2e.py | 15 +++++---------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/mcp_server/tools_ops.py b/mcp_server/tools_ops.py index 52a60c04..6ed97295 100644 --- a/mcp_server/tools_ops.py +++ b/mcp_server/tools_ops.py @@ -281,7 +281,7 @@ async def _delete_graph(): ).dict() -async def memory_search_rrf( +async def memory_search( query: str = "", user_id: str = "default", limit: int = 10, @@ -299,7 +299,7 @@ async def memory_search_rrf( sources: "all" (RAG + Wiki), "rag" (RAG only), or "wiki" (Wiki only) """ metrics.inc("tool_calls") - metrics.inc("tool_search_rrf") + metrics.inc("tool_search") app = _get_ctx(ctx) include_rag = sources in ("all", "rag") @@ -316,6 +316,10 @@ async def memory_search_rrf( return SearchResult(results=results, count=len(results), method=strategy).dict() +# Backward compatibility alias +memory_search_rrf = memory_search + + # Register all ops tools _register_tools: dict[str, Any] = { "memory_api_key": memory_api_key, @@ -325,7 +329,7 @@ async def memory_search_rrf( "memory_sync_replica": memory_sync_replica, "memory_cleanup": memory_cleanup, "memory_lucidity_purge": memory_lucidity_purge, - "memory_search_rrf": memory_search_rrf, + "memory_search": memory_search, } for _name, _func in _register_tools.items(): diff --git a/tests/test_auth_backup.py b/tests/test_auth_backup.py index 4b41a763..c2528688 100644 --- a/tests/test_auth_backup.py +++ b/tests/test_auth_backup.py @@ -242,7 +242,7 @@ def test_mcp_tools_are_async(): assert "memory_backup" in tool_names assert "memory_api_key" in tool_names assert "memory_lucidity_purge" in tool_names - assert "memory_search_rrf" in tool_names + assert "memory_search" in tool_names for tool in tools: assert inspect.iscoroutinefunction(tool.fn), f"{tool.name} is not async" diff --git a/tests/test_mcp/test_tools_ops_e2e.py b/tests/test_mcp/test_tools_ops_e2e.py index ea3910bc..fccafb78 100644 --- a/tests/test_mcp/test_tools_ops_e2e.py +++ b/tests/test_mcp/test_tools_ops_e2e.py @@ -3,14 +3,9 @@ import pytest from unittest.mock import MagicMock from mcp_server.tools_ops import ( - memory_api_key, - memory_backup, - memory_saga, - memory_data, - memory_sync_replica, - memory_cleanup, - memory_lucidity_purge, - memory_search_rrf, + memory_api_key, memory_backup, memory_saga, + memory_data, memory_sync_replica, memory_cleanup, + memory_lucidity_purge, memory_search, ) @@ -140,7 +135,7 @@ async def test_lucidity_purge(): @pytest.mark.asyncio -async def test_search_rrf(): +async def test_search(): ctx = _make_ctx() - result = await memory_search_rrf(query="test", ctx=ctx) + result = await memory_search(query="test", ctx=ctx) assert isinstance(result, dict)