fix(tag-prefix): drop artist/meta/rating from KNOWN_KINDS — artist tags retired in FC-2d-vii-c (provenance is its own axis), meta/rating retired by operator 2026-05-26. User-typeable prefixes now just character/fandom/series. Frontend placeholder + icon map + client-side mirror updated; new test confirms retired prefixes parse as literal text.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,11 +4,12 @@ from backend.app.utils.tag_prefix import KNOWN_KINDS, parse_kind_prefix
|
||||
|
||||
|
||||
def test_recognized_kinds_match_user_input_set():
|
||||
# System-managed kinds (archive, post) and the default (general)
|
||||
# are intentionally excluded — the user can't type those at the
|
||||
# input boundary.
|
||||
# Excluded: archive + post (system-managed), general (default for
|
||||
# un-prefixed input), artist (retired in FC-2d-vii-c — first-class
|
||||
# entities now), meta + rating (retired as user-typeable per
|
||||
# operator 2026-05-26).
|
||||
assert KNOWN_KINDS == frozenset({
|
||||
"artist", "character", "fandom", "series", "meta", "rating",
|
||||
"character", "fandom", "series",
|
||||
})
|
||||
|
||||
|
||||
@@ -30,8 +31,17 @@ def test_unknown_prefix_kept_as_literal():
|
||||
assert parse_kind_prefix("http://example.com") == (None, "http://example.com")
|
||||
|
||||
|
||||
def test_retired_prefixes_kept_as_literal():
|
||||
# `artist:`, `meta:`, `rating:` are no longer recognized — they
|
||||
# parse as literal text so the operator's input is preserved (and
|
||||
# serves as a nudge to use the appropriate dedicated UI instead).
|
||||
assert parse_kind_prefix("artist:Eric") == (None, "artist:Eric")
|
||||
assert parse_kind_prefix("meta:wide") == (None, "meta:wide")
|
||||
assert parse_kind_prefix("rating:safe") == (None, "rating:safe")
|
||||
|
||||
|
||||
def test_whitespace_stripped():
|
||||
assert parse_kind_prefix("artist: Eric ") == ("artist", "Eric")
|
||||
assert parse_kind_prefix("series: Bleach ") == ("series", "Bleach")
|
||||
assert parse_kind_prefix(" sunset ") == (None, "sunset")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user