Skip to content

[Task]: Add undo and compensation support for governed execution #25

Description

@rian-be

Summary

Add explicit reversal and compensation support for governed mutation execution.

Goal

Introduce durable compensation semantics for reversible or operator corrected governed mutations once execution and persistence contracts are stable.

Problem

MutationIntent.IsReversible exists, but runtime still has no first class model for governed rollback or forward compensation. Once governed execution becomes durable and auditable, compensation can no longer be treated as an informal follow up action.

Scope

  • Introduce reversible mutation or compensation contracts
  • Link original execution and compensating execution records
  • Support compensation plans for failed batches and operator driven rollback flows
  • Define audit/history representation for compensation behavior

Design Expectations

  • Compensation should be modeled as governed execution behavior, not only a helper utility.
  • Original and compensating actions must remain auditable and linked.
  • The model should distinguish restoration-style rollback from forward corrective compensation where needed.
  • Compensation semantics should build on stable governed execution and persistence foundations.

Acceptance Criteria

  • Compensation behavior is represented as first class governed execution concept
  • Original and compensating executions are explicitly linked
  • Audit/history flows preserve compensation semantics
  • Tests cover at least one operator driven or batch driven compensation path

Non-Goals

  • This issue does not bypass the need for stable governed execution orchestration first
  • This issue does not require distributed saga infrastructure
  • This issue does not replace explicit domain modeling of irreversible mutations

Notes

This stays in the later platform phase until governed execution and persistence are stable.

Metadata

Metadata

Assignees

No one assigned

    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