Files
tuliprox/backend/repository/src
DarkBreakpoint 525ed829e9 feat(dvr): key a recording file by the media it holds, not by who asked
Second step of the shared-recording model. A materialization is now
identified by what it contains rather than by the first request for it, so
two principals asking for the same media converge on one physical file with
two library entries and a reference count of two.

The identity rule stays in the DVR, which is the only place that knows what
makes two requests the same recording. It is supplied as a serialised,
field-named key rather than a Debug string, because it is persisted and has
to survive a build that reorders the enum. A task with no identity falls
back to a file keyed on its own uuid, so unidentified tasks cannot silently
collide on one file.

Detaching is now meaningful: dropping one entry leaves the file and the
other entry intact, and only the last detach removes the file. Six tests
cover convergence, per-principal views of one file, distinct media staying
distinct, partial detach and last detach.

Behaviour is unchanged. The service still rejects a cross-principal
duplicate before it reaches persistence, so no two entries share a file in
practice yet. Enabling that additionally requires the queue to stop
promoting one task at a time into a single `active` slot: two entries on one
file would otherwise each be promoted and each run a transfer to the same
path. That is the next step, and it is why this one stops at persistence.
2026-09-01 09:51:06 -05: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-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