fix(enrichment): preserve recs on MusicBrainz HTTP failure#474
Merged
RicherTunes merged 1 commit intomainfrom Feb 13, 2026
Merged
fix(enrichment): preserve recs on MusicBrainz HTTP failure#474RicherTunes merged 1 commit intomainfrom
RicherTunes merged 1 commit intomainfrom
Conversation
MusicBrainzResolver.EnrichWithMbidsAsync silently dropped recommendations when ResolveMbidAsync threw (HTTP failure to MusicBrainz API) — the catch block logged the error but did not add the original item to the result list. This caused the TopUp test to be non-deterministic: when MusicBrainz was unreachable, "Lana Del Rey" disappeared from the pipeline, leaving only 1 result instead of the expected 2. Production fix: add result.Add(rec) in the catch block (matching the existing correct behavior in ArtistMbidResolver). Test fix: inject pass-through mock IMusicBrainzResolver and IArtistMbidResolver so the test never makes external HTTP calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RicherTunes
added a commit
that referenced
this pull request
Feb 13, 2026
All 3 known flaky tests have been resolved:
- E2EHermeticGateTests: [Collection("LoggingTests")] added
- LoggerWarnOnceTests: ClearWarnOnceKeysForTests() in constructor
- TopUpTests: MusicBrainzResolver catch block + mock resolvers (#474)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MusicBrainzResolver.EnrichWithMbidsAsynccatch block silently dropped recommendations whenResolveMbidAsyncthrew (HTTP failure to MusicBrainz API). The original item was not added to the result list, causing silent data loss in the recommendation pipeline.BrainarrOrchestratorTopUpTestscreated real resolvers that hit the MusicBrainz API, making results non-deterministic. Now injects pass-through mockIMusicBrainzResolverandIArtistMbidResolver.Test plan
🤖 Generated with Claude Code