Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
test(memory): accept replay window in consolidation assertion
Xubin Ren24daf9a51c39
diff --git a/tests/agent/test_loop_consolidation_tokens.py b/tests/agent/test_loop_consolidation_tokens.pyindex 347cab1e9..aeb67d8b3 100644--- a/tests/agent/test_loop_consolidation_tokens.py+++ b/tests/agent/test_loop_consolidation_tokens.py@@ -2,8 +2,8 @@ from unittest.mock import AsyncMock, MagicMockimport pytest-from nanobot.agent.loop import AgentLoopimport nanobot.agent.memory as memory_module+from nanobot.agent.loop import AgentLoopfrom nanobot.bus.queue import MessageBusfrom nanobot.providers.base import LLMResponse@@ -205,9 +205,10 @@ async def test_preflight_consolidation_receives_pending_summary(tmp_path) -> Nonawait loop.process_direct("hello", session_key="cli:test")- loop.consolidator.maybe_consolidate_by_tokens.assert_awaited_once_with(+ loop.consolidator.maybe_consolidate_by_tokens.assert_any_await(session,session_summary="Previous conversation summary: earlier context",+ replay_max_messages=loop._max_messages,)