[object Object]

← back to Dw Yolo Loop

Trending 2026: hard cap, raise to newest 1000 SKUs (no Artmura union); expanded 500->1000

5cb00ac4bad20574bd18c1cf0f2cae7692b6c69a · 2026-06-15 10:52:26 -0700 · Steve Abrams

Files touched

Diff

commit 5cb00ac4bad20574bd18c1cf0f2cae7692b6c69a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jun 15 10:52:26 2026 -0700

    Trending 2026: hard cap, raise to newest 1000 SKUs (no Artmura union); expanded 500->1000
---
 scripts/trending-2026/README.md             | 12 +++++-------
 scripts/trending-2026/trending-tag-sync.cjs | 14 +++++++-------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/scripts/trending-2026/README.md b/scripts/trending-2026/README.md
index 8c403b3..d86dd18 100644
--- a/scripts/trending-2026/README.md
+++ b/scripts/trending-2026/README.md
@@ -4,13 +4,11 @@ Keeps the Shopify tag **`Trending Wallcovering Collection 2026`** on exactly the
 products, every day.
 
 ## Rule
-Target set (who carries the tag) =
-- the **newest 500 active products** by created date, **∪**
-- **all active Artmura products** (pinned in, so they never fall out)
+Target set (who carries the tag) = the **newest 1000 active products** by created
+date — a **hard cap of 1000**, no exceptions.
 
-Today all 161 Artmura sit inside the newest 500, so the target is exactly 500.
-As newer products arrive and Artmura ages past rank 500, Artmura stays pinned and
-the set grows slightly above 500 — by design ("make sure Artmura has it").
+Artmura is included only when its products naturally fall inside that newest 1000.
+Today all 161 Artmura sit well within the newest 1000, so they're all tagged.
 
 ## What each run does
 Re-derives the target via GraphQL search (no full-catalog scan), then:
@@ -25,7 +23,7 @@ post-run count may lag for a minute before settling.
 ```sh
 node trending-tag-sync.cjs --dry-run      # preview +add / -remove counts
 node trending-tag-sync.cjs                # apply
-node trending-tag-sync.cjs --top 500 --conc 6
+node trending-tag-sync.cjs --top 1000 --conc 6
 ```
 
 ## Cron
diff --git a/scripts/trending-2026/trending-tag-sync.cjs b/scripts/trending-2026/trending-tag-sync.cjs
index 52cf0de..b4a491c 100644
--- a/scripts/trending-2026/trending-tag-sync.cjs
+++ b/scripts/trending-2026/trending-tag-sync.cjs
@@ -25,7 +25,7 @@ const ARTMURA_VENDOR = 'Artmura';
 
 const args = process.argv.slice(2);
 const DRY = args.includes('--dry-run');
-const TOP_N = parseInt(args.find((_, i, a) => a[i - 1] === '--top') || '500', 10) || 500;
+const TOP_N = parseInt(args.find((_, i, a) => a[i - 1] === '--top') || '1000', 10) || 1000;
 const CONC = parseInt(args.find((_, i, a) => a[i - 1] === '--conc') || '6', 10) || 6;
 
 const envPath = path.join(process.env.HOME, 'Projects/secrets-manager/.env');
@@ -114,21 +114,21 @@ async function runPool(ids, kind) {
 (async () => {
   logline(`--- Trending 2026 sync START ${DRY ? '(DRY-RUN)' : ''} top=${TOP_N} conc=${CONC} ---`);
 
-  // 1. newest TOP_N active products by created date
+  // HARD 500 CAP: target = the newest TOP_N active products by created date, period.
+  // Artmura is included only when it naturally falls inside that newest TOP_N.
   const newest = await fetchAll('status:active', { sortKey: 'CREATED_AT', reverse: true, cap: TOP_N });
-  // 2. all active Artmura
-  const artmura = await fetchAll(`status:active vendor:${ARTMURA_VENDOR}`);
-  // 3. everything currently carrying the tag (any status)
+  // everything currently carrying the tag (any status)
   const tagged = await fetchAll(`tag:${JSON.stringify(TAG)}`);
 
-  const target = new Set([...newest, ...artmura].map(n => n.id));
+  const target = new Set(newest.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 artmuraInSet = newest.filter(n => n.vendor === ARTMURA_VENDOR).length;
   const newestCutoff = newest.length ? newest[newest.length - 1].createdAt : 'n/a';
-  logline(`newest active=${newest.length} (oldest in set created ${newestCutoff}) | artmura active=${artmura.length} | target=${target.size} | currently tagged=${have.size}`);
+  logline(`newest active=${newest.length} (oldest in set created ${newestCutoff}) | artmura within set=${artmuraInSet} | target=${target.size} | currently tagged=${have.size}`);
   logline(`plan: +${toAdd.length} add, -${toRemove.length} remove`);
 
   if (toAdd.length) {

← cf0c7f0 Kravet dedup verifier: handle-driven keeper selection + redi  ·  back to Dw Yolo Loop  ·  Kravet dedup: archived 18 duplicate products live + 301 redi d8390e1 →