Patterns icon
Pattern guide

Diff Apply Audit

Compare desired and current state, apply only the delta, and record every action.

Intent

Compare desired and current state, apply only the delta, and record every action.

When to use

  • Automations modify external systems or production data.
  • You need safe retries without duplicate effects.
  • You must prove what changed for audit or compliance.
  • Runs are long or high volume and can fail midstream.

Core mechanics

  • Fetch current state and compute a desired state.
  • Generate a diff and an explicit action plan.
  • Apply only the delta with safeguards.
  • Record results, errors, and timing for each action.

Implementation checklist

  1. Define desired state inputs and validation rules.
  2. Capture current state with stable identifiers.
  3. Compute a deterministic diff and action plan.
  4. Provide a dry-run output for review.
  5. Apply actions with rate limits and retries.
  6. Write audit logs and summarize outcomes.

Failure modes and mitigations

  • Non-idempotent actions -> add guards or uniqueness checks.
  • Partial runs -> add checkpointing and resume support.
  • API rate limits -> throttle and back off.
  • Audit gaps -> log before and after state.

Observability and validation

  • Counts: planned vs applied vs failed actions.
  • Duration per phase and per record.
  • Error rate and top failure reasons.
  • Links to audit reports and logs.

Artifacts

  • Diff report or action plan.
  • Audit log with timestamps and outcomes.
  • Summary report for stakeholders.
Seen in production

Seen in production as

Atlas project

Aether Integrator Platform

Centralize integration workflows in a single web app so connectors share authentication, scheduling, and audit controls instead of bespoke …

Atlas project

ASCIP Sync Engine

Provide a deterministic, auditable way to keep district staff data aligned with ASCIP LMS by turning CSV extracts into a repeatable …

Atlas project

google-classroom-guardians

Manage Google Classroom guardian relationships by reading a CSV of students and guardians, computing required invitations/removals, and …

Atlas project

TitanHST Integration Connector

Prove the Aether Integrator architecture with a connector that matters operationally. It ingests Aeries + HR 2.0 source truth; TitanHST API …

Related

Related patterns