feat(provenance): ML stops surfacing the artist category

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-18 21:36:43 -04:00
parent e798302cfa
commit 592c665701
4 changed files with 34 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
import pytest
pytestmark = pytest.mark.integration
def test_artist_not_surfaced():
from backend.app.services.ml.tagger import SURFACED_CATEGORIES
assert "artist" not in SURFACED_CATEGORIES
def test_artist_not_centroid_eligible():
from backend.app.models import TagKind
from backend.app.services.ml.centroids import ELIGIBLE_KINDS
assert TagKind.artist not in ELIGIBLE_KINDS
def test_threshold_for_artist_is_unsurfaced():
from backend.app.services.ml.suggestions import SuggestionService
class _S:
suggestion_threshold_character = 0.5
suggestion_threshold_copyright = 0.5
suggestion_threshold_general = 0.5
svc = SuggestionService.__new__(SuggestionService)
# 'artist' must fall through to the 1.01 "never surfaces" default
assert svc._threshold_for(_S(), "artist") == 1.01