← back to Dw Validator Debug TK11314
TK-11186: cadence importer withholds New Arrival + Trending tags/membership from showroom-only vendors
486f88aac0adaf9ab158d60429d42e20cd61ef13 · 2026-09-03 11:55:24 -0700 · Steve
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXf9gMQQWRfNex6EestZhp
Files touched
M shopify/scripts/cadence/cadence-import.js
Diff
commit 486f88aac0adaf9ab158d60429d42e20cd61ef13
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Sep 3 11:55:24 2026 -0700
TK-11186: cadence importer withholds New Arrival + Trending tags/membership from showroom-only vendors
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXf9gMQQWRfNex6EestZhp
---
shopify/scripts/cadence/cadence-import.js | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/shopify/scripts/cadence/cadence-import.js b/shopify/scripts/cadence/cadence-import.js
index 7debe3fe..5780d252 100644
--- a/shopify/scripts/cadence/cadence-import.js
+++ b/shopify/scripts/cadence/cadence-import.js
@@ -32,6 +32,10 @@ const VENDORS = require('./vendors.js');
const { validateBeforeActivate } = require('../lib/validate-before-activate.js'); // single activation gate (Steve 2026-06-20)
const runLog = require('../lib/scraper-run-log.js'); // TK-10374: per-run ground-truth for scraper liveness (writes scraper_run_log)
const { safeStampQuantity } = require('../lib/inventory-stamp-guard.mjs'); // TK-10965: never stock a $0/quote-only sellable variant
+// Canonical showroom-vendor primitive (list + logic live in fix-live-board/config). Showroom-only
+// vendors are addressable-not-discoverable: never add the New Arrivals / Trending discoverability
+// tags or auto-membership. 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'));
// ---- args ----
const args = process.argv.slice(2);
@@ -711,7 +715,9 @@ function buildInput(vendor, cfg, row, retail, activate) {
// target set), and only non-Trim types (matches the smart-collection rule). The reconciler stays
// the self-healing source of truth: it trims products that age out of newest-TOP_N, so this inline
// add never causes drift — both paths use the identical literal tag 'New Arrival'. (Steve 2026-06-24)
- tags: [vendor, productType, `Priced Per ${soldBy}`, 'Trending Wallcovering Collection 2026', 'display_variant', ...(row.collection?[`Collection: ${row.collection}`]:[]), ...(color?[color]:[]), ...(willActivate && productType !== 'Trim' ? ['New Arrival'] : []), ...gate.tags],
+ // Showroom-only vendors are addressable-not-discoverable: withhold BOTH discoverability tags
+ // ('Trending Wallcovering Collection 2026' + 'New Arrival') so they never enter those collections. TK-11186.
+ tags: [vendor, productType, `Priced Per ${soldBy}`, ...(isShowroomVendor(vendor) ? [] : ['Trending Wallcovering Collection 2026']), 'display_variant', ...(row.collection?[`Collection: ${row.collection}`]:[]), ...(color?[color]:[]), ...(willActivate && productType !== 'Trim' && !isShowroomVendor(vendor) ? ['New Arrival'] : []), ...gate.tags],
descriptionHtml,
metafields: mf,
productOptions: [{ name:'Title', position:1, values:[{name:variantLabel},{name:'Sample'}] }],
@@ -949,7 +955,8 @@ async function createProduct(table, row, payload) {
// sample-only variants are inventory-untracked ($4.25 sample, no stock) → do NOT feed them to
// the inventory=2026 setter (it only applies to tracked roll/sample variants of priced products).
const invSkus = activated && !payload.sampleOnly ? [row.dw_sku, `${row.dw_sku}-Sample`] : [];
- return { ok:true, pid, activated, published, skus: invSkus };
+ // showroom-only vendors are excluded from Trending auto-membership (addressable-not-discoverable). TK-11186.
+ return { ok:true, pid, activated, published, skus: invSkus, showroom: isShowroomVendor(payload.input?.vendor) };
}
// TK-10040 IMAGE-GATE (async-upload verification): the create-time gate validates
@@ -1103,7 +1110,7 @@ if (require.main === module) (async () => {
const res = await createProduct(r.cfg.table, row, payload);
if (res.held) { held++; /* HELD already logged inside createProduct; counted, never published */ }
else if (res.ok && res.action === 'linked-existing') { linked++; console.log(` ↪ ${row.dw_sku} already on Shopify (${res.status}) → backfilled link ${String(res.pid).replace(/.*\//,'')}, skipped create (dedup guard)`); }
- else if (res.ok) { created++; vendorCreated++; vChanged++; if (res.activated) activatedCount++; if (res.activated && res.skus) activatedSkus.push(...res.skus); if (res.activated && res.pid) activatedPids.push(res.pid); if (res.published && res.pid) publishedProductIds.push(res.pid); if(created%10===0) process.stdout.write(`\r created ${created}…`); }
+ else if (res.ok) { created++; vendorCreated++; vChanged++; if (res.activated) activatedCount++; if (res.activated && res.skus) activatedSkus.push(...res.skus); if (res.activated && res.pid) activatedPids.push(res.pid); if (res.published && res.pid && !res.showroom) publishedProductIds.push(res.pid); if(created%10===0) process.stdout.write(`\r created ${created}…`); }
else { failed++; console.log(` ✗ ${row.dw_sku} ${JSON.stringify(res.err).slice(0,140)}`); }
if (res.stop) { console.log(`\n⛔ DAILY_VARIANT_LIMIT reached — stopping (resets in ~24h). created ${created} this run.`); hitCap=true; break; }
// dailyCap per-create stop (PJ): once this vendor created its remaining daily allowance THIS
← 04d25ebe auto-data-snapshot: 2026-09-03T04:07:16 (1 data files) — .gi
·
back to Dw Validator Debug TK11314
·
git-bloat Layer 1: gitignore broad room-render/snapshot patt c6e825b1 →