← back to Designer Wallcoverings
cadence: one-vendor-per-slot round-robin — fix stuck cursor (idx pinned at 0 ran Thibaut every slot)
1590533f4f346ddb674ea48cca42e28c9d15a9de · 2026-06-23 10:06:03 -0700 · Steve Studio
The old advance (start+picked.length)%ready.length wrapped a full lap back to the
same start whenever VENDORS_PER_SLOT >= READY count (live --vendors 8 vs 6-7 READY),
pinning idx at 0. Now clamp per-slot picks to leave room to advance and step the
cursor by picked.length so every slot leads with the NEXT READY vendor and wraps.
Runner: --vendors 1 --skus $MAXP (Steve: every 18/hr should be a new vendor).
Files touched
M shopify/scripts/cadence/run-cadence-hourly.sh
Diff
commit 1590533f4f346ddb674ea48cca42e28c9d15a9de
Author: Steve Studio <steve@designerwallcoverings.com>
Date: Tue Jun 23 10:06:03 2026 -0700
cadence: one-vendor-per-slot round-robin — fix stuck cursor (idx pinned at 0 ran Thibaut every slot)
The old advance (start+picked.length)%ready.length wrapped a full lap back to the
same start whenever VENDORS_PER_SLOT >= READY count (live --vendors 8 vs 6-7 READY),
pinning idx at 0. Now clamp per-slot picks to leave room to advance and step the
cursor by picked.length so every slot leads with the NEXT READY vendor and wraps.
Runner: --vendors 1 --skus $MAXP (Steve: every 18/hr should be a new vendor).
---
shopify/scripts/cadence/run-cadence-hourly.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/shopify/scripts/cadence/run-cadence-hourly.sh b/shopify/scripts/cadence/run-cadence-hourly.sh
index 6720821c..d1e8b568 100755
--- a/shopify/scripts/cadence/run-cadence-hourly.sh
+++ b/shopify/scripts/cadence/run-cadence-hourly.sh
@@ -42,7 +42,12 @@ export $(grep -E "^SHOPIFY_ADMIN_TOKEN=" "$HOME/Projects/secrets-manager/.env" |
# collection (298339205171), turning a curated rotation into a de-facto full new-arrivals feed
# (grew 518 → 1,380). Steve's explicit decision: Trending must NOT become an auto new-arrivals feed.
# The flag-gated code in cadence-import.js stays intact (reversible) — to re-arm, add --collections back.
-OUT=$(node scripts/cadence/cadence-import.js --slot "$SLOT" --vendors 8 --skus 10 --max "$MAXP" --activate --commit 2>&1)
+# 2026-06-23 (Steve "every 18/hr should be a new vendor"): ONE vendor per slot, ~18 SKUs from
+# that vendor's staged net-new. --vendors 1 makes the rotation cursor (data/cadence-cursor.json)
+# advance by exactly 1 READY vendor each slot, so every hourly slot features the NEXT vendor in
+# the round-robin and wraps around — even vendor coverage instead of one vendor draining all day.
+# --skus matches --max ($MAXP, ~18) so the single lead vendor can supply the whole slot.
+OUT=$(node scripts/cadence/cadence-import.js --slot "$SLOT" --vendors 1 --skus "$MAXP" --max "$MAXP" --activate --commit 2>&1)
RC=$?
echo "$OUT"
echo "cadence-import exit $RC (3 = daily variant cap hit, resumes next slot)"
← b84713de Officer-yolo approved: Launch Tres Tintas full backfill (all
·
back to Designer Wallcoverings
·
Add infinite scroll implementation for collections (mutation ff28eaa5 →