Files
music_library/backlog/archive/tasks/ml-18 - Three-representations-of-artists-without-clear-canonical-source.md
T
2026-04-20 10:02:25 +01:00

1.6 KiB

id, title, status, assignee, created_date, labels, dependencies, references, priority
id title status assignee created_date labels dependencies references priority
ML-18 Three representations of artists without clear canonical source To Do
2026-04-20 08:50
https://github.com/cloud8421/music_library/issues/161
low

Description

GitHub: created 2026-04-05 · updated 2026-04-09 · closed 2026-04-08 · not planned

Summary

Artist data exists in three different forms with no clear canonical source:

  1. Record embeds :artists (embedded schema in record)
  2. ArtistRecord — separate lookup table/view
  3. ArtistInfo — external metadata store

Why This Matters

  • Unclear which representation is authoritative for a given use case
  • Updates to one representation don't automatically propagate to others
  • New developers must understand all three to work with artist data

Affected Files

  • lib/music_library/records/record.ex (embedded :artists)
  • lib/music_library/records/artist_records.ex
  • lib/music_library/artists/artist_info.ex

Suggested Fix

Document the purpose and canonical use case for each representation. Consider whether ArtistRecord (DB view) can be simplified or whether the embedded artists on Record should be the single source for record-artist relationships.

Acceptance Criteria

  • Clear documentation of each representation's purpose
  • Reduced confusion about which to use in new features
  • #1 Clear documentation of each representation's purpose
  • #2 Reduced confusion about which to use in new features