Without the option a 401 or 403 already fell to the default branch, which
answers ErrTransient without a retry, the same as the option's own branch.
The only difference was "(auth)" in the message. TheAudioDB and both
Last.fm providers set it; none read the message. The reason it gave, that
a bad key retries later instead of settling the row as "none", now sits on
the default branch, and the client's status table checks 401 and 403.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 11288 failed every named test it reached. The api TestMain's cost
check exited the test binary, and the integration lane runs each package's
binary once with no tests to warm the build, so it stopped the lane there
before coverart's database tests ran. The check is now a test of its own:
a weakened cost fails one test and the rest of the lane still runs.
This reverts commit e717e4370d.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- lastfm: no key answers transient, not not-found
-> TestLastfm_AnswersNotFoundWithoutAsking
- deezer: off by default -> TestProviders_IdentityAndDefaults
- artist enricher: "none" under older providers is not asked again
-> TestEnrichArtist_WhichArtistsAreAsked
- artist enricher: a fanart path recorded with no fanart
-> TestEnrichArtist_OnePictureOfTwo
- getUser: an admin asking about another gets themself
-> TestHandleGetUser
- decodePassword: enc: not decoded -> TestDecodePassword
- router: unknown /rest/ paths get the web app
-> TestRouter_TheWebAppAndTheAPIsKeepTheirOwnPaths
- genretag: commas no longer split -> TestSplit
- api: passwordCost default below bcrypt.DefaultCost -> api's TestMain
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Module path: github.com/Fabled-Sword/minstrel, in go.mod, every
import and the Dockerfile's version ldflags.
- buildinfo.ProjectURL, the contact outside services see in Minstrel's
User-Agent: https://github.com/Fabled-Sword/minstrel.
- README's compose example pulls ghcr.io/fabled-sword/minstrel:latest.
- docs/security.md sends problem reports to the GitHub issues.
- The demo-library stack builds Minstrel from the checkout, since :dev
is not published to GHCR.
- hygiene.go's same-site example uses example.com names.
The workbench CI (.gitea/, ci/, export-ignored) still builds and
publishes :dev to the private registry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cover-art Last.fm provider read every JSON error code as "no art",
so a burst of rate-limit (29) or service-unavailable (8, 11, 16)
answers marked albums and artists as having nothing on Last.fm. The tag
provider already retried those. providers.LastfmError is now the one
mapping, used by both.
Each family also paced Last.fm on its own at 4 requests a second, so
together they could reach 8 a second against the 5-per-key limit when
an admin uses one key for both. Both now wait on providers.LastfmPacer.
The client's own spacing is a providers.Interval, so a pace can be
shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
coverart/httpclient.go and tags/httpclient.go were the same client:
pacing, exponential backoff with jitter, 401/403-as-transient, body
caps. Tags had added a User-Agent and a shared Pacer, cover art an image
GET. providers.HTTPClient now has all of it, with the tests that were in
coverart. ErrTransient is shared too, so both families' errors.Is still
match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Last.fm as a hybrid MBID-or-name provider in the artist + album
chains. Default-disabled; activates when the operator pastes a free
API key into the admin Cover Art panel. Rate-limited to 4 req/s under
their 5/s per-key ceiling.
Prefers MBID lookup when present (artist.getInfo accepts &mbid=),
falls back to artist-name search. For albums, requires both
ArtistName and AlbumTitle; MBID is sent as an additional hint.
Includes placeholder-image detection: Last.fm returns a generic
"default star" image hash for many artists rather than 404'ing.
Provider parses the response URL's basename hash and treats known
placeholders as ErrNotFound so we never persist a placeholder thumb
as real art. Fail-open: when in doubt, return ErrNotFound rather than
risk persisting wrong art.
When API key is empty, every call returns ErrNotFound regardless of
the enabled flag — defensive so an operator who toggles enabled
without setting a key doesn't see confusing transient errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>