Summary
Decompose MutationRequest into smaller concern oriented components before the request root turns into another flat governance bag of fields.
Goal
Keep MutationRequest as the aggregate root while moving lifecycle, execution, and request payload details into explicit submodels with clearer ownership.
Problem
MutationRequest currently carries target identity, request payload, approval requirements, lifecycle state, execution outcome, concurrency metadata, and request metadata on one flat record. As governance keeps adding persisted runtime fields such as typed side effects and richer execution data, the request model becomes harder to read, evolve, and reason about consistently across runtime, Redis, and query code.
Scope
Design Expectations
MutationRequest should remain the root model, not disappear behind a builder or hidden mapper.
- The decomposition should follow actual governance concerns rather than arbitrary technical grouping.
- Runtime and Redis flows should become easier to maintain, not more indirect.
- Query and persistence code should read more clearly after the split, especially around lifecycle and execution data.
- The resulting model should make it obvious which data is request intent, which is lifecycle state, and which is execution outcome.
Acceptance Criteria
Non-Goals
- This issue does not redesign governance query contracts by itself
- This issue does not require a new builder or fluent API for request creation
- This issue does not change optimistic concurrency semantics unless needed by the refactor
- This issue does not replace
MutationRequest with multiple top level public models
Notes
Implemented decomposition:
MutationRequest.Scope now groups target identity in MutationRequestScopeDetails.
MutationRequest.Payload now groups submitted intent and requester context in MutationRequestPayloadDetails.
MutationRequest.Lifecycle now groups lifecycle state and timestamps in MutationRequestLifecycleDetails.
MutationRequest.Execution and MutationRequest.Versioning continue to own governed execution and versioning concerns.
- Runtime lifecycle, approval, resolution, execution, in-memory query materialization, Redis serialization, and governance examples were aligned to the decomposed request shape.
This keeps MutationRequest as the root model while making concern ownership explicit and reducing pressure to keep growing one flat request record.
Summary
Decompose
MutationRequestinto smaller concern oriented components before the request root turns into another flat governance bag of fields.Goal
Keep
MutationRequestas the aggregate root while moving lifecycle, execution, and request payload details into explicit submodels with clearer ownership.Problem
MutationRequestcurrently carries target identity, request payload, approval requirements, lifecycle state, execution outcome, concurrency metadata, and request metadata on one flat record. As governance keeps adding persisted runtime fields such as typed side effects and richer execution data, the request model becomes harder to read, evolve, and reason about consistently across runtime, Redis, and query code.Scope
MutationRequestinto grouped concern-oriented recordsDesign Expectations
MutationRequestshould remain the root model, not disappear behind a builder or hidden mapper.Acceptance Criteria
MutationRequestno longer stores all major governance concerns as one flat field listNon-Goals
MutationRequestwith multiple top level public modelsNotes
Implemented decomposition:
MutationRequest.Scopenow groups target identity inMutationRequestScopeDetails.MutationRequest.Payloadnow groups submitted intent and requester context inMutationRequestPayloadDetails.MutationRequest.Lifecyclenow groups lifecycle state and timestamps inMutationRequestLifecycleDetails.MutationRequest.ExecutionandMutationRequest.Versioningcontinue to own governed execution and versioning concerns.This keeps
MutationRequestas the root model while making concern ownership explicit and reducing pressure to keep growing one flat request record.