Skip to content

Commit c8fd458

Browse files
committed
Docs: Define governance request query API
Added - ADR-026 for storage-agnostic governance request queries - ADR index entry for governance query capabilities Result The governance architecture now has an explicit decision for operational request querying so future providers can implement one consistent query surface for pending queues, request history, and governance metadata filters.
1 parent 6f87204 commit c8fd458

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# ADR-026: Governance Request Query API
2+
3+
## Tag
4+
#adr_026
5+
6+
## Status
7+
Proposed
8+
9+
## Date
10+
2026-06-22
11+
12+
## Scope
13+
ModularityKit.Mutator.Governance
14+
15+
## Context
16+
17+
The governance package is moving toward durable request lifecycle, approval history, and future persistence providers.
18+
19+
Point lookups by request id are not enough for operational governance scenarios. Users need queries such as:
20+
21+
- all pending approvals
22+
- requests for a given state
23+
- requests by actor
24+
- requests by category or risk level
25+
- requests filtered by tags, metadata, or blast radius
26+
- recent approval decisions
27+
28+
Without a query API, persistence becomes only storage and governance data remains hard to use operationally.
29+
30+
## Decision
31+
32+
The governance package should define a storage-agnostic request query API.
33+
34+
Expected direction:
35+
36+
- expose query-oriented contracts in the governance package
37+
- support filtering by status, pending reason, actor, category, and time range
38+
- support governance-specific filters such as tags, metadata, and blast radius
39+
- support approval-oriented views such as pending approval queues and recent decisions
40+
- keep the query surface provider-neutral so future persistence packages can implement it consistently
41+
42+
The exact query object model is intentionally left open for the first implementation.
43+
44+
## Design Rationale
45+
46+
- Governance data becomes useful only when it is operationally queryable.
47+
- Query semantics should be owned by governance rather than improvised in store implementations.
48+
- A storage-agnostic contract keeps future provider packages aligned.
49+
50+
## Consequences
51+
52+
### Positive
53+
54+
- Governance can support real review and operational workflows.
55+
- Future persistence providers have a clear contract to implement.
56+
- Tags, metadata, and blast radius fields get a practical consumer path.
57+
58+
### Negative
59+
60+
- Query surface design can grow quickly if not kept disciplined.
61+
- Different storage providers may support different performance characteristics for the same filters.
62+
63+
## Related ADRs
64+
65+
- ADR-020: Governance MutationRequest Model
66+
- ADR-022: Governance Request Decisions and Storage
67+
- ADR-023: Governance Versioned Request Resolution

Docs/Decision/listadr.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ These ADRs describe the `ModularityKit.Mutator.Governance` extension layer and i
4141
| ADR-023 | Governance Versioned Request Resolution | [ADR-023](Adr/ADR_023_Governance_Versioned_Request_Resolution.md) |
4242
| ADR-024 | Governance Runtime Pending Request Handling | [ADR-024](Adr/ADR_024_Governance_Runtime_Pending_Request_Handling.md) |
4343
| ADR-025 | Governance Approval Workflow | [ADR-025](Adr/ADR_025_Governance_Approval_Workflow.md) |
44+
| ADR-026 | Governance Request Query API | [ADR-026](Adr/ADR_026_Governance_Request_Query_API.md) |
4445

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

0 commit comments

Comments
 (0)