docs: query comments say what each query selects and why, not how it came to be (#6277)
Rewrites the internal/db/queries comments to rule 32 and regenerates dbq, whose doc comments and embedded SQL carry them. The bugs behind the tiered mixes, the md5 order seed, the score bands and the round-robin arms are restated as the constraint each one enforces; counts from one library and stale cross-references are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@ UPDATE albums
|
||||
WHERE id = $1 AND cover_art_source = 'none'
|
||||
`
|
||||
|
||||
// M7 #380: when MBID backfill heals an album, clear its 'none' cover_art_source
|
||||
// When MBID backfill heals an album, clear its 'none' cover_art_source
|
||||
// back to NULL so the enricher's next batch retries the MBCAA fetch.
|
||||
// Idempotent — only updates rows currently stamped 'none'.
|
||||
func (q *Queries) ClearAlbumCoverNone(ctx context.Context, id pgtype.UUID) error {
|
||||
@@ -128,8 +128,8 @@ type ListAlbumsMissingCoverParams struct {
|
||||
Limit int32
|
||||
}
|
||||
|
||||
// M7 #353: album cover enrichment queries.
|
||||
// M7 cover-sources: returns rows the enricher should attempt. Eligible:
|
||||
// Album cover enrichment queries.
|
||||
// Returns rows the enricher should attempt. Eligible:
|
||||
// cover_art_source IS NULL (never tried), OR cover_art_source = 'none'
|
||||
// AND cover_art_sources_version != current (settled under an older
|
||||
// source set; recheck against the current chain). LIMIT supplied by
|
||||
|
||||
Reference in New Issue
Block a user