[object Object]

← back to Designerwallcoverings

TK-11357 Fix A: stop emitting the $0 sellable variant in quote-only build-payloads

5ac31dff022a839594023e10bc3d90db56a058ad · 2026-09-10 10:21:31 -0700 · Steve Abrams

rigo-onboard + greenland-onboard build-payloads emitted a sellable (non-Sample)
Yard/Roll variant priced '0.00'. A bulk activator that stocks every variant with
qty=2026 turns that $0 variant into a checkout-orderable $0 product (lineage
TK-10825/10965/11140/11299/11301/11357). Emit SAMPLE-ONLY drafts instead; the
priced variant is ADDed later by launch-pricing.mjs (its yardV?update:create path
already supports sample-only products), so nothing downstream regresses.

Belt to the already-committed suspenders: Fix B/C (never stock a $0 variant) is
already landed on the parent branch as the inventory-stamp-guard.mjs / safeStampQuantity
guard wired into all 11 activators; this closes the source (never create the $0
sellable variant in the first place). Also repairs greenland's final console.log,
which referenced the removed Roll variant and a non-existent product.images key.

Source-only. No Shopify/dw_unified/live write fired.

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

Files touched

Diff

commit 5ac31dff022a839594023e10bc3d90db56a058ad
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Sep 10 10:21:31 2026 -0700

    TK-11357 Fix A: stop emitting the $0 sellable variant in quote-only build-payloads
    
    rigo-onboard + greenland-onboard build-payloads emitted a sellable (non-Sample)
    Yard/Roll variant priced '0.00'. A bulk activator that stocks every variant with
    qty=2026 turns that $0 variant into a checkout-orderable $0 product (lineage
    TK-10825/10965/11140/11299/11301/11357). Emit SAMPLE-ONLY drafts instead; the
    priced variant is ADDed later by launch-pricing.mjs (its yardV?update:create path
    already supports sample-only products), so nothing downstream regresses.
    
    Belt to the already-committed suspenders: Fix B/C (never stock a $0 variant) is
    already landed on the parent branch as the inventory-stamp-guard.mjs / safeStampQuantity
    guard wired into all 11 activators; this closes the source (never create the $0
    sellable variant in the first place). Also repairs greenland's final console.log,
    which referenced the removed Roll variant and a non-existent product.images key.
    
    Source-only. No Shopify/dw_unified/live write fired.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 scripts/greenland-onboard/build-payloads.mjs | 9 ++++++---
 scripts/rigo-onboard/build-payloads.mjs      | 7 +++++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/scripts/greenland-onboard/build-payloads.mjs b/scripts/greenland-onboard/build-payloads.mjs
index f53979e..3c15b83 100644
--- a/scripts/greenland-onboard/build-payloads.mjs
+++ b/scripts/greenland-onboard/build-payloads.mjs
@@ -1,7 +1,10 @@
 #!/usr/bin/env node
 /**
  * Build Greenland cork DRAFT payloads from dw_unified.greenland_catalog → out/payloads.jsonl.
- * Quote-only posture (Pierre Frey model): Roll variant $0 + `quotes`/`Needs-Price`, Sample $4.25.
+ * Quote-only posture (Pierre Frey model): SAMPLE-ONLY draft — Sample $4.25 + `quotes`/`Needs-Price`,
+ * NO sellable variant. (TK-11357 Fix A: never emit a $0 sellable Roll variant — it is what a bulk
+ * activator stocks with qty=2026 → $0-orderable at checkout. launch-pricing ADDs the priced variant
+ * only when a real cost list lands.)
  * Consumed by create-drafts.mjs (mirrors osborne-onboard/create-drafts.mjs).
  *   node build-payloads.mjs        # build payloads.jsonl + print first 3
  */
@@ -82,7 +85,7 @@ function main() {
         // Greenland serves application/octet-stream → Shopify URL-ingest 422s.
         // Image is downloaded + base64-attached post-create by create-drafts.mjs.
         variants: [
-          { sku, price: '0.00', option1: 'Roll', taxable: true, requires_shipping: true, inventory_management: null },
+          // TK-11357 Fix A: sample-only until a real cost list lands (launch-pricing ADDs the priced Roll).
           { sku: `${sku}-Sample`, price: SAMPLE_PRICE, option1: 'Sample', taxable: true, requires_shipping: true, inventory_management: null },
         ],
       },
@@ -93,6 +96,6 @@ function main() {
   fs.closeSync(fd);
   console.log(`✓ ${n} payloads → out/payloads.jsonl`);
   const sample = fs.readFileSync(path.join(OUT, 'payloads.jsonl'), 'utf8').trim().split('\n').slice(0, 3).map(l => JSON.parse(l));
-  for (const o of sample) console.log(`  [${o.sku}] "${o.product.title}" · Roll $${o.product.variants[0].price}/Sample $${o.product.variants[1].price} · mf:${o.metafields.length} · tags:${o.product.tags.split(', ').length} · img:${o.product.images.length}`);
+  for (const o of sample) console.log(`  [${o.sku}] "${o.product.title}" · sample-only $${o.product.variants[0].price} · mf:${o.metafields.length} · tags:${o.product.tags.split(', ').length}`);
 }
 main();
diff --git a/scripts/rigo-onboard/build-payloads.mjs b/scripts/rigo-onboard/build-payloads.mjs
index 72db866..c35cc79 100644
--- a/scripts/rigo-onboard/build-payloads.mjs
+++ b/scripts/rigo-onboard/build-payloads.mjs
@@ -2,7 +2,10 @@
 /**
  * Build RIGO → Phillipe Romano Vinyls DRAFT payloads from dw_unified.rigo_catalog
  * → out/payloads.jsonl. Quote-only posture (Pierre Frey / Greenland model):
- * Yard variant $0 + `quotes`/`Needs-Price` tags, Sample $4.25.
+ * SAMPLE-ONLY draft — Sample $4.25 + `quotes`/`Needs-Price` tags, NO sellable variant.
+ * (TK-11357 Fix A: never emit a $0 sellable Yard variant — it is what a bulk activator
+ *  stocks with qty=2026 → $0-orderable at checkout. launch-pricing ADDs the priced Yard
+ *  variant only when a real cost list lands.)
  *
  * PRIVATE LABEL, FULL RENAME: titles/tags/body use pr_pattern_name + pr_collection_name
  * ONLY. RIGO's names + item numbers never appear in customer-visible fields; the real
@@ -115,7 +118,7 @@ for (const r of rows) {
       status: 'draft', tags: tags(r), body_html: bodyHtml(r),
       options: [{ name: 'Format' }],
       variants: [
-        { sku: r.dw_sku, price: '0.00', option1: 'Yard', taxable: true, requires_shipping: true, inventory_management: null },
+        // TK-11357 Fix A: sample-only until a real cost list lands (launch-pricing ADDs the priced Yard).
         { sku: `${r.dw_sku}-Sample`, price: SAMPLE_PRICE, option1: 'Sample', taxable: true, requires_shipping: true, inventory_management: null },
       ],
     },

← 5bef4e3 TK-10895: fix silent reorder failure leaking 4.25 on 226 liv  ·  back to Designerwallcoverings  ·  auto-data-snapshot: 2026-09-10T10:34:55 (3 data files) — scr 52587a2 →