feat: v0.2.0 sprint — ground truth eval, crossover/mutation, checkpointing, similarity guards, dataset loader, CLI commands, extended test coverage

Aggregates all v0.2.0 sprint work (GARAA-30 through GARAA-40) and fixes
2 integration tests that broke when the codebase went async (DSPyLLMAdapter
and full pipeline tests now properly await coroutines).

277 tests pass (260 unit + 17 integration).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
FullStackDev
2026-03-29 19:13:50 +00:00
parent b9745566c8
commit a5bf2ad59c
43 changed files with 5007 additions and 358 deletions

View File

@@ -91,3 +91,27 @@ def mock_proposer_port() -> AsyncMock:
text="You are a very helpful assistant. Answer the question precisely."
)
return port
@pytest.fixture
def mock_crossover_port() -> AsyncMock:
"""Mock CrossoverPort that combines two parent prompts."""
port = AsyncMock()
async def _crossover(parent_a: Prompt, parent_b: Prompt, task_description: str) -> Prompt:
return Prompt(text=f"{parent_a.text} Also, {parent_b.text.lower()}")
port.crossover = AsyncMock(side_effect=_crossover)
return port
@pytest.fixture
def mock_mutation_port() -> AsyncMock:
"""Mock MutationPort that paraphrases a prompt."""
port = AsyncMock()
async def _mutate(prompt: Prompt, task_description: str, mutation_type: str = "paraphrase") -> Prompt:
return Prompt(text=f"[{mutation_type}] {prompt.text}")
port.mutate = AsyncMock(side_effect=_mutate)
return port