← back to Designer Wallcoverings
source-gate: reject boolean/NULL tokens as MFR SKU in both metafield migrators (mirrors dwjs-mfr-populator gate; stops TRUE-sku re-leak at source)
320887dc057493ba70528f8c71a831cc02aac5b1 · 2026-06-18 17:36:27 -0700 · SteveStudio2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Files touched
M DW-Programming/ImportNewSkufromURL/migrate-all-products-comprehensive.tsM DW-Programming/ImportNewSkufromURL/migrate-unstructured-metafields-dwwc.ts
Diff
commit 320887dc057493ba70528f8c71a831cc02aac5b1
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Thu Jun 18 17:36:27 2026 -0700
source-gate: reject boolean/NULL tokens as MFR SKU in both metafield migrators (mirrors dwjs-mfr-populator gate; stops TRUE-sku re-leak at source)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
.../ImportNewSkufromURL/migrate-all-products-comprehensive.ts | 10 ++++++++++
.../migrate-unstructured-metafields-dwwc.ts | 8 ++++++++
2 files changed, 18 insertions(+)
diff --git a/DW-Programming/ImportNewSkufromURL/migrate-all-products-comprehensive.ts b/DW-Programming/ImportNewSkufromURL/migrate-all-products-comprehensive.ts
index 72de8313..b1d96dd9 100644
--- a/DW-Programming/ImportNewSkufromURL/migrate-all-products-comprehensive.ts
+++ b/DW-Programming/ImportNewSkufromURL/migrate-all-products-comprehensive.ts
@@ -189,6 +189,16 @@ async function migrateProductMetafields(productId: string, title: string) {
const target = mapping[fullKey];
if (target && metafield.value && metafield.value.trim()) {
+ // Source gate (2026-06-17): never migrate a serialized boolean / null token
+ // (TRUE/FALSE/NULL/UNDEFINED) into custom.manufacturer_sku. A column shift in the
+ // upstream sheet landed such tokens in "Variant Barcode" (mapped here straight to
+ // manufacturer_sku), feeding "TRUE" into mfr_sku + barcode for 91 active products
+ // (Innovations USA et al.). Mirrors the dwjs-mfr-populator gate. See yolo memo
+ // true-sku-leak-fix-2026-06-17.
+ if (target.key === 'manufacturer_sku' &&
+ /^(TRUE|FALSE|NULL|UNDEFINED)$/i.test(metafield.value.trim())) {
+ continue;
+ }
try {
await setProductMetafield(
productId,
diff --git a/DW-Programming/ImportNewSkufromURL/migrate-unstructured-metafields-dwwc.ts b/DW-Programming/ImportNewSkufromURL/migrate-unstructured-metafields-dwwc.ts
index 979beb4e..fc2d2cdf 100644
--- a/DW-Programming/ImportNewSkufromURL/migrate-unstructured-metafields-dwwc.ts
+++ b/DW-Programming/ImportNewSkufromURL/migrate-unstructured-metafields-dwwc.ts
@@ -327,6 +327,14 @@ async function migrateProductMetafields(productId: string, title: string) {
const target = mapping[fullKey];
if (target && metafield.value && metafield.value.trim()) {
+ // Source gate (2026-06-17): never migrate a serialized boolean / null token
+ // (TRUE/FALSE/NULL/UNDEFINED) into custom.manufacturer_sku. An upstream "Variant Barcode"
+ // column shift fed "TRUE" into mfr_sku + barcode for 91 active products. Mirrors the
+ // dwjs-mfr-populator gate. See yolo memo true-sku-leak-fix-2026-06-17.
+ if (target.key === 'manufacturer_sku' &&
+ /^(TRUE|FALSE|NULL|UNDEFINED)$/i.test(metafield.value.trim())) {
+ continue;
+ }
try {
await setProductMetafield(
productId,
← 4ad8ba0d launchd minimal-PATH fix sweep: export PATH so node/psql/jq
·
back to Designer Wallcoverings
·
Cadence: 18 products/slot (36 variants) for 24-slot hourly s 740e9776 →