You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(devtools): share campaign result metadata contracts #598
Devtools campaign result schemas duplicate the same targeting metadata across separate result classes.
Evidence from current master:
devtools/mutmut_campaign.py defines CampaignResult for mutation campaigns.
devtools/benchmark_campaign.py defines another CampaignResult for pytest-benchmark campaigns.
devtools/synthetic_benchmark_runtime.py defines a third CampaignResult for synthetic benchmark campaigns.
All three repeat authored-target metadata such as origin, path_targets, artifact_targets, operation_targets, and tags; benchmark variants also carry adjacent maintenance-target fields.
Reports/tests import different CampaignResult classes depending on the lane, so campaign output contracts are fragmented by implementation file rather than a shared campaign vocabulary.
This is not currently breaking output, but it is drift-prone. Any future campaign metadata addition has to be copied across multiple dataclasses, renderers, and tests.
Acceptance criteria
Introduce a shared campaign metadata/result-base contract in devtools for common fields such as origin, target selectors, tags, command identity, commit/worktree context where applicable, and timestamps.
Convert mutation, pytest-benchmark, and synthetic benchmark result records to compose or extend the shared contract while keeping lane-specific payloads explicit.
Update campaign report rendering and tests to use the shared vocabulary where possible.
Keep serialized JSON output stable unless the PR intentionally documents a schema change.
Run focused devtools campaign tests plus devtools verify --quick.
Notes
Found during the wide duplication/source-organization audit recorded in .agent/scratch/574-duplication-organization-audit.md.
Superseded by #625. I consolidated this finding into the composite issue so the work can be handled as one coherent slice instead of as a tiny standalone ticket. The original evidence remains available in this issue history.
Activity
Sinity commentedon May 1, 2026
Superseded by #625. I consolidated this finding into the composite issue so the work can be handled as one coherent slice instead of as a tiny standalone ticket. The original evidence remains available in this issue history.