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 11302 failed all ten named tests, and with them apierror's
TestWrite_SendsTheEnvelopeAndHidesAPlainErrorsText and api's
TestFlag_BadReason, which pin the same rules from the handler side.
This reverts commit 21adbc2283.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- backup Coverage: a listed table missing from the schema goes unreported
-> TestCoverage
- scrobble: exactly four minutes no longer qualifies -> TestQualifies
- listenbrainz submit: a 400 retried as transient
-> TestClient_RefusalsMapToWhatTheWorkerDoes
- playevents: either skip condition alone is a skip
-> TestRecordPlayEnded_AppliesTheSkipRule
- recsettings: tag scales up to 100 -> TestUpdateTaste_TagScales
- apierror From: a plain error answered 400 -> TestFrom
- auth RequireAdmin: no user in the context passes through
-> TestRequireAdmin
- providers: a 404 is transient
-> TestHTTPClient_GetJSON_AnswersNotFoundOrTransient
- quarantine: any reason accepted -> TestService_Refusals
- playsessions: exactly the window starts a new session
-> TestFindOrCreate_JoinsWithinTheWindowAndStartsAfterIt
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>