diff --git a/src/conductor_tech_lead.py b/src/conductor_tech_lead.py index 1ae3d802..f2dc2872 100644 --- a/src/conductor_tech_lead.py +++ b/src/conductor_tech_lead.py @@ -5,7 +5,7 @@ This module implements the Tier 2 (Tech Lead) function for generating implementa It uses the LLM to analyze the track requirements and produce structured ticket definitions. Architecture: - - Uses ai_client.send() for LLM communication + - Uses ai_client.send_result() for LLM communication - Uses mma_prompts.PROMPTS["tier2_sprint_planning"] for system prompt - Returns JSON array of ticket definitions diff --git a/src/mcp_client.py b/src/mcp_client.py index fd4374b7..0e82571a 100644 --- a/src/mcp_client.py +++ b/src/mcp_client.py @@ -2370,7 +2370,7 @@ MCP_TOOL_SPECS: list[dict[str, Any]] = [ "properties": { "target": { "type": "string", - "description": "Fully qualified name of the target (e.g., 'src.ai_client.send') or class.method.", + "description": "Fully qualified name of the target (e.g., 'src.ai_client.send_result') or class.method.", }, "max_depth": { "type": "integer", diff --git a/tests/test_ai_loop_regressions_20260614.py b/tests/test_ai_loop_regressions_20260614.py index 0a352da4..99b2e573 100644 --- a/tests/test_ai_loop_regressions_20260614.py +++ b/tests/test_ai_loop_regressions_20260614.py @@ -46,7 +46,7 @@ def test_fr1_error_becomes_discussion_entry(mock_app: App, monkeypatch: pytest.M When send_result returns errors, _handle_request_event must enqueue a 'response' event with status='error' and the error message in the text. - Currently broken: the code calls deprecated ai_client.send() which + Currently broken: the code calls deprecated ai_client.send_result() which silently returns '' on error. The empty string is then routed to the event_queue as a 'done' response and _on_comms_entry filters it out via `if text_content.strip():` (src/app_controller.py:3801). diff --git a/tests/test_context_pruner.py b/tests/test_context_pruner.py index 104ce8e2..4ead7c05 100644 --- a/tests/test_context_pruner.py +++ b/tests/test_context_pruner.py @@ -104,7 +104,7 @@ def test_token_reduction_logging(capsys): with pytest.MonkeyPatch().context() as m: m.setattr("builtins.open", lambda f, *args, **kwargs: type('obj', (object,), {'read': lambda s: code, '__enter__': lambda s: s, '__exit__': lambda s, *a: None})()) m.setattr("pathlib.Path.exists", lambda s: True) - m.setattr("src.ai_client.send", lambda **kwargs: "DONE") + m.setattr("src.ai_client.send_result", lambda **kwargs: "DONE") run_worker_lifecycle(ticket, context, context_files=["test.py"]) diff --git a/tests/test_headless_verification.py b/tests/test_headless_verification.py index 662b3315..088213b1 100644 --- a/tests/test_headless_verification.py +++ b/tests/test_headless_verification.py @@ -27,7 +27,7 @@ async def test_headless_verification_full_run(vlogger) -> None: vlogger.log_state("T2 Status Initial", "todo", t2.status) # We must patch where it is USED: multi_agent_conductor - with patch("src.multi_agent_conductor.ai_client.send") as mock_send, \ + with patch("src.multi_agent_conductor.ai_client.send_result") as mock_send, \ patch("src.multi_agent_conductor.ai_client.reset_session") as mock_reset, \ patch("src.multi_agent_conductor.confirm_spawn", return_value=(True, "mock_prompt", "mock_ctx")): # We need mock_send to return something that doesn't contain "BLOCKED" diff --git a/tests/test_rag_integration.py b/tests/test_rag_integration.py index dbf63f1b..b552f70c 100644 --- a/tests/test_rag_integration.py +++ b/tests/test_rag_integration.py @@ -72,7 +72,7 @@ def test_rag_integration(mock_project): # message sent to the provider. We use 'wraps' to let the real logic run # while still having a mock we can inspect. We also mock the internal # _send_gemini which is what actually "sends to the provider". - with patch('src.ai_client.send', wraps=ai_client.send) as mock_send: + with patch('src.ai_client.send_result', wraps=ai_client.send_result) as mock_send: with patch('src.ai_client._send_gemini') as mock_provider: mock_provider.return_value = "Mock AI Response" diff --git a/tests/test_tiered_aggregation.py b/tests/test_tiered_aggregation.py index cf8b709f..105eabcf 100644 --- a/tests/test_tiered_aggregation.py +++ b/tests/test_tiered_aggregation.py @@ -40,7 +40,7 @@ def test_app_controller_do_generate_uses_persona_strategy(mock_build): assert call_kwargs.get("aggregation_strategy") == "full" @patch("src.summarize.summarise_file") -@patch("src.multi_agent_conductor.ai_client.send") +@patch("src.multi_agent_conductor.ai_client.send_result") def test_run_worker_lifecycle_uses_strategy(mock_send, mock_summarise, tmp_path): mock_send.return_value = "fake response" mock_summarise.return_value = "fake summary"