docs: server comments say what the code does, not how it came to be (#6277)
Comment blocks in cmd/minstrel and 30 smaller internal packages, rewritten
to rule 32's standard with each citation read in context: task, milestone
and rule ids go, and so do the stories they were attached to ("used to",
"Before #N", measurements from one install, quotes, pointers to Fabled
Librarian's records and to docs/superpowers files that are not in the
repo). Where a story wrapped a real constraint, the constraint stays as a
present-tense fact.
Comments that had gone stale are corrected:
- taste.Config: the tuned values are overlaid by internal/recsettings;
it is no longer "a later follow-up".
- StorageConfig: the data dir holds art, caches and the stream secret,
not only playlist covers.
- the Subsonic album list and getUser comments describe what they do
today rather than a milestone that would change it.
Checked: the non-comment token stream of every changed file matches
HEAD, and gofmt -l is empty.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
//
|
||||
// For recordings it keeps LB's whole answer in listenbrainz_similar_recordings
|
||||
// and derives the track_similarity edges from it in SQL, against whatever is
|
||||
// in the library at the time (#5296). Matching once at fetch time missed every
|
||||
// recording that reached the library afterwards, through an import or an MBID
|
||||
// the AcoustID lookup filled in. For artists it stores the in-library matches in
|
||||
// artist_similarity and the rest in artist_similarity_unmatched, as before.
|
||||
// in the library at the time, so a recording that reaches the library later
|
||||
// (an import, or an MBID the AcoustID lookup fills in) gains its edges without
|
||||
// asking LB again. For artists it stores the in-library matches in
|
||||
// artist_similarity and the rest in artist_similarity_unmatched.
|
||||
//
|
||||
// Every answer is recorded as a fetch, an empty one included, and the queue
|
||||
// reads those records: freshness used to be read from the edges, so a seed
|
||||
// that matched nothing was never fresh and held the head of the queue.
|
||||
// reads those records rather than the edges: a seed that matched nothing is
|
||||
// still fresh and does not hold the head of the queue.
|
||||
package similarity
|
||||
|
||||
import (
|
||||
@@ -200,8 +200,8 @@ func (w *Worker) upsertArtistSimilar(ctx context.Context, q *dbq.Queries, artist
|
||||
}
|
||||
sort.Slice(results, func(i, j int) bool { return results[i].Score > results[j].Score })
|
||||
// Scores are stored relative to the seed's closest artist, as track edges
|
||||
// are (#6177): LB's raw scores are counts (16 to 10,875 on the operator's
|
||||
// library), and both the candidate pool and the suggestions read 0 to 1.
|
||||
// are: LB's raw scores are unbounded counts, and both the candidate pool
|
||||
// and the suggestions read 0 to 1.
|
||||
best := results[0].Score
|
||||
|
||||
mbids := make([]string, 0, len(results))
|
||||
|
||||
Reference in New Issue
Block a user