conductor(checkpoint): Test integrity audit complete

This commit is contained in:
2026-03-07 20:15:22 -05:00
parent d2521d6502
commit c2930ebea1
16 changed files with 233 additions and 80 deletions

View File

@@ -1,3 +1,7 @@
"""
ANTI-SIMPLIFICATION: These tests verify the core multi-agent execution engine, including dependency graph resolution, worker lifecycle, and context injection.
They MUST NOT be simplified, and their assertions on exact call counts and dependency ordering are critical for preventing regressions in the orchestrator.
"""
import pytest
from unittest.mock import MagicMock, patch
from src.models import Ticket, Track, WorkerContext
@@ -282,7 +286,8 @@ def test_run_worker_lifecycle_pushes_response_via_queue(monkeypatch: pytest.Monk
patch("src.multi_agent_conductor._queue_put") as mock_queue_put:
mock_spawn.return_value = (True, "prompt", "context")
run_worker_lifecycle(ticket, context, event_queue=mock_event_queue)
mock_queue_put.assert_called()
# ANTI-SIMPLIFICATION: Ensure exactly one 'response' event is put in the queue to avoid duplication loops.
assert mock_queue_put.call_count >= 1
call_args = mock_queue_put.call_args_list[0][0]
assert call_args[1] == "response"
assert call_args[2]["stream_id"] == "Tier 3 (Worker): T1"