manaul correction attempts
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
@@ -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).
|
||||
|
||||
@@ -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"])
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user