Music videos carried no server identity, so JellyfinMusicVideoLibraryScanner had to reconcile by a (LibraryPathId, path) diff and HARD-delete the remainder. A file served by two libraries with overlapping local paths is a single row owned by whichever library scanned it first, so that owner's sweep destroyed a row another library still served — taking collection membership and playout references with it, irreversibly. This is #494's deferred "option 2": - New JellyfinMusicVideo : MusicVideo (ItemId/Etag), mirroring JellyfinMovie — TPT table, varchar(36), ItemId index. Dual-provider migration Add_JellyfinMusicVideo. - New IMediaServerMusicVideoRepository + JellyfinMusicVideoRepository: itemId-keyed existing-set/lookup and Flag{Normal,Unavailable,FileNotFound} seams, all scoped per library via LibraryPath.LibraryId. - New MediaServerMusicVideoLibraryScanner base; JellyfinMusicVideoLibraryScanner folds onto it and keeps the #177/#488/#497/#500 metadata-reconcile logic verbatim. - The sweep now soft-trashes (FileNotFound) instead of deleting, so removal is reversible and EmptyTrash-governed. DeleteEmptyArtists consequently no longer fires from a sweep. - Pre-identity rows are ADOPTED in place: the identity row is inserted against the same MediaItem id, scoped to the scanned library's own LibraryPath, so collection membership survives and a local/second-library row is never hijacked. - AddMusicVideo normalizes Path/PathHash to the path-REPLACED local path; the projection fills them from the server-reported path, which would break every later PathHash lookup. Docs: scan.musicvideo-reconciliation relocated to docs/decisions/archive/scan.md as superseded; new active record scan.musicvideo-server-identity. fixes #496
Archive — superseded / retired decision records
This directory holds decision records whose status is superseded or retired. They are kept
verbatim (rationale prose untouched — see docs/decisions.md header and scripts/decisions_lib.py)
for history: why we changed our mind is the point, never silently rewritten.
They are out of the active startup path: scripts/decisions_lib.py active_files() /
all_active_records() do not glob this directory, docs/decisions/README.md (the active catalog)
never lists a record from here, and an agent doing task-router discovery should not need to read
this directory to find the current rule — follow a record's superseded-by key to the active
successor instead.
The lifecycle validator (scripts/decisions_validate.py) still enforces invariants here:
- a
superseded/retiredrecord MUST live under this directory, never in an active file; - an
activerecord MUST NOT live under this directory; supersedes/superseded-bykeys must resolve reciprocally to a record in the active set OR here;- a record moved here must not have its rationale prose changed in the same commit (unless the
commit message carries the
[decisions-edit]token, reserved for genuine rationale edits).
One file per topic cluster (e.g. ci.md, release-ci-governance.md), mirroring the active
docs/decisions/*.md topic-file split. See docs/decisions/migration-map.md for the legacy
heading → key → status → location mapping produced during the #521 lifecycle migration.