fix(backend): keep fig-/feat- tags by slug, not just name
The live store marks the figure/feature tag families on the tag SLUG
(slug 'fig-chat', display name 'Chatoyant'), but _scoped_tags filtered on
name.startswith('fig-'), so all 11 fig-* tags were silently dropped at sync
and the figure-tag echo (METADATA-30) had nothing to draw from. Match the
prefix on slug OR name. Adds a test for the slug-prefixed bare-name shape.
This commit is contained in:
+8
-1
@@ -19,7 +19,14 @@ def _now_iso() -> str:
|
||||
|
||||
|
||||
def _scoped_tags(tags: list[dict]) -> list[dict]:
|
||||
return [t for t in tags if t.get("name", "").startswith(("fig-", "feat-"))]
|
||||
# The fig-/feat- family marker is on the tag SLUG (e.g. slug 'fig-chat',
|
||||
# name 'Chatoyant'), not the display name. Match either so a store that
|
||||
# prefixes the name instead of the slug is also kept.
|
||||
return [
|
||||
t for t in tags
|
||||
if (t.get("slug", "").startswith(("fig-", "feat-"))
|
||||
or t.get("name", "").startswith(("fig-", "feat-")))
|
||||
]
|
||||
|
||||
|
||||
def _normalize_category(c: dict) -> tuple:
|
||||
|
||||
Reference in New Issue
Block a user