From d415dd7eade046c3657248bef3484e15b47b3fdb Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 15 Jun 2026 21:48:44 +0200 Subject: [PATCH] Test: Validate research evaluator follow-up query constraints --- backend/tests/test_workflow_router_builtins.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/tests/test_workflow_router_builtins.py b/backend/tests/test_workflow_router_builtins.py index 3c4a532..93b31cd 100644 --- a/backend/tests/test_workflow_router_builtins.py +++ b/backend/tests/test_workflow_router_builtins.py @@ -188,3 +188,12 @@ class RouterAndBuiltinTests(unittest.IsolatedAsyncioTestCase): for item in BUILTIN_WORKFLOWS: with self.subTest(item=item["slug"]): self.assertTrue(validate_workflow_graph(item["graph"], registry).valid) + + async def test_research_evaluator_contract_avoids_contradictory_followups(self): + research = next(item for item in BUILTIN_WORKFLOWS if item["slug"] == "research") + evaluate = next(node for node in research["graph"]["nodes"] if node["id"] == "evaluate") + config = evaluate["config"] + + self.assertIn("If sufficient=true, follow_up_query must be an empty string", config["system_template"]) + self.assertIn("If sufficient=false, follow_up_query must be one concise web search query", config["system_template"]) + self.assertIn("Resolved request and router inputs", config["user_template"])