By: ValentinHirschi <valentin.hirschi@gmail.com>
p5l_library / p_key_batch: a failed durable output commit keeps the resume files (12d2) reduce-files writes its output through durable_write (write, fsync of the file, rename, fsync of the parent directory); the first failing step is reported with its path, the process exits 5 and commit_resume is not called, so the final state and trace stay. A failed directory fsync withdraws the renamed output, so a re-launch (which skips existing outputs) replays and commits again. p_key_batch fsyncs the output's directory before any commit. (Reviewer case: injected EIO on the directory fsync returned success and deleted both checkpoint files.) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>