Skip to content

Comments

fix: make MBID enrichment best-effort (don\u0027t drop recs)#381

Merged
RicherTunes merged 1 commit intomainfrom
fix/mbid-enrichment-best-effort
Jan 18, 2026
Merged

fix: make MBID enrichment best-effort (don\u0027t drop recs)#381
RicherTunes merged 1 commit intomainfrom
fix/mbid-enrichment-best-effort

Conversation

@RicherTunes
Copy link
Owner

$## Why\nRequireMbids=false should not silently drop recommendations when MusicBrainz lookups fail. This was causing top-up underfill (expected 2, got 1) in BrainarrOrchestratorTopUpTests.\n\n## What\n- Preserve the original Recommendation when album/artist MBID resolution fails (best-effort); downstream safety gates still enforce MBIDs when configured.\n- Add regression tests for both resolvers.\n\n## Tests\n- dotnet test Brainarr.Tests/Brainarr.Tests.csproj -c Release -m:1 --no-build (2037 passed, 29 skipped).\n- Focused filter for TopUp + resolver tests (4 passed).\n

Best-effort enrichment must not drop candidates unless RequireMbids is enabled. Adds regression tests and fixes the top-up underfill case.
@RicherTunes RicherTunes merged commit 4daf836 into main Jan 18, 2026
21 of 22 checks passed
RicherTunes added a commit that referenced this pull request Feb 17, 2026
Picks up PR #380 (TriageReasonCodes, ConfidenceBand enum) and
PR #381 (Phase 12-17 evidence blocks in canonical roadmap).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RicherTunes added a commit that referenced this pull request Feb 17, 2026
* chore: bump Common submodule to include triage contracts

Picks up PR #380 (TriageReasonCodes, ConfidenceBand enum) and
PR #381 (Phase 12-17 evidence blocks in canonical roadmap).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor(triage): import Common's TriageReasonCodes and ConfidenceBand

Replace local ReasonCodes inner class with Common's canonical
TriageReasonCodes constants. Use Common's ConfidenceBand enum for
classification (output remains lowercase string for API compat).

Zero behavior change: all 25 triage/calibration/golden fixture tests
pass with identical outputs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(triage): add EnableProviderCalibration feature flag

Add FieldDefinition(43) EnableProviderCalibration setting (default=true)
that controls whether per-provider confidence calibration is applied to
triage scores. When disabled, the orchestrator passes null for the
provider parameter, resulting in raw uncalibrated scores.

Add CalibrationDisabled_ReturnsRawScores test verifying the flag behavior:
- provider=null yields no CALIBRATION_APPLIED reason code
- provider=Ollama yields CALIBRATION_APPLIED + LOW_CALIBRATION_PROVIDER

2415/2415 tests pass (1 known flaky rate limiter test excluded).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant