[object Object]

← back to Dw Yolo Loop

TK-11186: trending-tag-sync twin — guard showroom-only vendors out of Trending tag flow

20ab7b03f313266462a0c6c1b1c8ff124b988801 · 2026-09-03 11:55:24 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXf9gMQQWRfNex6EestZhp

Files touched

Diff

commit 20ab7b03f313266462a0c6c1b1c8ff124b988801
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Sep 3 11:55:24 2026 -0700

    TK-11186: trending-tag-sync twin — guard showroom-only vendors out of Trending tag flow
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01YXf9gMQQWRfNex6EestZhp
---
 scripts/trending-2026/trending-tag-sync.cjs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/scripts/trending-2026/trending-tag-sync.cjs b/scripts/trending-2026/trending-tag-sync.cjs
index b4a491c..1a7995a 100644
--- a/scripts/trending-2026/trending-tag-sync.cjs
+++ b/scripts/trending-2026/trending-tag-sync.cjs
@@ -17,6 +17,10 @@
  */
 const fs = require('fs');
 const path = require('path');
+// Canonical showroom-vendor primitive (list + logic live in fix-live-board/config).
+// Showroom-only vendors are addressable-not-discoverable: they must NEVER be added to
+// the Trending discoverability flow. Never hardcode a vendor — edit showroom-vendors.json. TK-11186.
+const { isShowroomVendor } = require(path.join(process.env.HOME, 'Projects/fix-live-board/config/showroom-vendor.cjs'));
 
 const TAG = 'Trending Wallcovering Collection 2026';
 const HOST = 'designer-laboratory-sandbox.myshopify.com';
@@ -120,11 +124,15 @@ async function runPool(ids, kind) {
   // everything currently carrying the tag (any status)
   const tagged = await fetchAll(`tag:${JSON.stringify(TAG)}`);
 
-  const target = new Set(newest.map(n => n.id));
+  // Showroom-only vendors never enter the target (never get the tag added), and are
+  // excluded from this reconciler's remove path — the dedicated, ledgered TK-11186
+  // build-remove-tags.mjs owns the one-time showroom cleanup (restore-map + 90s gaps).
+  const showroomTaggedIds = new Set(tagged.filter(n => isShowroomVendor(n.vendor)).map(n => n.id));
+  const target = new Set(newest.filter(n => !isShowroomVendor(n.vendor)).map(n => n.id));
   const have = new Set(tagged.map(n => n.id));
 
   const toAdd = [...target].filter(id => !have.has(id));
-  const toRemove = [...have].filter(id => !target.has(id));
+  const toRemove = [...have].filter(id => !target.has(id) && !showroomTaggedIds.has(id));
 
   const artmuraInSet = newest.filter(n => n.vendor === ARTMURA_VENDOR).length;
   const newestCutoff = newest.length ? newest[newest.length - 1].createdAt : 'n/a';

← ea0eaee Google feed twin: hard-exclude showroom-only vendors via isS  ·  back to Dw Yolo Loop  ·  Guard the vendor-microsite generator against showroom-only l 5b0f860 →