[object Object]

← back to Designerwallcoverings

onboard go-live: add TK-10303 manufacturer_sku gate to 3 ungated .js scripts (TK-10162)

eadef9f79e6130eb7ec6baac2857929460899b8f · 2026-09-03 09:02:18 -0700 · Steve Abrams

The PJ 09-02 onboard activated 893 products with no manufacturer_sku metafield,
flipping the dw-golive-gate-canary WARN->FAIL. Audit found the older go-live-*.js
scripts (artmura, fallingstar, tres-tintas) activate without the mfr# gate that
all .mjs onboarders (osborne/knoll/sanderson/...) already carry. Add the same
fail-safe: query custom+dwc manufacturer_sku right before status:ACTIVE, and HOLD
the product as draft if both are empty. Reversible-local; no live data touched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit eadef9f79e6130eb7ec6baac2857929460899b8f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Sep 3 09:02:18 2026 -0700

    onboard go-live: add TK-10303 manufacturer_sku gate to 3 ungated .js scripts (TK-10162)
    
    The PJ 09-02 onboard activated 893 products with no manufacturer_sku metafield,
    flipping the dw-golive-gate-canary WARN->FAIL. Audit found the older go-live-*.js
    scripts (artmura, fallingstar, tres-tintas) activate without the mfr# gate that
    all .mjs onboarders (osborne/knoll/sanderson/...) already carry. Add the same
    fail-safe: query custom+dwc manufacturer_sku right before status:ACTIVE, and HOLD
    the product as draft if both are empty. Reversible-local; no live data touched.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 scripts/artmura-onboard/go-live-artmura.js         | 6 ++++++
 scripts/fallingstar-onboard/go-live-fallingstar.js | 7 +++++++
 scripts/tres-tintas-onboard/go-live-tres-tintas.js | 6 ++++++
 3 files changed, 19 insertions(+)

diff --git a/scripts/artmura-onboard/go-live-artmura.js b/scripts/artmura-onboard/go-live-artmura.js
index 7c22056..eb9a17d 100644
--- a/scripts/artmura-onboard/go-live-artmura.js
+++ b/scripts/artmura-onboard/go-live-artmura.js
@@ -87,6 +87,12 @@ async function goLive(pid) {
   // 3: publish to all channels
   const r3 = await gql(M_PUBLISH, { id: gidP, pubs: PUBLICATIONS.map(p => ({ publicationId: p })) });
   (r3.publishablePublish?.userErrors || []).forEach(e => errs.push('publish:' + e.message));
+  // TK-10303 go-live gate (TK-10162 fleet backfill): never flip a product ACTIVE without a
+  // real manufacturer_sku metafield — the no-mfr go-live breach class (PJ 09-02, 893 SKUs).
+  { const _mf = await gql('query($id:ID!){product(id:$id){c:metafield(namespace:"custom",key:"manufacturer_sku"){value} d:metafield(namespace:"dwc",key:"manufacturer_sku"){value}}}', { id: gidP });
+    if (!((_mf?.product?.c?.value || _mf?.product?.d?.value || '').trim())) {
+      console.error('  ⛔ HELD (no manufacturer_sku metafield — TK-10303 go-live gate): ' + gidP);
+      return { heldNoMfr: true, errs: ['heldNoMfr: no manufacturer_sku metafield'] }; } }
   // 4: activate product
   const r4 = await gql(M_ACTIVE, { id: gidP });
   (r4.productUpdate?.userErrors || []).forEach(e => errs.push('active:' + e.message));
diff --git a/scripts/fallingstar-onboard/go-live-fallingstar.js b/scripts/fallingstar-onboard/go-live-fallingstar.js
index a917242..39b3899 100644
--- a/scripts/fallingstar-onboard/go-live-fallingstar.js
+++ b/scripts/fallingstar-onboard/go-live-fallingstar.js
@@ -78,6 +78,13 @@ async function goLive(pid) {
   (r2.inventorySetQuantities?.userErrors || []).forEach(e => errs.push('setqty:' + e.message));
   const r3 = await gql(M_PUBLISH, { id: gidP, pubs: PUBLICATIONS.map(p => ({ publicationId: p })) });
   (r3.publishablePublish?.userErrors || []).forEach(e => errs.push('publish:' + e.message));
+  // TK-10303 go-live gate (TK-10162 fleet backfill): never flip a product ACTIVE without a
+  // real manufacturer_sku metafield — the no-mfr go-live breach class (PJ 09-02, 893 SKUs).
+  // Returns a non-empty errs array so the caller HOLDS it (draft) and never logs it active.
+  { const _mf = await gql('query($id:ID!){product(id:$id){c:metafield(namespace:"custom",key:"manufacturer_sku"){value} d:metafield(namespace:"dwc",key:"manufacturer_sku"){value}}}', { id: gidP });
+    if (!((_mf?.product?.c?.value || _mf?.product?.d?.value || '').trim())) {
+      console.error('  ⛔ HELD (no manufacturer_sku metafield — TK-10303 go-live gate): ' + gidP);
+      return ['heldNoMfr: no manufacturer_sku metafield']; } }
   const r4 = await gql(M_ACTIVE, { id: gidP });
   (r4.productUpdate?.userErrors || []).forEach(e => errs.push('active:' + e.message));
   return errs;
diff --git a/scripts/tres-tintas-onboard/go-live-tres-tintas.js b/scripts/tres-tintas-onboard/go-live-tres-tintas.js
index 2447fd0..dfd4f04 100644
--- a/scripts/tres-tintas-onboard/go-live-tres-tintas.js
+++ b/scripts/tres-tintas-onboard/go-live-tres-tintas.js
@@ -81,6 +81,12 @@ async function goLive(pid) {
   (rq.inventorySetQuantities?.userErrors || []).forEach(e => errs.push('qty:' + e.message));
   const rp = await gql(M_PUB, { id: gid, pubs: PUBLICATIONS.map(p => ({ publicationId: p })) });
   (rp.publishablePublish?.userErrors || []).forEach(e => errs.push('pub:' + e.message));
+  // TK-10303 go-live gate (TK-10162 fleet backfill): never flip a product ACTIVE without a
+  // real manufacturer_sku metafield — the no-mfr go-live breach class (PJ 09-02, 893 SKUs).
+  { const _mf = await gql('query($id:ID!){product(id:$id){c:metafield(namespace:"custom",key:"manufacturer_sku"){value} d:metafield(namespace:"dwc",key:"manufacturer_sku"){value}}}', { id: gid });
+    if (!((_mf?.product?.c?.value || _mf?.product?.d?.value || '').trim())) {
+      console.error('  ⛔ HELD (no manufacturer_sku metafield — TK-10303 go-live gate): ' + gid);
+      return { heldNoMfr: true, errs: ['heldNoMfr: no manufacturer_sku metafield'] }; } }
   const ra = await gql(M_ACTIVE, { id: gid });
   (ra.productUpdate?.userErrors || []).forEach(e => errs.push('active:' + e.message));
   return { errs };

← 6c013da auto-data-snapshot: 2026-09-03T08:35:39 (6 data files) — scr  ·  back to Designerwallcoverings  ·  TK-11131: PJ go-live-gate mfr# backfill — dry-run mapping + cd4e660 →