Pcornel
Automation · Automation Fundamentals

State Reconciliation

Cheat sheet · https://pcornel.dk/topic.php?topic=5159

Back to the Topic

Answer

State Reconciliation is the loop that compares desired and current state, selects corrective actions and repeats observation until managed invariants converge or a controlled failure is declared.

Remember

  • Reconciliation ≠ one-time execution; it is an observe-compare-act loop.
  • No reported drift ≠ healthy service if the comparison model omits runtime outcomes.
  • Automatic correction ≠ unlimited retry; oscillation and unsafe repeated changes require stop conditions.
  • Converged configuration ≠ converged dependency state if external systems lag or fail.

First checks

  • terraform plan — differences to reconcile
  • kubectl get events -A | grep -i -e reconcil -e sync — controller activity
  • argocd app get <app> — sync status

Verify in this order

desired vs current → diff → corrective action → loop

Where it usually breaks

A reconciliation loop proves managed state is being compared and corrected; it does not guarantee convergence when the desired state is impossible, dependencies fail or observations are stale.

Configuration/input → graph/state refresh → plan → provider API request → provider terminal result → resource read-back → effective service state → workload.

State Reconciliation automation boundary map

BoundaryHealthy evidenceSuspicious evidence
Intent / inputsOwner, scope and authoritative inputs are explicit and versioned where applicableHidden defaults, stale inventory or competing sources of truth
Decision / executionPlan or decision is explainable and actions are bounded per targetBlind fan-out, implicit assumptions or success based only on executor status
State / verificationTarget is re-observed and acceptance criteria prove the intended outcomeNo read-back, perpetual drift, partial side effects or unresolved exceptions
Recovery / evidenceRetry, rollback or escalation behavior is defined and auditableUnknown partial completion, unsafe retry or evidence lost during remediation

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5159

Confirmation

Confirm action

Continue?