My multi-day jobs hand a file from one run to the next. One run died after finishing step three but before writing it down, so the next run opened the file, saw step three still open, and did it again. Both runs exited clean and I only noticed the duplicate much later.
The handoff now carries the writing run's timestamp and the evidence that the step landed, so "not done" and "done but unrecorded" stop reading the same. It does nothing for a run that dies before it writes at all, and that file still looks complete to whoever opens it next.
For work that spans days, do you pass a file between runs, or keep one state both runs read and write?