[object Object]

← back to Designer Wallcoverings

cadence: tag new ACTIVE products 'New Arrival' inline so feed appears within the hour

f41456c019a89bb78978f7258284218606794051 · 2026-06-24 09:58:13 -0700 · Steve

Idempotent, gated on willActivate AND productType!=Trim to match smart
collection 167327760435. Shares the literal 'New Arrival' tag with
new-arrival-tag-sync.cjs (which stays the self-healing trim reconciler),
so no add/remove drift.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit f41456c019a89bb78978f7258284218606794051
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jun 24 09:58:13 2026 -0700

    cadence: tag new ACTIVE products 'New Arrival' inline so feed appears within the hour
    
    Idempotent, gated on willActivate AND productType!=Trim to match smart
    collection 167327760435. Shares the literal 'New Arrival' tag with
    new-arrival-tag-sync.cjs (which stays the self-healing trim reconciler),
    so no add/remove drift.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 shopify/scripts/cadence/cadence-import.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/shopify/scripts/cadence/cadence-import.js b/shopify/scripts/cadence/cadence-import.js
index 6e4045bb..f505b4a8 100644
--- a/shopify/scripts/cadence/cadence-import.js
+++ b/shopify/scripts/cadence/cadence-import.js
@@ -448,7 +448,15 @@ function buildInput(vendor, cfg, row, retail, activate) {
   const input = {
     title, handle, vendor, productType: cfg.productType,
     status: willActivate ? 'ACTIVE' : 'DRAFT',  // DRAFT unless --activate AND the full gate passes
-    tags: [vendor, cfg.productType, `Priced Per ${cfg.soldBy}`, 'Trending Wallcovering Collection 2026', 'display_variant', ...(row.collection?[`Collection: ${row.collection}`]:[]), ...(color?[color]:[]), ...gate.tags],
+    // 'New Arrival' drives the SMART collection id 167327760435 (rule: tag="New Arrival" AND
+    // type!=Trim, sort CREATED_DESC). Apply it INLINE here so a freshly-ACTIVE product appears in
+    // /collections/new-arrivals within the hour instead of waiting for the once-a-day reconciler
+    // (new-arrival-tag-sync.cjs) — which silently freezes the feed if its 05:15 run is missed (e.g.
+    // Mac asleep). ONLY ACTIVE-going-live products get it (matches the reconciler's status:active
+    // 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, cfg.productType, `Priced Per ${cfg.soldBy}`, 'Trending Wallcovering Collection 2026', 'display_variant', ...(row.collection?[`Collection: ${row.collection}`]:[]), ...(color?[color]:[]), ...(willActivate && cfg.productType !== 'Trim' ? ['New Arrival'] : []), ...gate.tags],
     descriptionHtml,
     metafields: mf,
     productOptions: [{ name:'Title', position:1, values:[{name:cfg.soldBy},{name:'Sample'}] }],

← 34951aa4 auto-save: 2026-06-24T09:56:09 (5 files) — shopify/scripts/c  ·  back to Designer Wallcoverings  ·  burst: option name must be 'Size' + Roll-first variant (DW t 5b044ca7 →