Patterns icon
Pattern guide

Idempotent Compliance Pass

Run compliance checks repeatedly without harming already-correct systems.

Intent

Run compliance checks repeatedly without harming already-correct systems.

When to use

  • Policy compliance must be enforced at scale.
  • Manual checks are slow or error-prone.
  • You need evidence of compliance outcomes.
  • Exceptions must be tracked deliberately.

Core mechanics

  • Define policy and expected state clearly.
  • Measure current state and detect drift.
  • Remediate automatically or flag exceptions.
  • Record evidence for audits.

Implementation checklist

  1. Document policy rules and acceptable exceptions.
  2. Collect current state with reliable sources.
  3. Compute drift and categorize issues.
  4. Apply remediation with dry-run options.
  5. Capture evidence and reports for audit.
  6. Review exceptions regularly.

Failure modes and mitigations

  • False positives -> adjust rules or add allowlists.
  • Over-remediation -> add approval or dry-run gates.
  • Unhandled edge cases -> document and track exceptions.
  • Missing evidence -> add audit output by default.

Observability and validation

  • Compliance rate over time.
  • Exception counts and categories.
  • Remediation success rate.
  • Audit report locations.

Artifacts

  • Policy definitions.
  • Compliance reports and evidence.
  • Exception logs.
Seen in production

Seen in production as

Related

Related patterns