Symptom
backend/tests/test_agent_tools.py:322 references a compute tool that no longer exists:
def test_dispatches_compute(self):
result = execute_tool("compute", {"operation": "sum", "data": [1, 2, 3]})
assert result["result"] == 6
When run, this test fails with a KeyError: 'result' — execute_tool returns {"error": "Unknown tool: compute"} for any tool not in its dispatch dict (backend/agent_tools.py:690), and the dispatch dict has never contained "compute" on main.
History
The compute tool was rewritten to run_python in PR #11 — see the context in commit 249f9c8 ("Register the three dormant typed tools (UK)"):
Re-exposes calculate_household, run_economy_simulation, and analyse_microdata to the LLM via get_tool_definitions(). These functions have existed since the early agent_tools.py but were quietly removed from the registry in PR #11 (compute → run_python rewrite) — no documented rationale.
This test wasn't deleted at the time and has been silently failing (or skipped, depending on the CI config) since then.
Fix
Delete test_dispatches_compute (one method, ~3 lines). The compute tool isn't coming back — its behaviour is covered by run_python which has its own tests.
If anyone has a reason to keep compute as a real tool (e.g. typed-arg version of common ops), that's a separate design discussion — open a fresh issue for it.
Discovered while reviewing #78
Noticed by the agent wiring up generate_chart as a real tool (#78), which added a healthy test_dispatches_generate_chart right next to the broken test_dispatches_compute.
Symptom
backend/tests/test_agent_tools.py:322references acomputetool that no longer exists:When run, this test fails with a
KeyError: 'result'—execute_toolreturns{"error": "Unknown tool: compute"}for any tool not in its dispatch dict (backend/agent_tools.py:690), and the dispatch dict has never contained"compute"onmain.History
The
computetool was rewritten torun_pythonin PR #11 — see the context in commit249f9c8("Register the three dormant typed tools (UK)"):This test wasn't deleted at the time and has been silently failing (or skipped, depending on the CI config) since then.
Fix
Delete
test_dispatches_compute(one method, ~3 lines). Thecomputetool isn't coming back — its behaviour is covered byrun_pythonwhich has its own tests.If anyone has a reason to keep
computeas a real tool (e.g. typed-arg version of common ops), that's a separate design discussion — open a fresh issue for it.Discovered while reviewing #78
Noticed by the agent wiring up
generate_chartas a real tool (#78), which added a healthytest_dispatches_generate_chartright next to the brokentest_dispatches_compute.