Remove spurious prompt length rejection from advisor validation

The too-long check rejected valid advisor repairs when the repaired
prompt was longer than 3x the current prompt. Length is not a useful
safety signal — the legitimate guards are refusal text, intent distance,
and protected-category injection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
digital-garbage
2026-05-15 18:33:41 +03:00
co-authored by Claude Sonnet 4.6
parent 33d765bebc
commit a791f599ef
-2
View File
@@ -8974,8 +8974,6 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner):
return False, "refusal text"
if advised == current:
return True, "unchanged"
if len(advised) > max(180, len(current) * 3 + 320):
return False, "too long"
body_similarity = self._v2_prompt_body_similarity(advised, intent)
semantic_similarity = self._v2_text_semantic_similarity(clip, advised, intent, encode_cache=encode_cache) if clip is not None else 0.0
if body_similarity < 0.30 and semantic_similarity < 0.58: