Summary
Refactor ModularityKit.Mutator.Governance.Tests into smaller, scenario focused fixtures so governance execution, request lifecycle, approval, and resolution coverage do not accumulate inside broad test files.
Goal
Improve maintainability of governance package tests by decomposing oversized fixtures, extracting stable local test support where repetition is real, and aligning file boundaries with governance concerns.
Problem
ModularityKit.Mutator.Governance.Tests is starting to mix multiple governance concerns inside broad fixtures and repeated local setup. As governed execution, approval, resolution, and compensation scenarios expand, this makes the package harder to scan, harder to extend safely, and harder to review.
Scope
Design Expectations
- Test decomposition should preserve behavior while making scenario intent clearer.
- Helpers should be extracted only where they remove real duplication.
- Governance execution and compensation tests should remain readable without hiding core scenario flow.
- File names and fixture names should reflect package-level governance concerns rather than mixed utility buckets.
Acceptance Criteria
Non-Goals
- This issue does not change governance runtime behavior or public APIs
- This issue does not pull all test support into one cross package helper layer
- This issue does not refactor Redis specific or core runtime tests outside this package
Notes
Implemented decomposition:
- Execution coverage now lives in focused files for execution and compensation scenarios, with shared execution setup in local test support.
- Query coverage now lives in focused request/filter and view files, with shared request builders extracted into local test support.
- Approval coverage now lives in focused approval and expiration files, with shared workflow builders extracted into local test support.
- Resolution and lifecycle coverage were already isolated in their own fixtures and stayed in place.
This keeps the governance test package readable while preserving the same behavioral coverage.
Summary
Refactor
ModularityKit.Mutator.Governance.Testsinto smaller, scenario focused fixtures so governance execution, request lifecycle, approval, and resolution coverage do not accumulate inside broad test files.Goal
Improve maintainability of governance package tests by decomposing oversized fixtures, extracting stable local test support where repetition is real, and aligning file boundaries with governance concerns.
Problem
ModularityKit.Mutator.Governance.Testsis starting to mix multiple governance concerns inside broad fixtures and repeated local setup. As governed execution, approval, resolution, and compensation scenarios expand, this makes the package harder to scan, harder to extend safely, and harder to review.Scope
ModularityKit.Mutator.Governance.TestsDesign Expectations
Acceptance Criteria
ModularityKit.Mutator.Governance.Testsno longer relies on oversized mixed concern fixtures for its core governance scenariosNon-Goals
Notes
Implemented decomposition:
This keeps the governance test package readable while preserving the same behavioral coverage.