← back to Designer Wallcoverings
TK-00134: patch last 3 blanket cleanWallpaper() copies to brand-aware
8661e2fa4ae1953a4f55fa9b60d474c60b9ea136 · 2026-07-27 18:39:36 -0700 · Steve Abrams
The banned-word 'Wallpaper'->'Wallcovering' helper was duplicated across ~13
import scripts; 10 were already brand-aware (TK-00134) but 3 still ran the blanket
regex that corrupts the 17 brand names ending in 'Wallpaper' (Ralph Lauren, Missoni,
Grasscloth, etc). Patched dwvs-import-catalog-only, wolf-gordon-shopify-push, and
anna-french-scraper (preserving its Thibaut-scrub) to the proven brand-aware +
derived-word-safe (wallpapered/-ing) version. Verified 4/4 functional each. Stops
the class at every executable onboard path. CLAUDE.md's documented snippet still
shows the blanket version — flagged for Steve, not auto-edited.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M shopify/scripts/anna-french-scraper.jsM shopify/scripts/dwvs-import-catalog-only.jsM shopify/scripts/wolf-gordon-shopify-push.js
Diff
commit 8661e2fa4ae1953a4f55fa9b60d474c60b9ea136
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 27 18:39:36 2026 -0700
TK-00134: patch last 3 blanket cleanWallpaper() copies to brand-aware
The banned-word 'Wallpaper'->'Wallcovering' helper was duplicated across ~13
import scripts; 10 were already brand-aware (TK-00134) but 3 still ran the blanket
regex that corrupts the 17 brand names ending in 'Wallpaper' (Ralph Lauren, Missoni,
Grasscloth, etc). Patched dwvs-import-catalog-only, wolf-gordon-shopify-push, and
anna-french-scraper (preserving its Thibaut-scrub) to the proven brand-aware +
derived-word-safe (wallpapered/-ing) version. Verified 4/4 functional each. Stops
the class at every executable onboard path. CLAUDE.md's documented snippet still
shows the blanket version — flagged for Steve, not auto-edited.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
shopify/scripts/anna-french-scraper.js | 14 +++++++++++++-
shopify/scripts/dwvs-import-catalog-only.js | Bin 9174 -> 10132 bytes
shopify/scripts/wolf-gordon-shopify-push.js | Bin 21957 -> 22923 bytes
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/shopify/scripts/anna-french-scraper.js b/shopify/scripts/anna-french-scraper.js
index 1c8a95a3..ab11554c 100644
--- a/shopify/scripts/anna-french-scraper.js
+++ b/shopify/scripts/anna-french-scraper.js
@@ -80,7 +80,19 @@ function sleep(ms) { return new Promise(r => setTimeout(r, ms)); }
// ---------- helpers ----------
function cleanWallpaper(s) {
if (!s) return s;
- let out = String(s).replace(/\bWalls Wallpaper\b/gi, 'Wallcoverings').replace(/\bWallpapers\b/gi, 'Wallcoverings').replace(/\bWallpaper\b/gi, 'Wallcovering');
+ // Brand-aware + derived-word-safe (TK-00134): preserve the 17 brands ending in
+ // "Wallpaper", skip wallpapered/wallpapering, case-preserving generic swap.
+ const WALLPAPER_BRANDS = ['Apartment','Boråstapeter','China Seas','DW Exclusive','Edge','Fentucci','Grasscloth','Laura Ashley','Malibu','MC Escher','Missoni','Nicolette Mayer','PS Removable','Ralph Lauren','Roberto Cavalli','Scalamandre','Schumacher'];
+ const _brandRe = new RegExp('(' + WALLPAPER_BRANDS.map(function(b){return b.replace(/[.*+?^${}()|[\]\\]/g,'\\$&');}).join('|') + ')\\s+Wallpaper','gi');
+ const _hold = []; const _S = ' ';
+ let out = String(s).replace(_brandRe, function(m){ _hold.push(m); return _S + (_hold.length-1) + _S; });
+ out = out.replace(/\bWallpaper(s?)\b(?!ed|ing)/gi, function(m, plural){
+ const base = plural ? 'wallcoverings' : 'wallcovering';
+ if (m === m.toUpperCase()) return base.toUpperCase();
+ if (m[0] === m[0].toUpperCase()) return base[0].toUpperCase() + base.slice(1);
+ return base;
+ });
+ _hold.forEach(function(h,i){ out = out.split(_S + i + _S).join(h); });
// SCRUB parent-vendor leak: Anna French is the front-facing brand, NOT Thibaut.
// The Thibaut meta-description ("Browse the Thibaut … assortment today") + any
// upstream "York" reference must NEVER surface customer-facing. Remove the boilerplate
diff --git a/shopify/scripts/dwvs-import-catalog-only.js b/shopify/scripts/dwvs-import-catalog-only.js
index 2b76b50e..dbc70116 100644
Binary files a/shopify/scripts/dwvs-import-catalog-only.js and b/shopify/scripts/dwvs-import-catalog-only.js differ
diff --git a/shopify/scripts/wolf-gordon-shopify-push.js b/shopify/scripts/wolf-gordon-shopify-push.js
index 5e6d1bbd..c346fdc7 100644
Binary files a/shopify/scripts/wolf-gordon-shopify-push.js and b/shopify/scripts/wolf-gordon-shopify-push.js differ
← 930575df auto-save: 2026-07-27T18:22:43 (15 files) — shopify/scripts/
·
back to Designer Wallcoverings
·
TK-00134: fix documented cleanWallpaper snippet in CLAUDE.md 7ff04f87 →