Files
tuliprox/backend
DarkBreakpoint dcfbf82c49 fix(dvr): retention and startup recovery understand shared files
Sweep of the paths that still assumed one entry owns one file. Deletion
was fixed when the assumption broke; these two were not, and both are
silent.

Disk pressure credited itself the full file size whenever the delete
callback returned `Ok`. Since a shared-file deletion correctly unlinks
nothing, a pass could "reclaim" gigabytes that never left the disk,
satisfy its low-watermark check on those phantom bytes, stop early, and
report success with the disk still full -- `pressure_unrelieved` would
read false. `system_retention_delete` now reports whether the file was
actually unlinked and `DeleteOutcome::Detached` carries that: the entry
counts as deleted, its bytes do not count as reclaimed, and the pass
keeps looking for something that genuinely frees space.

Startup reconciliation inferred "file still present, so the unlink never
ran, so restore the recording". That inference was sound when a file had
one owner. Now a correct deletion deliberately leaves a shared file
alone, so a crash between the unlink step and the finalize step would
resurrect a recording the user had deleted -- and it would come back on
every boot until someone else's entry went away. `recovery_action_for`
takes `still_referenced` and finishes the deletion instead.

Both use the same holder rule as the deletion path, including excluding
entries that are themselves mid-deletion, so a crash between two
deletions cannot strand the file either.

Checked and deliberately left alone: playback resolves the attached
entry's own relative path and only reads, so sharing is invisible to it.
Retention's keep_last_per_channel counts two entries on one file as two
recordings; that is a policy question, not a correctness one, and
deleting either is now safe.
2026-09-01 10:59:34 -05:00
..
2026-08-28 19:17:39 +02:00
2026-08-27 15:36:23 +02:00
2026-08-27 15:36:23 +02:00
2026-08-27 15:36:23 +02:00
2026-08-27 15:36:23 +02:00
2026-08-27 15:36:23 +02:00
2026-08-27 15:36:23 +02:00
2026-08-27 15:36:23 +02:00
2026-08-28 19:17:39 +02:00
2026-08-27 15:36:23 +02:00
2026-08-29 11:14:44 +02:00