Curate-Ipsum Project Summary¶
Overview¶
Curate-Ipsum is an MCP (Model Context Protocol) server designed to orchestrate and track mutation testing workflows. It serves as a unified interface for running unit tests, integration tests, and mutation tests while maintaining historical metrics and enabling PID-based analysis of code quality over time.
Architecture¶
The project consists of three core modules:
1. models.py - Data Models (79 lines)¶
Pydantic-based type-safe models defining the domain:
Model |
Purpose |
|---|---|
|
Enum for run types: |
|
Base metadata: id, projectId, commitSha, regionId, timestamp |
|
Unit/integration test results with pass/fail counts |
|
Per-file mutation statistics |
|
Full mutation run results with per-file breakdown |
|
Proportional-Integral-Derivative components for metrics |
|
Regional analysis with mutation score, centrality, triviality |
|
Collection of runs for a project/region |
2. server.py - MCP Server Interface (167/155 lines)¶
FastMCP server exposing five tools:
Tool |
Type |
Description |
|---|---|---|
|
async |
Execute unit tests and capture results |
|
async |
Execute integration tests and capture results |
|
async |
Execute mutation tests (Stryker) and parse reports |
|
sync |
Retrieve historical runs for a project/region |
|
sync |
Compute PID-like metrics for a region |
3. tools.py - Core Implementation (453/427 lines)¶
Business logic including:
Command Execution: Async subprocess management with timeout support
Test Output Parsing: Regex-based extraction of test results
Stryker Report Parsing: JSON report processing with multi-format support
History Management: JSONL-based persistent storage
PID Metrics Calculation: Time-series analysis with configurable window and decay
Version Differences¶
Reference Version (Local)¶
Commit:
d1510e6- “added extended timeout as parameter for tools”Extra Features:
extended_timeoutparameter on all tool functionsFiles Renamed:
example_config.toml,example_mcp.jsonData Present:
.mutation_tool_data/runs.jsonlwith test run history
Origin Version (Remote)¶
Commit:
2c2353e- “Add MIT License to the project”Missing:
extended_timeoutparameter functionalityStandard Files:
config.toml,mcp.json,LICENSENo Data: Clean checkout without run history
Key Diff Summary (+46 lines in reference)¶
tools.py: +34 lines (extended_timeout parsing and propagation)
server.py: +12 lines (extended_timeout in tool signatures)
Configuration¶
Environment Variables¶
Variable |
Default |
Purpose |
|---|---|---|
|
|
Storage location |
|
|
Report path |
|
|
PID calculation window |
|
|
PID decay factor |
|
|
Logging verbosity |
Current Functionality Catalog¶
Implemented¶
Unit test execution and result parsing
Integration test execution and result parsing
Mutation test execution with Stryker report parsing
Historical run storage (JSONL format)
Run history retrieval with filtering
PID-based region metrics calculation
Configurable timeouts (reference version only)
Placeholder/Stub Values¶
centrality: Hardcoded to0.5triviality: Hardcoded to0.5
Supported Test Output Formats¶
Total tests:\s*(\d+).+Passed:\s*(\d+).+Failed:\s*(\d+)
Tests run:\s*(\d+)\s*,\s*Passed:\s*(\d+)\s*,\s*Failed:\s*(\d+)
Supported Mutation Tools¶
Stryker (primary, with report parsing)
Generic tool passthrough (command execution only)
Augmentation Opportunities¶
High Priority¶
Centrality/Triviality Calculation: Currently stubbed at 0.5
Additional Mutation Tool Parsers: mutmut, cosmic-ray report formats
Test Framework Detection: Auto-detect pytest, unittest, nose output
Report Export: HTML/JSON summary reports
Medium Priority¶
Mutant Survival Analysis: Track surviving mutants across runs
Code Region Definition: Formal region boundary specification
Differential Analysis: Compare mutation scores between commits
Async History Operations: Non-blocking file I/O
Lower Priority¶
Database Backend: SQLite/PostgreSQL for run storage
Webhook Notifications: Post-run callbacks
Rate Limiting: Protect against runaway mutation runs
Caching Layer: Memoize region metrics calculations