Skip to content

[Task]: Persist governance version resolution outcomes through runtime #12

Description

@rian-be

Summary

Persist version resolution outcomes through a governance runtime path so stale-resolution decisions cannot be dropped accidentally by callers.

Goal

Make governance version resolution auditable by default instead of relying on callers to remember to save the mutated request returned from Resolve(...).

Scope

What should be implemented?

  • Decide whether the current resolver remains a pure evaluator or is paired with a persisted runtime manager
  • Add a runtime path such as ResolveAndStore or equivalent orchestration for version resolution
  • Ensure stale-resolution decisions are persisted together with the resulting request state
  • Define how persisted resolution interacts with lifecycle transitions and optimistic concurrency
  • Update governance examples and documentation to reflect the persisted path
  • Add regression coverage for dropped resolution decisions

Acceptance Criteria

  • Version resolution outcomes are difficult to lose through caller misuse
  • Decision history records VersionValidated, RejectedAsStale, RevalidationRequired, or RenewedApprovalRequired through a persisted runtime path
  • Governance runtime exposes a clear persisted resolution flow in addition to any pure evaluation API
  • Test coverage proves resolution decisions are not left only in memory by default
  • The implementation remains inside ModularityKit.Mutator.Governance

Notes

Implemented through:

  • pure MutationRequestVersionResolver retained as the evaluator
  • IMutationRequestVersionResolutionManager
  • MutationRequestVersionResolutionManager.ResolveAndStore(...)
  • optimistic concurrency via IMutationRequestStore.TryStore(...)
  • updated governance VersionedResolution example
  • regression coverage in MutationRequestVersionResolutionPersistenceTests

The old characterization proving dropped in-memory decisions remains, and is now paired with persisted-path tests that assert the governance runtime stores the resulting resolution state and decision history.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions