Resume a guarded mutation
Persist a conformant receipt and fail closed when the operation or plan changes.
Persist the receipt returned by the provider executor. Resume only when its operation identity and plan fingerprint still match the current plan.
const planned = createPlannedMutationReceipt(operation);
const validated = recordProviderValidation(planned, evidence);
const executed = recordMutationExecution(validated, executionEvidence);
The canonical stages are planned, provider-validated, and executed. Receipts are JSON-safe provider-operation evidence. They are not CLI run logs, Loop Run Records, approval records, or a persistence system.
If a write outcome is ambiguous, reconcile it with a stable provider lookup. When no stable lookup exists, preserve the receipt and stop for manual review. Do not replay the write or continue dependent steps. If the plan fingerprint changes, start a new operation or resolve the partial operation with a person.
Detailed source tutorial: guarded mutation receipt.