Skip to content

[Task]: Define governance versioned request resolution #4

Description

@rian-be

Summary

Define and implement version aware resolution semantics for governed mutation requests that are approved or resolved after the target state has changed.

Goal

Make deferred governance execution explicit and safe when MutationRequest was created against one state version and is later resolved against a different version.

Scope

What should be implemented?

  • Define the resolution contract for MutationRequest.ExpectedStateVersion
  • Compare the stored expected version with the current state version during request resolution
  • Prevent silent execution of stale requests
  • Define supported stale resolution strategies
  • Decide whether stale requests are rejected, revalidated, or require renewed approval
  • Define how approval history records stale resolution outcomes
  • Define how pending request status changes when version drift is detected
  • Document the selected behavior in governance ADRs and package docs

Acceptance Criteria

  • Governance request resolution checks the current state version against ExpectedStateVersion
  • A request created against an older version cannot execute silently on a drifted state
  • The runtime has an explicit and documented outcome for stale requests
  • The chosen resolution strategy is consistent across approval-driven pending requests
  • Audit or request decision history reflects stale detection and the final resolution path
  • The implementation follows the governance package boundary and does not push request lifecycle concerns into the core runtime

Notes

This issue is driven by ADR-023.

Example scenario:

  • request created against state version v10
  • request enters PendingApproval
  • approval happens after the state has advanced to v15

At that point the governance runtime must define whether it:

  • re-validates and executes against latest state
  • rejects the request as stale
  • requires renewed approval

The implementation now defines explicit runtime behavior through MutationRequestVersionResolver and governance decision history.

Related ADRs:

  • ADR-020: Governance MutationRequest Model
  • ADR-021: Governance Pending Mutation Lifecycle
  • ADR-023: Governance Versioned Request Resolution

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions