[object Object]

← back to All Designerwallcoverings

banned front-facing vendor scrub on the public snapshot (Brewster/York/WallQuest/NewWall/... per build-data.py hard rule)

c8c8cd7ee3ef233085825d0010774a600a11df34 · 2026-07-02 16:12:31 -0700 · Steve Abrams

Files touched

Diff

commit c8c8cd7ee3ef233085825d0010774a600a11df34
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Jul 2 16:12:31 2026 -0700

    banned front-facing vendor scrub on the public snapshot (Brewster/York/WallQuest/NewWall/... per build-data.py hard rule)
---
 server.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/server.js b/server.js
index 7ac86e0..529e30e 100644
--- a/server.js
+++ b/server.js
@@ -45,6 +45,11 @@ const priceBand = (p) => { if (!p || p <= 0) return null; const b = PRICE_BANDS.
 
 const titleCase = (s) => s.replace(/\w\S*/g, (t) => t[0].toUpperCase() + t.slice(1));
 
+// HARD front-facing rule (same list build-data.py enforced for the vendor directory):
+// banned upstream/private-label source names never ship on this public surface — rows
+// whose vendor OR title leaks one are excluded (their products surface under the label).
+const BANNED = /brewster|york|wallquest|wall\s*quest|newwall|new\s*wall\b|command\s*54|justin\s*david|nicolette\s*mayer|seabrook|chesapeake|nextwall|desima|carlsten/i;
+
 // ── snapshot load ────────────────────────────────────────────────────────────────
 // Public-safe columns ONLY — cost_price / net_price / cost never selected.
 const SNAP_SQL = `
@@ -98,7 +103,9 @@ async function loadSnapshot() {
   if (!pool) pool = new Pool({ connectionString: DSN, max: 2 });
   const t0 = Date.now();
   const res = await pool.query(SNAP_SQL);
-  ROWS = res.rows.map(deriveRow);
+  ROWS = res.rows
+    .filter((r) => !BANNED.test(r.vendor || '') && !BANNED.test(r.title || ''))
+    .map(deriveRow);
   LOADED_AT = new Date().toISOString();
   console.log(`snapshot: ${ROWS.length.toLocaleString()} products in ${Date.now() - t0}ms`);
 }

← 0ff51f2 full-catalog browser: in-memory dw_unified snapshot (153k pr  ·  back to All Designerwallcoverings  ·  portable snapshot SQL: probe optional mirror-only columns (m 86857a5 →