fix(navigation): purge localized string checks for audio/trending buttons and prevent repetitive carousel swiping loops

This commit is contained in:
2026-05-05 12:10:58 +02:00
parent ac272eadce
commit d57857d444
2 changed files with 18 additions and 2 deletions

View File

@@ -40,6 +40,9 @@ class CarouselBrowsingPlugin(BehaviorPlugin):
if not has_carousel_in_view(xml):
return False
if ctx.shared_state.get("carousel_browsed"):
return False
config = self.get_config(ctx)
percentage = float(config.get("percentage", getattr(ctx.configs.args, "carousel_percentage", 0)))
return random.random() < (percentage / 100.0)
@@ -92,6 +95,8 @@ class CarouselBrowsingPlugin(BehaviorPlugin):
logger.info(f"📸 [Carousel] End of carousel detected on slide {i+1} (UI stable). Stopping swipe.")
break
ctx.shared_state["carousel_browsed"] = True
return BehaviorResult(
executed=True, interactions=count, metadata={"slides_viewed": count, "curiosity_slide": curiosity_slide}
)

View File

@@ -249,9 +249,20 @@ class TelepathicEngine:
if "type" not in intent and "reply" not in intent and "message" not in intent and "search" not in intent:
return False
# 0.5 LIKE BUTTON GUARD: Never pick "Trending" or "Use audio" when trying to like
# 0.5 LIKE BUTTON GUARD: Never pick structural traps (audio/trending/share) when trying to like. ZERO-TRUST: NO LOCALIZED STRINGS.
if "like" in intent:
if "trending" in semantic or "use audio" in semantic or "options" in semantic or "share" in semantic or "save audio" in semantic or "audio" in semantic or "add" in semantic:
res_id = (node.resource_id or "").lower()
if any(forbidden in res_id for forbidden in [
"album_art",
"use_in_camera",
"share",
"options",
"menu",
"trending",
"audio",
"add",
"save"
]):
return False
# 1. Post Username Guard