- A closed recorder segment that no alarm wants is deleted as soon as a
later alarm cannot want it (pre-alarm time + 2 s), not kept 3 minutes.
Only the segment being recorded and, for a few seconds, the last closed
one are in <scratch>/stream_<node>.
- A segment around an alarm is moved (renamed) to <scratch>/<md5>.mp4 for
the kernel, which copies it into the report folder and deletes it; no
hard link to the recorder's file stays behind.
- Left-overs (crash, previous run): files in <scratch>/stream_* not
written for 30 s and not tracked are deleted at start-up and every minute.
- Stopping the recording (settings change, shutdown) deletes the remaining
segments and the empty stream folders.
- An alarm waits for its segments up to the segment length + 1 min (was a
fixed 3 min, too short for long segments).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16