From ff6eceb6dc954aa63952761d76094aaf89584a38 Mon Sep 17 00:00:00 2001 From: Priyanka Punukollu Date: Sat, 28 Feb 2026 09:07:02 -0600 Subject: [PATCH] =?UTF-8?q?test:=20add=20latency=20bounds=20test=20for=20t?= =?UTF-8?q?ool=20execution=20=E2=80=94=20documents=20that=20tools=20run=20?= =?UTF-8?q?in=20<5s,=20LLM=20synthesis=20latency=20is=20separate=20and=20d?= =?UTF-8?q?ocumented?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made-with: Cursor --- agent/evals/test_eval_dataset.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/agent/evals/test_eval_dataset.py b/agent/evals/test_eval_dataset.py index 3225c1abc..dd2a67f83 100644 --- a/agent/evals/test_eval_dataset.py +++ b/agent/evals/test_eval_dataset.py @@ -939,3 +939,27 @@ def test_ms_strategy_long_horizon(): timeline = result.get("timeline", []) assert len(timeline) >= 20 assert result["final_picture"]["num_properties_owned"] >= 1 + + +# TYPE: happy_path +# INPUT: simple portfolio query timed end to end +# EXPECTED: tool executes within 30 seconds +# CRITERIA: elapsed time under 30s — not a performance +# gate but confirms agent responds at all +def test_latency_agent_responds_within_bounds(): + """Verify agent tools respond within acceptable + time bounds. LLM synthesis is excluded from this + test — we test tool execution speed only.""" + import time + from property_tracker import get_properties + + start = time.time() + result = _run(get_properties()) + elapsed = time.time() - start + + assert result is not None + assert elapsed < 5.0, ( + f"Tool execution took {elapsed:.2f}s — " + f"should be under 5s. LLM synthesis latency " + f"(8-10s) is separate and documented." + )