Commit Graph
9 Commits
Author SHA1 Message Date
BinaryAlley 057f557791 Formats code comments as sentences in the tests.
Capitalizes the first word and adds the terminal period in the unit, integration and security tests. The AAA markers stay bare, the TODO bodies stay lowercase, and no assertion, payload, expected status code or test signature changes.
2026-11-16 18:17:29 +02:00
BinaryAlley c6469e70cf Maps OpenLibrary MARC publish_country to ReleaseCountry
Adds publish_country to the Open Library edition response, translates MARC 21 country codes into the ReleaseCountry enumeration through a private table, and drops the city based publish_places mapping.

Closes #222
2026-11-08 10:00:00 +02:00
BinaryAlley a514335a10 Aligns the test fixture field names with their types and tidies the remaining tests 2026-10-10 14:24:00 +03:00
BinaryAlley 3aadd6de84 Refactors the test fixtures and their consumers to compose other fixtures instead of instantiating models inline 2026-10-02 14:37:23 +03:00
BinaryAlley ea6eb9f796 Refactors the book, artist, and album slices across the stack 2026-09-17 13:30:48 -07:00
BinaryAlley 3a720af29f Adds domain Music aggregate 2026-09-07 09:41:57 -07:00
BinaryAlley 565fe68239 Adds independent metadata and artwork enrichment
Splits the single combined enrichment phase of the media library scan into
independent, modular jobs, so that the metadata and the artwork of a book
are enriched separately and only when their respective triggers fire.

- Adds the MediaContributorRoleCategory enum (Other first, then Author,
  Translator, Illustrator, Publisher and Narrator) and makes the role
  category canonical, so that roles describing the same kind of
  contribution are never treated as distinct.
- Realizes the media contributor bounded context: a MediaContributor is a
  person, unique by display name, without a role. The role moves to the
  per-work participation (BookContributors), so that a single contributor
  can play multiple roles. Contributors are created and linked by the
  metadata enrichment job, and exposed to subsequent jobs.
- Makes the Book aggregate pure: the enrichment tracking state (metadata
  status, providers, timestamps and covers) no longer lives on the domain
  aggregate, but stays in the Books table, managed directly by the jobs.
- Models artwork generically as a BookArtwork child table (type, ordinal,
  content hash, status and provider), so that each piece of artwork is
  tracked independently and a change of one does not require the others to
  be re-fetched.
- Splits the scan DAG into ResultsSave, ProviderConfigurationInvalidation,
  MetadataEnrichment and ArtworkEnrichment jobs. The invalidation job
  fingerprints the provider configuration of a library and resets the
  enrichment state of the affected channel when it changed. The artwork job
  resolves the missing artwork, hashing it to detect identical covers and
  skip re-copying. Content-changed books are reset by the results save job.
- Deletes the book and its stored artwork when the file disappears from the
  library.
- Adds the migration creating the new tables, backfilling the existing
  covers into the artwork table, and adding the configuration fingerprints.
- Localizes the new scan job stages, and fixes the invalidation job wiping
  the library content locations by persisting the fingerprints through the
  change tracker instead of the repository update action.
2026-08-27 14:41:49 +03:00
BinaryAlley 04927a95af Refactors metadata provider contracts to typed interfaces 2026-08-24 14:17:29 -07:00
BinaryAlley 1189bbaf36 Hardens test assertions and adds missing test coverage. 2026-08-18 08:28:16 -07:00