"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
test(context): address review — drop dead memory_summary kwarg, pin envelope ordering
Jackzigen1aaef8dd335d
diff --git a/agent/tests/test_context_attribution_layers.py b/agent/tests/test_context_attribution_layers.pyindex bfdbb1a6f..4729099f0 100644--- a/agent/tests/test_context_attribution_layers.py+++ b/agent/tests/test_context_attribution_layers.py@@ -76,7 +76,6 @@ class TestAttributionPromptIntegrity:data_source_count=18,tool_descriptions="[test tools]",skill_descriptions="[test skills]",- memory_summary="[test memory]",memory_section="[test section]",strategy_discovery_routing="[test routing]",current_datetime="2025-01-01 12:00:00",diff --git a/agent/tests/test_system_prompt_cache_stability.py b/agent/tests/test_system_prompt_cache_stability.pyindex 479f45a2b..a04bff1aa 100644--- a/agent/tests/test_system_prompt_cache_stability.py+++ b/agent/tests/test_system_prompt_cache_stability.py@@ -113,3 +113,18 @@ class TestSystemPromptCacheStability:assert "<recalled-memories>" in userassert user.index("<agent-state>") < user.index("analyze AAPL")assert user.index("<recalled-memories>") < user.index("analyze AAPL")++ def test_state_envelope_stays_outside_user_message_tags(self) -> None:+ """loop.py may wrap the raw text in <user-message> tags (goal context).+ The state envelope must stay a sibling prefix, never nest inside —+ it must not look like user-typed input."""+ wrapped = "<goal-continuation>g</goal-continuation>\n\n<user-message>\nanalyze AAPL\n</user-message>"+ m = WorkspaceMemory()+ m.run_dir = "/runs/x"++ user = _builder(m).build_messages(wrapped)[-1]["content"]++ assert user.index("<agent-state>") < user.index("<user-message>")+ closing = user.index("</user-message>")+ opening = user.index("<user-message>")+ assert "<agent-state>" not in user[opening:closing]