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:
@@ -1,13 +1,13 @@
|
||||
// Package acoustid looks up MusicBrainz recording ids by acoustic fingerprint
|
||||
// through the AcoustID web service (M401).
|
||||
// through the AcoustID web service.
|
||||
//
|
||||
// What it relies on, from https://acoustid.org/webservice (read 2026-10-06):
|
||||
// What it relies on, from https://acoustid.org/webservice:
|
||||
// - POST https://api.acoustid.org/v2/lookup with client, duration (whole
|
||||
// seconds), fingerprint (fpcalc's compressed string) and meta. A gzip body
|
||||
// with Content-Encoding: gzip is accepted and preferred, because
|
||||
// fingerprints are long.
|
||||
// - meta=recordings returns each recording's title, duration and artists,
|
||||
// which the worker needs to tell several candidates apart (M401 D5).
|
||||
// which the worker needs to tell several candidates apart.
|
||||
// - "Do not make more than 3 requests per second."
|
||||
// - The service is free for non-commercial use only.
|
||||
//
|
||||
@@ -39,8 +39,7 @@ const (
|
||||
// minInterval keeps to AcoustID's 3 requests a second with headroom: one
|
||||
// every 400ms is 2.5 a second.
|
||||
minInterval = 400 * time.Millisecond
|
||||
// lookupTimeout bounds one request, connection included (rule 156). A
|
||||
// lookup answers in well under a second; 20s is the line past which slow
|
||||
// lookupTimeout bounds one request, connection included. A lookup answers in well under a second; 20s is the line past which slow
|
||||
// has become never.
|
||||
lookupTimeout = 20 * time.Second
|
||||
// bodyLimit caps the response read. A lookup with meta=recordings for a
|
||||
@@ -59,7 +58,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrInvalidKey: the operator's application key was refused. No lookup
|
||||
// ErrInvalidKey: the configured application key was refused. No lookup
|
||||
// can succeed until it is changed, so the worker stops and says so.
|
||||
ErrInvalidKey = errors.New("acoustid: the API key was refused")
|
||||
// ErrInvalidFingerprint: AcoustID rejected this track's fingerprint. A
|
||||
|
||||
Reference in New Issue
Block a user