Skip to content

[Task]: Implement governance approval workflow #7

Description

@rian-be

Summary

Implement approval workflow support on top of MutationRequest so governance can defer execution until required approvals are explicitly resolved.

Goal

Turn PolicyRequirement and pending mutation requests into real approval process instead of leaving approval as modeled concept without execution flow.

Scope

What should be implemented?

  • Introduce approval oriented pending requests using PendingMutationReason.Approval
  • Map PolicyRequirement into request level approval requirements
  • Add approval resolution flow for governed mutation requests
  • Add rejection flow for governed mutation requests
  • Record approval and rejection transitions in MutationRequestDecision
  • Support multi step or multi actor approval requirements
  • Define how approved requests move toward execution
  • Define how rejected requests terminate the request lifecycle

Acceptance Criteria

  • A governed request can enter pending approval state
  • Required approvals are visible on the request model
  • Approvals and rejections are explicit governance actions, not just policy result placeholders
  • Decision history records who approved or rejected and why
  • Approved requests have a defined next step toward execution
  • Rejected requests have a defined terminal status and audit trail
  • The implementation stays within ModularityKit.Mutator.Governance

Notes

Implemented through:

  • MutationRequest.PendingApproval(...)
  • request level ApprovalRequirements
  • MutationApprovalRequirement and MutationApprovalRequirementStatus
  • MutationRequestApprovalWorkflowManager
  • ApprovalGranted, ApprovalRejected, and terminal Approved / Rejected request decisions
  • multi step and multi actor approval mapping from PolicyRequirement
  • governance regression coverage in MutationRequestApprovalWorkflowTests
  • runnable sample in Examples/Governance/ApprovalWorkflow

Approval now builds on the pending lifecycle instead of introducing parallel approval only request model.

Metadata

Metadata

Assignees

Labels

No labels
No labels
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions