Files
minstrel/internal/coverart
bvandeusen 126d4e53aa feat(server/coverart): batch summary log with category breakdown
The existing processed/succeeded/failed tally written to scan_runs
collapses too much to debug "0 successes" symptoms — failed includes
"settled to none (correct)" alongside "left NULL (transient/IO error,
will retry)" alongside "skipped (no MBID)". An operator looking at
{"failed": 144, "succeeded": 0} can't tell whether the enricher is
broken, the upstream is broken, the data is missing MBIDs, or the
artists genuinely aren't in TheAudioDB.

Adds a single end-of-batch Info log per stage with the breakdown:
  - eligible:    rows returned by the SQL filter
  - processed:   rows the loop actually touched
  - succeeded:   art attached (provider success)
  - settled_none: tried, no provider had art (legit miss)
  - no_mbid:     skipped inside the enricher because MBID was NULL
                 (artist stage only)
  - left_null:   tried, transient/IO failure, will retry next pass
  - errored:     internal error during the entry (logged separately)

The JSON written to scan_runs keeps its existing shape so the admin
UI's stage badges aren't disturbed.
2026-05-06 23:30:21 -04:00
..