[object Object]

← back to Designer Wallcoverings

cadence: gate Quadrille-house sample-only drip OFF by default (QUADRILLE_SAMPLEONLY_DRIP / --sampleonly); manual --only test bypasses

9ec5d21e4958961228ffc7b4849f3f22abd97265 · 2026-06-23 17:18:35 -0700 · Steve

Files touched

Diff

commit 9ec5d21e4958961228ffc7b4849f3f22abd97265
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Jun 23 17:18:35 2026 -0700

    cadence: gate Quadrille-house sample-only drip OFF by default (QUADRILLE_SAMPLEONLY_DRIP / --sampleonly); manual --only test bypasses
---
 shopify/scripts/cadence/cadence-import.js | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/shopify/scripts/cadence/cadence-import.js b/shopify/scripts/cadence/cadence-import.js
index 51b31f68..6837c23c 100644
--- a/shopify/scripts/cadence/cadence-import.js
+++ b/shopify/scripts/cadence/cadence-import.js
@@ -44,6 +44,13 @@ const SKUS_PER_VENDOR = parseInt(val('--skus', '20'), 10);
 const MAX_PRODUCTS = parseInt(val('--max', '0'), 10);   // 0 = unlimited; total products this run (budget-bound by the hourly runner)
 const ACTIVATE = flag('--activate');                    // auto-activate readiness-passing products to ACTIVE + inventory=2026 (Steve 2026-06-17)
 const ADD_TO_COLLECTIONS = flag('--collections');       // GATED: add newly-published products to the "Trending Wallcovering Collection 2026" custom collection (DTD 3/3 Option A, 2026-06-19). OFF by default so the scheduled --commit run does NOT write to the live collection until Steve approves enabling this flag.
+// GATE for the Quadrille-house SAMPLE-ONLY drip (Steve AUTHORIZED the build 2026-06-23, but the
+// FULL 1,936-row drip stays OFF until Steve flips it on). The 8 sampleOnly vendors are HELD out of
+// the gate (reported 'sampleonly-drip-gated') unless QUADRILLE_SAMPLEONLY_DRIP=1 is set OR
+// --sampleonly is passed. So: committing this code does NOT start the drip; the scheduled hourly
+// runner won't create any sample-only product until the env/flag is enabled. The few-SKU manual
+// test bypasses the gate via --sampleonly (or --only <SampleOnlyVendor>, which whitelists it).
+const SAMPLEONLY_DRIP = flag('--sampleonly') || process.env.QUADRILLE_SAMPLEONLY_DRIP === '1';
 const TODAY = new Date().toISOString().slice(0, 10);
 // Defensive vendor denylist — even if a vendor is in vendors.js + discount_confirmed, NEVER
 // import these (belt-and-suspenders for sub-brand/registry drift). Today vendors.js already
@@ -193,6 +200,14 @@ function gate() {
   for (const [vendor, cfg] of Object.entries(VENDORS)) {
     if (DENY_VENDORS.has(vendor)) { rows.push({ vendor, cfg, ready: false, why: 'DENYLISTED', netnew: 0 }); continue; }
     if (cfg.sampleOnly) {
+      // The full sample-only drip is HELD OFF until Steve enables it (QUADRILLE_SAMPLEONLY_DRIP=1
+      // or --sampleonly). Exception: an explicit --only <thisVendor> whitelists it for the manual
+      // few-SKU test. Otherwise report gated so the scheduled rotation never picks it up.
+      const explicitlyTargeted = ONLY && ONLY.toLowerCase() === vendor.toLowerCase();
+      if (!SAMPLEONLY_DRIP && !explicitlyTargeted) {
+        rows.push({ vendor, cfg, ready: false, why: 'sampleonly-drip-gated (set QUADRILLE_SAMPLEONLY_DRIP=1 to enable)', netnew: 0 });
+        continue;
+      }
       // no cost, no discount gate — just net-new rows for this brand
       let netnew = 0, why = 'READY (sample-only)';
       try {

← eb9c513f cadence: fix ACTIVE/DRAFT summary count for sample-only prod  ·  back to Designer Wallcoverings  ·  cadence: harden sample-only desc query against newline/tab c e38bffd8 →