← back to Designerwallcoverings
TK-11073 Wave2: Stout color: facet from real color_name, drop AI-palette bare-tags
07a4911587d5dd2c209bfb837d73eef5d0f4adec · 2026-09-01 11:57:11 -0700 · Steve Abrams
tags() now emits color:<real color_name> and demotes AI palette color-words (ai_colors[].name
and ai_tags matching a palette hue) so they no longer pollute as bare tags. Real colorway stays
as the single bare color tag alongside its facet; palette hues remain in metafields.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M scripts/stout-onboard/build-payloads.mjs
Diff
commit 07a4911587d5dd2c209bfb837d73eef5d0f4adec
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Sep 1 11:57:11 2026 -0700
TK-11073 Wave2: Stout color: facet from real color_name, drop AI-palette bare-tags
tags() now emits color:<real color_name> and demotes AI palette color-words (ai_colors[].name
and ai_tags matching a palette hue) so they no longer pollute as bare tags. Real colorway stays
as the single bare color tag alongside its facet; palette hues remain in metafields.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
scripts/stout-onboard/build-payloads.mjs | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/scripts/stout-onboard/build-payloads.mjs b/scripts/stout-onboard/build-payloads.mjs
index 4e05c44..06e2353 100644
--- a/scripts/stout-onboard/build-payloads.mjs
+++ b/scripts/stout-onboard/build-payloads.mjs
@@ -63,16 +63,30 @@ function titleFor(r) {
return `${pat}${col ? ' ' + col : ''} | ${BRAND}`.replace(/\s+/g, ' ').trim();
}
-// Faithful to the live 6: Brand + fixed + pattern + color + ai_colors[].name + ai_styles + ai_tags,
-// deduped case-insensitively, banned/noise words stripped. Always ≥2 tags.
+// Brand + fixed + pattern + REAL color_name + color: facet + ai_styles + non-color ai_tags.
+// TK-11073: the color: facet comes from the REAL scraped color_name (never AI vision), and the
+// AI palette color-words (ai_colors[].name + any ai_tags matching an AI palette hue) are DEMOTED —
+// they were emitting as stray-colorway bare-tag pollution. The palette hues remain in
+// custom.color_*/color_details metafields. The real colorway (color_name) stays as the one bare
+// color tag alongside its color: facet.
function tags(r) {
const out = new Map(); // lowercase → display
const add = v => { const s = titleCase(clean(String(v || ''))); if (s && !isBadWord(s) && !/^paper$/i.test(s) && !/wall\s*paper/i.test(s)) out.set(s.toLowerCase(), s); };
['Stout Textiles', 'Wallcovering', 'display_variant'].forEach(t => out.set(t.toLowerCase(), t));
add(r.pattern_name); add(r.color_name);
- for (const c of jarr(r.ai_colors)) add(c && c.name);
+ // color: facet from the REAL colorway only (TK-11073).
+ const cw = clean(r.color_name);
+ if (cw && !isBadWord(cw)) out.set(('color:' + titleCase(cw)).toLowerCase(), 'color:' + titleCase(cw));
+ // AI palette hues (ai_colors[].name) that are NOT the real colorway → the noise class. Skip them.
+ const palette = new Set(jarr(r.ai_colors).map(c => c && c.name).filter(Boolean).map(x => titleCase(clean(x)).toLowerCase()));
+ const realCw = cw ? titleCase(cw).toLowerCase() : null;
for (const s of jarr(r.ai_styles)) add(s);
- for (const t of jarr(r.ai_tags)) { const s = String(t || ''); if (s.length <= 24) add(s); } // drop long material strings
+ for (const t of jarr(r.ai_tags)) {
+ const s = String(t || ''); if (s.length > 24) continue; // drop long material strings
+ const disp = titleCase(clean(s));
+ if (palette.has(disp.toLowerCase()) && disp.toLowerCase() !== realCw) continue; // drop AI palette color-word strays
+ add(s);
+ }
return [...out.values()].join(', ');
}
function repeatStr(r) {
← b61983c TK-11073 Wave1: Osborne LIVE remediation — 29 real-title pro
·
back to Designerwallcoverings
·
TK-11073 Wave3: defensive image-keep filter + muralsource/ri e0cf48e →