[object Object]

← back to Designer Wallcoverings

gate-readiness.py: check error-tokens only in pattern-name segment (was false-matching '404' in SKU ranges LL6404/LV2404)

d76076d11f269064c711ff643a448087fd18a41e · 2026-07-01 14:47:00 -0700 · Steve

Files touched

Diff

commit d76076d11f269064c711ff643a448087fd18a41e
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jul 1 14:47:00 2026 -0700

    gate-readiness.py: check error-tokens only in pattern-name segment (was false-matching '404' in SKU ranges LL6404/LV2404)
---
 onboarding/sangetsu-lilycolor/scripts/gate-readiness.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/onboarding/sangetsu-lilycolor/scripts/gate-readiness.py b/onboarding/sangetsu-lilycolor/scripts/gate-readiness.py
index 550c5281..1e1d7c41 100644
--- a/onboarding/sangetsu-lilycolor/scripts/gate-readiness.py
+++ b/onboarding/sangetsu-lilycolor/scripts/gate-readiness.py
@@ -26,6 +26,7 @@ Usage: gate-readiness.py [merged_jsonl]
 """
 import json
 import os
+import re
 import sys
 
 HERE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -51,12 +52,16 @@ def has_title(d):
 
 
 def title_guard_ok(d):
-    t = title_text(d).lower()
+    t = title_text(d)
     if not t:
         return False
-    if BANNED in t:
+    if BANNED in t.lower():          # "wallpaper" is banned ANYWHERE in the title
         return False
-    return not any(tok in t for tok in BAD_TITLE_TOKENS)
+    # Error tokens (unknown/404/not found/…) are only meaningful in the PATTERN-NAME
+    # segment (before the first pipe). Checking the whole title false-matched "404"
+    # inside SKU ranges like LL6404 / LV2404.
+    pattern_seg = re.split(r"[||]", t)[0].strip().lower()
+    return not any(tok in pattern_seg for tok in BAD_TITLE_TOKENS)
 
 
 def has_description(d):

← fedfa292 gate-readiness.py: read-only Activation-Gate pre-flight over  ·  back to Designer Wallcoverings  ·  recover: single supervised local-cache Lily enrichment (Henr 8beec0f6 →