[object Object]

← back to Designer Wallcoverings

cadence: Romo cost basis = total_price_per_roll (DTD-B, incl 10% tariff); Designtex cost=price_retail (Steve); 10 Thibaut DRAFT imported under gate

950348b58d7aad30a2d072160495276c491aa227 · 2026-06-11 09:16:54 -0700 · SteveStudio2

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Files touched

Diff

commit 950348b58d7aad30a2d072160495276c491aa227
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Thu Jun 11 09:16:54 2026 -0700

    cadence: Romo cost basis = total_price_per_roll (DTD-B, incl 10% tariff); Designtex cost=price_retail (Steve); 10 Thibaut DRAFT imported under gate
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
 shopify/scripts/cadence/cadence-import.js          |   6 +-
 shopify/scripts/cadence/cadence-test-tick.sh       |  24 +++
 .../cadence/data/cadence-plan-am-2026-06-11.json   | 240 ---------------------
 shopify/scripts/cadence/vendors.js                 |   6 +-
 4 files changed, 32 insertions(+), 244 deletions(-)

diff --git a/shopify/scripts/cadence/cadence-import.js b/shopify/scripts/cadence/cadence-import.js
index 15c2cf0f..2f2d8c39 100644
--- a/shopify/scripts/cadence/cadence-import.js
+++ b/shopify/scripts/cadence/cadence-import.js
@@ -37,6 +37,7 @@ const val = (n, d) => { const i = args.indexOf(n); return i >= 0 ? args[i + 1] :
 const COMMIT = flag('--commit');
 const GATE_ONLY = flag('--gate');
 const SLOT = val('--slot', 'am');
+const ONLY = val('--only', null);   // restrict to a single vendor (e.g. --only Thibaut)
 const VENDORS_PER_SLOT = parseInt(val('--vendors', '10'), 10);
 const SKUS_PER_VENDOR = parseInt(val('--skus', '20'), 10);
 const TODAY = new Date().toISOString().slice(0, 10);
@@ -219,8 +220,9 @@ async function createProduct(table, row, payload) {
   for (const r of all) console.log(`  ${r.ready?'✅':'⛔'} ${r.vendor.padEnd(18)} net-new costed=${String(r.netnew).padStart(5)}  ${r.why}`);
   if (GATE_ONLY) return;
 
-  const ready = all.filter(r => r.ready);
-  if (!ready.length) { console.log('\nNo READY vendors with net-new costed SKUs. Nothing to import.'); return; }
+  let ready = all.filter(r => r.ready);
+  if (ONLY) ready = ready.filter(r => r.vendor.toLowerCase() === ONLY.toLowerCase());
+  if (!ready.length) { console.log(`\nNo READY vendors${ONLY?` matching --only ${ONLY}`:''} with net-new costed SKUs. Nothing to import.`); return; }
 
   // rotate
   const cur = loadCursor();
diff --git a/shopify/scripts/cadence/cadence-test-tick.sh b/shopify/scripts/cadence/cadence-test-tick.sh
new file mode 100755
index 00000000..b6bf5369
--- /dev/null
+++ b/shopify/scripts/cadence/cadence-test-tick.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+# 20-minute TEST tick — creates 1 new Thibaut product per run, TODAY ONLY.
+# Self-expires: on the first run where the date != STOPDATE, it boots itself
+# out of launchd and disables its plist, so it never runs past today.
+set -u
+export PATH=/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin
+STOPDATE="2026-06-11"
+LABEL="com.steve.cadence-test-20min"
+PLIST="$HOME/Library/LaunchAgents/$LABEL.plist"
+DIR="$HOME/Projects/Designer-Wallcoverings/shopify/scripts/cadence"
+LOG="$DIR/data/cadence-test.log"
+
+TODAY="$(date +%Y-%m-%d)"
+if [ "$TODAY" != "$STOPDATE" ]; then
+  echo "$(date '+%F %T') past STOPDATE ($STOPDATE) — self-expiring." >> "$LOG"
+  launchctl bootout "gui/$(id -u)/$LABEL" 2>/dev/null
+  [ -f "$PLIST" ] && mv "$PLIST" "$PLIST.EXPIRED"
+  exit 0
+fi
+
+cd "$DIR" || exit 1
+echo "$(date '+%F %T') tick — creating 1 Thibaut product" >> "$LOG"
+node cadence-import.js --only Thibaut --vendors 1 --skus 1 --commit >> "$LOG" 2>&1
+tail -3 "$LOG"
diff --git a/shopify/scripts/cadence/data/cadence-plan-am-2026-06-11.json b/shopify/scripts/cadence/data/cadence-plan-am-2026-06-11.json
index caaf607b..d9d7bff1 100644
--- a/shopify/scripts/cadence/data/cadence-plan-am-2026-06-11.json
+++ b/shopify/scripts/cadence/data/cadence-plan-am-2026-06-11.json
@@ -1,172 +1,4 @@
 [
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240007",
-  "cost": 425,
-  "retail": 769.23,
-  "sample": "4.25",
-  "title": "Abaca, Pewter Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240013",
-  "cost": 493,
-  "retail": 892.31,
-  "sample": "4.25",
-  "title": "Tipi, Indigo Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240016",
-  "cost": 555,
-  "retail": 1004.52,
-  "sample": "4.25",
-  "title": "Savanna, Bark Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240020",
-  "cost": 432,
-  "retail": 781.9,
-  "sample": "4.25",
-  "title": "Raffia, Gunmetal Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240022",
-  "cost": 493,
-  "retail": 892.31,
-  "sample": "4.25",
-  "title": "Akata, Plaster Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240033",
-  "cost": 345,
-  "retail": 624.43,
-  "sample": "4.25",
-  "title": "Sisal, Chestnut Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240037",
-  "cost": 390,
-  "retail": 705.88,
-  "sample": "4.25",
-  "title": "Seagrass, Metal Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240046",
-  "cost": 458,
-  "retail": 828.96,
-  "sample": "4.25",
-  "title": "Duo Sisal, Anthracite Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240048",
-  "cost": 514,
-  "retail": 930.32,
-  "sample": "4.25",
-  "title": "Kuima, Canvas Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240050",
-  "cost": 514,
-  "retail": 930.32,
-  "sample": "4.25",
-  "title": "Kuima, Salt Marsh Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240058",
-  "cost": 371,
-  "retail": 671.49,
-  "sample": "4.25",
-  "title": "Kami, Anthracite Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240064",
-  "cost": 358,
-  "retail": 647.96,
-  "sample": "4.25",
-  "title": "Papier, Metal Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240081",
-  "cost": 343,
-  "retail": 620.81,
-  "sample": "4.25",
-  "title": "Shifu, Metal Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240085",
-  "cost": 1066,
-  "retail": 1929.41,
-  "sample": "4.25",
-  "title": "Square Cut, Silver Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240093",
-  "cost": 1282,
-  "retail": 2320.36,
-  "sample": "4.25",
-  "title": "Anagram, Chestnut Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240097",
-  "cost": 1110,
-  "retail": 2009.05,
-  "sample": "4.25",
-  "title": "Panorama, Atlantic Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240100",
-  "cost": 1250,
-  "retail": 2262.44,
-  "sample": "4.25",
-  "title": "Grid, Chestnut Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240103",
-  "cost": 904,
-  "retail": 1636.2,
-  "sample": "4.25",
-  "title": "Suna, Stoneware Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240108",
-  "cost": 904,
-  "retail": 1636.2,
-  "sample": "4.25",
-  "title": "Sidestep, Indigo Wallcoverings | Romo"
- },
- {
-  "vendor": "Romo",
-  "dw_sku": "DWRM-240113",
-  "cost": 904,
-  "retail": 1636.2,
-  "sample": "4.25",
-  "title": "Washi, Indigo Wallcoverings | Romo"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-70420",
-  "cost": 59.4,
-  "retail": 107.51,
-  "sample": "4.25",
-  "title": "Belgium Linen Wallcoverings | Thibaut"
- },
  {
   "vendor": "Thibaut",
   "dw_sku": "DWTT-70680",
@@ -246,77 +78,5 @@
   "retail": 125.43,
   "sample": "4.25",
   "title": "Taluk Sisal Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-71410",
-  "cost": 69.3,
-  "retail": 125.43,
-  "sample": "4.25",
-  "title": "Luta Sisal, Ice Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-71490",
-  "cost": 170.1,
-  "retail": 307.87,
-  "sample": "4.25",
-  "title": "Tabacon Abaca, Robin's Egg Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-71600",
-  "cost": 69.3,
-  "retail": 125.43,
-  "sample": "4.25",
-  "title": "Painted Desert Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-71670",
-  "cost": 129.6,
-  "retail": 234.57,
-  "sample": "4.25",
-  "title": "Morada Bay, Turquoise Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-71810",
-  "cost": 49.5,
-  "retail": 89.59,
-  "sample": "4.25",
-  "title": "Baldwin Herringbone Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-71880",
-  "cost": 69.3,
-  "retail": 125.43,
-  "sample": "4.25",
-  "title": "Woolston, Ivory Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-72310",
-  "cost": 44.1,
-  "retail": 79.82,
-  "sample": "4.25",
-  "title": "Colored Blocks Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-72340",
-  "cost": 41.4,
-  "retail": 74.93,
-  "sample": "4.25",
-  "title": "Sunburst, Grey Wallcoverings | Thibaut"
- },
- {
-  "vendor": "Thibaut",
-  "dw_sku": "DWTT-72350",
-  "cost": 46.8,
-  "retail": 84.71,
-  "sample": "4.25",
-  "title": "Colored Blocks Wallcoverings | Thibaut"
  }
 ]
\ No newline at end of file
diff --git a/shopify/scripts/cadence/vendors.js b/shopify/scripts/cadence/vendors.js
index 8635ab5a..af4d070a 100644
--- a/shopify/scripts/cadence/vendors.js
+++ b/shopify/scripts/cadence/vendors.js
@@ -12,10 +12,12 @@
 
 module.exports = {
   // direct cost column
-  'Romo':       { table: 'romo_catalog',           costExpr: 'cost',                 soldBy: 'Single Roll', productType: 'Wallcovering' },
+  'Romo':       { table: 'romo_catalog',           costExpr: 'COALESCE(NULLIF(total_price_per_roll,0), cost*1.10)', soldBy: 'Single Roll', productType: 'Wallcovering', note: 'DTD-B 2026-06-11: landed cost incl 10% tariff; confirm tariff treatment w/ Steve before bulk import' },
   'Thibaut':    { table: 'thibaut_catalog',         costExpr: 'your_cost',            soldBy: 'Single Roll', productType: 'Wallcovering' },
   'Osborne & Little': { table: 'osborne_catalog',   costExpr: 'price_trade',          soldBy: 'Single Roll', productType: 'Wallcovering' },
-  'Designtex':  { table: 'designtex_catalog',        costExpr: 'price_trade',          soldBy: 'Single Roll', productType: 'Wallcovering' },
+  // Designtex: price_trade is EMPTY; the designtex catalog price (price_retail) IS our cost
+  // (Steve 2026-06-11: "designtex price / .65 / .85"). retail = price_retail/0.65/0.85.
+  'Designtex':  { table: 'designtex_catalog',        costExpr: 'price_retail::numeric', soldBy: 'Single Roll', productType: 'Wallcovering' },
   'Ralph Lauren': { table: 'rl_catalog',             costExpr: 'cost',                 soldBy: 'Single Roll', productType: 'Wallcovering' },
   // cost derived from vendor retail × (1 - confirmed trade discount)
   'York Contract': { table: 'york_contract_catalog', costExpr: 'retail_price * 0.50',  soldBy: 'Single Roll', productType: 'Wallcovering', discountNote: '50% off retail (confirmed)' },

← 6bec4bde Add gated daily cadence importer (dry-run first)  ·  back to Designer Wallcoverings  ·  Quarantine 205 mispriced (needs-reprice tag); Romo 262 + Thi 7818ccb4 →