The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(agent): assert SKILLS_GUIDANCE wiring behaviorally instead of via source grep
Teknium3eff6c5eac52
diff --git a/tests/agent/test_skills_guidance_content_filter.py b/tests/agent/test_skills_guidance_content_filter.pyindex 90fabcefa4e..1ac089c0305 100644--- a/tests/agent/test_skills_guidance_content_filter.py+++ b/tests/agent/test_skills_guidance_content_filter.py@@ -18,7 +18,6 @@ drop the behaviour the sentence exists to produce.from __future__ import annotations-import reimport pytest@@ -87,11 +86,13 @@ class TestBehaviourIsPreserved:class TestGuidanceReachesTheSystemPrompt:def test_guidance_is_wired_into_tool_guidance(self):- # A reword is worthless if the constant stopped being appended. Assert the- # wiring rather than trusting the constant in isolation.- import inspect+ # A reword is worthless if the constant stopped being emitted. Assert the+ # wiring behaviorally rather than trusting the constant in isolation.+ from types import SimpleNamespaceimport agent.system_prompt as system_prompt- source = inspect.getsource(system_prompt)- assert re.search(r"tool_guidance\.append\(\s*SKILLS_GUIDANCE\s*\)", source)+ agent = SimpleNamespace(valid_tool_names={"skill_manage"}, _kanban_worker_guidance="")+ assert SKILLS_GUIDANCE in (system_prompt._tool_guidance_block(agent) or "")+ agent.valid_tool_names = {"terminal"}+ assert SKILLS_GUIDANCE not in (system_prompt._tool_guidance_block(agent) or "")