Expand description
magma-controller — complete operator-loop composition.
Wraps Reconciler + DriftPolicy + BudgetedReconciler +
PlanStream + LifecycleState + Bundle + Metrics into ONE
reusable controller. The “I want a complete operator” composition
every reconciler kind plugs into.
Calling controller.reconcile(&config) runs the full loop:
- FSM Idle → Planning
- read_state (via budgeted reconciler)
- compute_plan + emit PlanComputed event + metrics
- classify drift against policy + emit DriftClassified event + metrics
- branch on ReconcileResult:
- NoChange → FSM → Stable
- Refused → FSM → Refused
- HeldForApproval → FSM → Approving (caller drives further)
- Applied → apply + emit ApplyOutcome event + metrics + FSM → Verifying → Stable
- build a tamper-evident magma-bundle
- return a typed ControllerOutcome carrying the bundle + final FSM state
Per theory/CONVERGENCE-SUBSTRATE.md §IV.5 + §IV.7.
Structs§
- Controller
Outcome - Output of one
reconcile(...)call. Wraps the typedReconcileResultfrom magma-drift (no duplicate enum) plus the FSM lifecycle snapshot and the tamper-evident Bundle. - Reconcile
Controller - The complete operator loop, parameterized by reconciler kind.
Enums§
Traits§
- DynController
- Erased ReconcileController surface, useful when storing many controllers of different kinds in one collection.