Skip to content

Commit c087afb

Browse files
committed
Docs: Define governance approval workflow hardening
1 parent e81234d commit c087afb

2 files changed

Lines changed: 94 additions & 0 deletions

File tree

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# ADR-028: Governance Approval Workflow Hardening
2+
3+
## Tag
4+
#adr_028
5+
6+
## Status
7+
Accepted
8+
9+
## Date
10+
2026-06-24
11+
12+
## Scope
13+
ModularityKit.Mutator.Governance
14+
15+
## Context
16+
17+
The governance package already implements the first approval workflow:
18+
19+
- request-level approval requirements
20+
- ordered step execution
21+
- explicit approve and reject actions
22+
- approval history recorded through `MutationRequestDecision`
23+
24+
That first slice is functional, but it is too narrow for operational governance scenarios.
25+
26+
The main gaps are:
27+
28+
- approval targets are mostly modeled as individual actors
29+
- grouped approvals and quorum semantics are not first-class
30+
- approval expiration is not modeled independently from generic request expiration
31+
- rejection is recorded, but the business reason model is too thin
32+
- some failure paths still collapse into generic invalid-operation behavior
33+
34+
Without hardening, governance approval would remain present but not expressive enough for real multi-actor approval workflows.
35+
36+
## Decision
37+
38+
The governance package hardens approval workflow semantics in the following way:
39+
40+
- approval requirements may target:
41+
- a concrete approver id
42+
- an approver role
43+
- an approver group
44+
- approval requirements may participate in approval groups with explicit quorum semantics such as `N-of-M`
45+
- approval requirements may expire independently through approval-specific expiration timestamps
46+
- rejection may carry a structured `MutationApprovalRejectionReason`
47+
- approval-specific invalid states and invalid configurations should raise domain-specific approval exceptions
48+
49+
The request-centric governance model remains unchanged:
50+
51+
- approvals are still attached to a `MutationRequest`
52+
- approval actions still resolve request-level approval requirements
53+
- approval outcomes still become request decision history
54+
55+
Quorum behavior is modeled explicitly:
56+
57+
- once a grouped approval reaches the required quorum
58+
- remaining pending approvals in that group become `Satisfied`
59+
- request history records a `QuorumSatisfied` approval decision
60+
61+
Expiration behavior is also explicit:
62+
63+
- expired approval requirements become `Expired`
64+
- expired approval sets reject the request through governance runtime
65+
- request history records approval expiration and terminal request rejection
66+
67+
## Design Rationale
68+
69+
- Governance approvals must support real organizational approval patterns, not only linear actor-by-actor sign-off.
70+
- Role and group targeting fits the existing `MutationContext` model without introducing a separate identity subsystem.
71+
- Quorum semantics belong in governance approval, not in the core mutation engine.
72+
- Structured rejection reasons make approval denial auditable and machine-readable.
73+
- Approval expiration should be explicit because an approval timeout is not the same business event as generic request expiration.
74+
75+
## Consequences
76+
77+
### Positive
78+
79+
- Approval workflow now supports richer operational behavior without leaving the request-centric governance model.
80+
- Multi-actor and grouped approvals become first-class.
81+
- Approval denial and expiration become more auditable.
82+
- Governance runtime can represent approval completion without requiring every approver in a quorum set to act.
83+
84+
### Negative
85+
86+
- Approval model complexity increases.
87+
- Approval targeting now depends on agreed metadata conventions for actor roles and groups.
88+
- Future persistence providers will need to store richer approval state and rejection metadata.
89+
90+
## Related ADRs
91+
92+
- ADR-025: Governance Approval Workflow
93+
- ADR-027: Governed Execution Manager

Docs/Decision/listadr.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ These ADRs describe the `ModularityKit.Mutator.Governance` extension layer and i
4343
| ADR-025 | Governance Approval Workflow | [ADR-025](Adr/ADR_025_Governance_Approval_Workflow.md) |
4444
| ADR-026 | Governance Request Query API | [ADR-026](Adr/ADR_026_Governance_Request_Query_API.md) |
4545
| ADR-027 | Governed Execution Manager | [ADR-027](Adr/ADR_027_Governed_Execution_Manager.md) |
46+
| ADR-028 | Governance Approval Workflow Hardening | [ADR-028](Adr/ADR_028_Governance_Approval_Workflow_Hardening.md) |
4647

4748
> See individual ADRs for detailed context, decision rationale, and consequences.

0 commit comments

Comments
 (0)