Automation · Automation Design
Checkpoints
Cheat sheet · https://pcornel.dk/topic.php?topic=5207
Answer
Checkpoints record progress at safe points in a long automation job, so a failure later does not mean starting over and the job can resume from the last completed step.
Remember
- Record progress at safe points.
- Steps after a checkpoint must be idempotent.
- Store checkpoints durably.
First checks
- Checkpoint records (step completed) — progress
- State persisted between steps — resumability
- Checkpoint cleanup — hygiene
Verify in this order
step done → checkpoint saved → continue
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Checkpoints operational decision reference
| Checkpoint field/boundary | Known-good | Broken or risky | Resume action |
|---|---|---|---|
| Workflow version | Exact compatible version | Unknown/incompatible version | Fail closed or migrate explicitly |
| Input fingerprint | Matches current desired input | Desired input changed | Re-plan before continuing |
| Target scope | Same stable identities | Targets added/removed/reused | Resolve scope again |
| Last committed effect | Target read-back confirms effect | Checkpoint and target disagree | Investigate crash/drift boundary |
| Ownership | One valid lease/worker | Multiple active owners | Stop duplicate resume |
| Next action | Explicit and idempotent/bounded | Ambiguous continuation | Require owner review |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5207