← back to Carnegie Reprice
handle: append dw_sku tail for guaranteed uniqueness (2424 colorway collisions)
c05ae91a3cab634f6d2eb649d4f91a6c872d6eb1 · 2026-08-18 13:19:34 -0700 · steve
Files touched
Diff
commit c05ae91a3cab634f6d2eb649d4f91a6c872d6eb1
Author: steve <steve@designerwallcoverings.com>
Date: Tue Aug 18 13:19:34 2026 -0700
handle: append dw_sku tail for guaranteed uniqueness (2424 colorway collisions)
---
rebuild-line.mjs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/rebuild-line.mjs b/rebuild-line.mjs
index 396a1fb..e5d77b8 100644
--- a/rebuild-line.mjs
+++ b/rebuild-line.mjs
@@ -92,9 +92,10 @@ function buildPayload(row){
bits.push(`</p>`);
body = bits.join('');
}
- // handle: unique via color_number so no collisions across a pattern's colorways
- const slug = s => String(s||'').toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'').slice(0,60);
- const handle = `carnegie-${slug(row.pattern_name)}-${slug(colorName)}-${slug(row.color_number||row.dw_sku)}`.replace(/-+/g,'-').slice(0,120);
+ // handle: dw_sku tail is the GUARANTEED-unique discriminator (2,424 pattern+color+color_number
+ // collisions exist = distinct sellable SKUs, e.g. different backings of one colorway)
+ const slug = s => String(s||'').toLowerCase().replace(/[^a-z0-9]+/g,'-').replace(/^-|-$/g,'').slice(0,50);
+ const handle = `carnegie-${slug(row.pattern_name)}-${slug(colorName)}-${slug(row.dw_sku)}`.replace(/-+/g,'-').slice(0,120);
const tags = [
...(row.color_tags||[]), row.color_bucket, ...(row.style_tags||[]),
← af22a7d Carnegie Phase 3 full-line rollout: resumable builder + fact
·
back to Carnegie Reprice
·
add --shard N/M for parallel disjoint workers (4x throughput c0e7acb →