[object Object]

← back to Designer Wallcoverings

PR rescope: brand-leak detection (found 11 Kravet mis-vendored under PR)

f5ba693dab6b13a52a501527a50df3d27e8630af · 2026-07-06 14:13:38 -0700 · Steve

Files touched

Diff

commit f5ba693dab6b13a52a501527a50df3d27e8630af
Author: Steve <steve@designerwallcoverings.com>
Date:   Mon Jul 6 14:13:38 2026 -0700

    PR rescope: brand-leak detection (found 11 Kravet mis-vendored under PR)
---
 scripts/audit_pr_rescope.js | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/audit_pr_rescope.js b/scripts/audit_pr_rescope.js
index 506c1007..275b877b 100644
--- a/scripts/audit_pr_rescope.js
+++ b/scripts/audit_pr_rescope.js
@@ -32,14 +32,21 @@ const prefix = (sku) => (sku.match(/^[A-Za-z]+/) || ['?'])[0].toUpperCase();
   while (url) { const { products, next } = await getPage(url); all.push(...products); url = next; await sleep(120); }
   const sellable = all.filter(p => p.status === 'active' && !isSample(p));
 
-  const groups = {};
+  // Brand-leak = a real upstream vendor name customer-facing under the PR label (mis-scope / leak).
+  const LEAK = /\b(kravet|schumacher|thibaut|lee jofa|brunschwig|cole & son|g ?p ?& ?j baker|clarke|mulberry|groundworks|york|brewster|malibu|wallquest|chesapeake|seabrook|nextwall|architectural wallcoverings|designtex|koroseal|maya romanoff|phillip jeffries)\b/i;
+  const groups = {}; const leakTitles = [];
   for (const p of sellable) {
     const k = prefix(primarySku(p));
-    (groups[k] ||= { prefix: k, count: 0, titles: [], types: {} });
+    (groups[k] ||= { prefix: k, count: 0, titles: [], types: {}, leaks: 0 });
     const g = groups[k]; g.count++;
+    if (LEAK.test(p.title)) { g.leaks++; if (leakTitles.length < 40) leakTitles.push(`${primarySku(p)}  ${p.title}`); }
     if (g.titles.length < 3) g.titles.push(p.title.replace(/ \| Phillipe Romano$/, ''));
     const t = p.product_type || '(none)'; g.types[t] = (g.types[t] || 0) + 1;
   }
+  const totalLeaks = Object.values(groups).reduce((s, g) => s + g.leaks, 0);
+  console.log(`\n⚠ BRAND-LEAK titles (real vendor name under PR): ${totalLeaks} products`);
+  console.log(leakTitles.slice(0, 25).join('\n'));
+  console.log('---');
   const rows = Object.values(groups).sort((a, b) => b.count - a.count)
     .map(g => ({ ...g, top_type: Object.entries(g.types).sort((a, b) => b[1] - a[1])[0][0] }));
 

← 3d5ae387 Carl Robinson: enforce 8-yard increments on all 67 live SKUs  ·  back to Designer Wallcoverings  ·  Carl Robinson: add 'Wallcovering' type descriptor to titles 0d777f6f →