From 0e65dd3bd621f3b9120a02ee802f353452c23c39 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 15 Jun 2026 21:37:28 +0200 Subject: [PATCH] Update workflow router built-in test assertions for improved coverage of routing logic --- backend/tests/test_workflow_router_builtins.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/tests/test_workflow_router_builtins.py b/backend/tests/test_workflow_router_builtins.py index 59a49ca..47058bf 100644 --- a/backend/tests/test_workflow_router_builtins.py +++ b/backend/tests/test_workflow_router_builtins.py @@ -167,10 +167,14 @@ class RouterAndBuiltinTests(unittest.IsolatedAsyncioTestCase): prompt = mocked.await_args.args[1][0]["content"] self.assertEqual(result["inputs"]["web_search_query"], "Iran political news today") self.assertIn("Recent conversation:\n1. User: what's the weather in Iran today", prompt) - self.assertIn("search for 'Iran political news today'", prompt) - self.assertIn("Never choose Input -> Output for weather, news, politics today", prompt) - self.assertIn("Web Answer is for straightforward current lookups", prompt) - self.assertIn("Research is for explicit deeper investigation", prompt) + self.assertIn("Resolve the current message into a standalone request", prompt) + self.assertIn("capabilities cover the required work", prompt) + self.assertIn("Do not choose a workflow because an example sounds similar", prompt) + self.assertIn("Choose a web workflow when the request needs external facts", prompt) + self.assertIn("Short follow-ups usually inherit the previous subject", prompt) + self.assertIn("Routing contract:", prompt) + self.assertIn("This workflow performs one bounded search/fetch/rank pass", prompt) + self.assertIn("Choose when the standalone request needs an investigation", prompt) self.assertIn("Allowed workflows. This list is already filtered", prompt) self.assertIn("web-answer", prompt) self.assertNotIn("input-output", prompt)