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:
@@ -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
|
||||
Reference in New Issue
Block a user