Map side effects before implementation
List steps that create external or durable changes, their order, and evidence that confirms each action. Decide whether compensation exists, such as sending a correction or creating follow-up work, and document where true reversal is impossible.
Separate preparation from commitment when possible. Validate inputs and permissions before the irreversible step, then make it a clear boundary with an idempotency key and a record of its result.
Recover deliberately after partial completion
If a later step fails, inspect run history to determine which actions already happened. Retry only safe steps; route non-repeatable outcomes to a reconciliation queue with context for deciding what happens next.
Make compensation visible and auditable, including who authorized it and what changed. Test failure points in a controlled environment so operators know whether the workflow resumes, compensates, or requires intervention.