mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-15 02:36:12 -04:00
A start commits its session dir into the recorder state only once the recorder is live. For the whole window before that, shouldRecord is set but isRecording is not, so a scan sees a directory with a non-empty core.log and no sibling zip - an orphan - and the manager's auto-zip compresses the directory the recorder is writing into. When the start then fails, the rollback deletion races that zipper, and the archive left behind defeats the collision check in createSessionDir: the retry reuses the session ID of the attempt that just died. The scan and the recorder state it was taken against now travel as one value, so the reconciliation can tell a pending start apart from a settled one and defer new zips until the state is terminal. Running zips are untouched. A sibling '.zip' or '.zip.tmp' now counts as a name collision as well, since the session ID is derived from that name. Fixes review finding F1.