A running audiobook, Stories, dub or batch render resolves the voice's
reference path once and re-reads it per segment. Re-lock, unlock and
reference replacement now mark the superseded file under voices/.retired/
and a sweep (on lock and at startup) removes it once it is unreferenced
and older than 24 h.
Install staged audio with a restorable backup before committing its row,
restore on any failure, serialize lock/unlock/consent file swaps, name the
FileNotFoundError skip (CodeQL), and drop the real-timer race in the offline
delete test.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Same class as #2483: clear/delete/prune history and unlock unlinked audio
before the transaction committed; consent re-record deleted the previous
recording first; lock copied over the live locked take in place. Stage files
and swap/unlink after commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>