[object Object]

← back to Designer Wallcoverings

lily: upgrade fallback titles to real collection names (Will/Light/V-Wall/Materials from pricebook source_catalog) — 1,556 SKUs now 'Light LL6002 Grasscloth | Lilycolor'; headless-proven public search has 0 hits for these codes

c364cf3f797873621735bcffc13a25f602ba8af6 · 2026-07-02 08:32:17 -0700 · Steve

Files touched

Diff

commit c364cf3f797873621735bcffc13a25f602ba8af6
Author: Steve <steve@designerwallcoverings.com>
Date:   Thu Jul 2 08:32:17 2026 -0700

    lily: upgrade fallback titles to real collection names (Will/Light/V-Wall/Materials from pricebook source_catalog) — 1,556 SKUs now 'Light LL6002 Grasscloth | Lilycolor'; headless-proven public search has 0 hits for these codes
---
 .../sangetsu-lilycolor/scripts/title-fallback.py   | 30 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/onboarding/sangetsu-lilycolor/scripts/title-fallback.py b/onboarding/sangetsu-lilycolor/scripts/title-fallback.py
index 4c54f79c..b1ffe4a9 100644
--- a/onboarding/sangetsu-lilycolor/scripts/title-fallback.py
+++ b/onboarding/sangetsu-lilycolor/scripts/title-fallback.py
@@ -55,6 +55,21 @@ MORRIS_NAME_MAP = {
     "LIS42001": "Bird & Pomegranate",
 }
 
+# Real Lilycolor collection/book names carried on each source record as
+# `source_catalog` (from the pricebook PDFs). Confirmed 1:1 with the SKU
+# prefixes and proven to be the ONLY recoverable real name — the pricebook
+# article codes (LV/LW/LMT/LL*) return 0 results in Lilycolor's public web
+# search (verified 2026-07-02 via headless browser + the dga JS search API:
+# LW1002/LMT16001 -> 0 hits; control 壁紙 -> 38,302). So the collection name is
+# a genuine, better-than-bare-SKU pattern-level name. LIS keeps the Morris path.
+COLLECTION_DISPLAY = {
+    "WILL": "Will",
+    "LIGHT": "Light",
+    "V-wall": "V-Wall",
+    "MATERIALS": "Materials",
+    "ImportSelection": "Import Selection",
+}
+
 # Words to keep lowercase in Title Case (unless first word).
 _SMALL = {"a", "an", "the", "and", "but", "or", "for", "nor", "on", "at",
           "to", "by", "in", "of", "with", "as"}
@@ -181,10 +196,17 @@ def main():
                 settlement_required = True
                 n_settlement += 1
             else:
-                # Bulk (LV/LW/LMT/LL*/…): MFR SKU is the last-resort pattern name
-                # (CLAUDE.md fallback order #4). Never "Unknown".
-                pattern_en = sku
-                source = "mfr-sku-fallback"
+                # Bulk (LV/LW/LMT/LL*/…): use the real Lilycolor COLLECTION name
+                # (source_catalog) + the SKU for uniqueness, e.g. "Will LW1002".
+                # This beats the bare-SKU fallback (CLAUDE.md #4) with a genuine
+                # product-line name. Falls back to bare SKU only if catalog missing.
+                coll = COLLECTION_DISPLAY.get(rec.get("source_catalog") or "")
+                if coll:
+                    pattern_en = f"{coll} {sku}"
+                    source = "collection-sku"
+                else:
+                    pattern_en = sku
+                    source = "mfr-sku-fallback"
 
             pattern_en = title_case(pattern_en)
             title_en = assemble_title(pattern_en, descriptor_en)

← b3ca297d auto-save: 2026-07-02T08:16:24 (4 files) — DW-Programming/Im  ·  back to Designer Wallcoverings  ·  auto-save: 2026-07-02T08:46:35 (6 files) — DW-Programming/Im e4e9e5f4 →