[object Object]

← back to Designer Wallcoverings

auto-save: 2026-07-15T18:09:00 (6 files) — DW-Programming/color-enrich-newskus.sh DW-Programming/enrich-active-colors.js pending-approval/boost-filter-consolidation-2026-06-25 scripts/pr-contact-for-price vendor-scrapers/china-seas-refresh

6e2ebf88d9a03e7a75b42b0edc6a0795189f9539 · 2026-07-15 18:09:04 -0700 · Steve Abrams

Files touched

Diff

commit 6e2ebf88d9a03e7a75b42b0edc6a0795189f9539
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Jul 15 18:09:04 2026 -0700

    auto-save: 2026-07-15T18:09:00 (6 files) — DW-Programming/color-enrich-newskus.sh DW-Programming/enrich-active-colors.js pending-approval/boost-filter-consolidation-2026-06-25 scripts/pr-contact-for-price vendor-scrapers/china-seas-refresh
---
 DW-Programming/color-enrich-newskus.sh                       | 9 ++++++++-
 DW-Programming/enrich-active-colors.js                       | 5 ++++-
 shopify/scripts/cadence/data/upload-restore-2026-07-16.jsonl | 3 +++
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/DW-Programming/color-enrich-newskus.sh b/DW-Programming/color-enrich-newskus.sh
index c1cd9624..47d43bd9 100755
--- a/DW-Programming/color-enrich-newskus.sh
+++ b/DW-Programming/color-enrich-newskus.sh
@@ -33,6 +33,13 @@ echo "[$(date '+%F %T')] running local palette enricher on all pending…"
 node enrich-active-colors.js --conc 5
 
 echo "[$(date '+%F %T')] syncing new colors into product_colors (shop-by-color source)…"
-node sync-enrich-to-product-colors.js || echo "  (sync step not present yet — skipping)"
+node sync-enrich-to-product-colors.js
+
+# Rebuild + reship the color-index NOW so tonight's new colors reach shop-by-color
+# same night (do NOT wait for the separate 03:30 rebuild — that runs BEFORE this job
+# and would leave new SKUs invisible for ~23h). refresh-color-index.sh builds from
+# product_colors + rsyncs to Kamatera (endpoint hot-reloads on mtime).
+echo "[$(date '+%F %T')] rebuilding + reshipping color-index…"
+bash "$HOME/Projects/dw-photo-capture/scripts/refresh-color-index.sh"
 
 echo "[$(date '+%F %T')] new-sku color enrich complete."
diff --git a/DW-Programming/enrich-active-colors.js b/DW-Programming/enrich-active-colors.js
index 80a46850..7abf7d3e 100644
--- a/DW-Programming/enrich-active-colors.js
+++ b/DW-Programming/enrich-active-colors.js
@@ -65,7 +65,10 @@ async function writeMetafields(numericId, colorHex, aiColors) {
 (async () => {
   if (!TOKEN) { console.error('Missing SHOPIFY_ADMIN_TOKEN'); process.exit(1); }
   const { rows } = await pool.query(
-    `SELECT numeric_id, image_url FROM color_enrich_todo WHERE done_at IS NULL AND image_url LIKE 'http%' ${LIMIT ? 'LIMIT ' + LIMIT : ''}`);
+    // Skip rows that already failed palette extraction on a permanent cause (dead
+    // image URL won't fix itself) — otherwise they retry every nightly run forever.
+    // Transient write-errors keep err set to a different string and DO retry.
+    `SELECT numeric_id, image_url FROM color_enrich_todo WHERE done_at IS NULL AND image_url LIKE 'http%' AND (err IS NULL OR err <> 'no-palette') ${LIMIT ? 'LIMIT ' + LIMIT : ''}`);
   console.log(`Color enrich — ${DRY ? 'DRY' : 'LIVE'} — ${rows.length} products, conc ${CONC}`);
   let done = 0, failed = 0, idx = 0;
   const queue = [...rows];
diff --git a/shopify/scripts/cadence/data/upload-restore-2026-07-16.jsonl b/shopify/scripts/cadence/data/upload-restore-2026-07-16.jsonl
new file mode 100644
index 00000000..cf0878d0
--- /dev/null
+++ b/shopify/scripts/cadence/data/upload-restore-2026-07-16.jsonl
@@ -0,0 +1,3 @@
+{"table":"thibaut_catalog","mfr_sku":"T85011","dw_sku":"DWTT-74277","shopify_product_id":"7886031683635","action":"created","activated":true,"published":true,"sampleOnly":false,"status":"ACTIVE","batch_id":"upload-pm-2026-07-16T00-40-05-077Z","ts":"2026-07-16T00:40:10.516Z"}
+{"table":"thibaut_catalog","mfr_sku":"T85012","dw_sku":"DWTT-74278","shopify_product_id":"7886031945779","action":"created","activated":true,"published":true,"sampleOnly":false,"status":"ACTIVE","batch_id":"upload-pm-2026-07-16T00-40-05-077Z","ts":"2026-07-16T00:40:14.396Z"}
+{"table":"thibaut_catalog","mfr_sku":"T85021","dw_sku":"DWTT-74279","shopify_product_id":"7886032273459","action":"created","activated":true,"published":true,"sampleOnly":false,"status":"ACTIVE","batch_id":"upload-pm-2026-07-16T00-40-05-077Z","ts":"2026-07-16T00:40:18.036Z"}

← a6ee3510 auto-save: 2026-07-15T17:08:45 (5 files) — pending-approval/  ·  back to Designer Wallcoverings  ·  auto-save: 2026-07-15T19:09:14 (4 files) — pending-approval/ d6b866c7 →