[object Object]

← back to Designer Wallcoverings

Romo push: read durable worklist CSV; add run wrapper; CNCP-dated resume task for 2026-06-12

fe9e383a76e10134f9d6d7a39ca6448f793c6764 · 2026-06-11 11:10:34 -0700 · SteveStudio2

Files touched

Diff

commit fe9e383a76e10134f9d6d7a39ca6448f793c6764
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Thu Jun 11 11:10:34 2026 -0700

    Romo push: read durable worklist CSV; add run wrapper; CNCP-dated resume task for 2026-06-12
---
 TODO.md                                             |  2 ++
 .../data/romo-cost-backfill/run-romo-push.sh        | 21 +++++++++++++++++++++
 shopify/scripts/romo-add-roll-pricing.js            |  4 +++-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/TODO.md b/TODO.md
new file mode 100644
index 00000000..ba894464
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,2 @@
+## 📅 Scheduled
+- [ ] 📅 2026-06-12 — Resume Romo Single-Roll price push (158 products; blocked 06-11 by Shopify daily variant-creation limit). Run: `node ~/Projects/Designer-Wallcoverings/shopify/scripts/romo-add-roll-pricing.js --apply` (idempotent, skips done). Then cost-scrape the 339 uncosted. Worklists: shopify/scripts/data/romo-cost-backfill/
diff --git a/shopify/scripts/data/romo-cost-backfill/run-romo-push.sh b/shopify/scripts/data/romo-cost-backfill/run-romo-push.sh
new file mode 100644
index 00000000..1bee46cd
--- /dev/null
+++ b/shopify/scripts/data/romo-cost-backfill/run-romo-push.sh
@@ -0,0 +1,21 @@
+#!/bin/zsh
+# Resume the Romo Single-Roll pricing push. Idempotent. Runs daily at 9am via
+# launchd (com.steve.romo-roll-pricing) until all 158 land, then self-unloads.
+# Blocked 2026-06-11 by Shopify's daily variant-creation limit; resumes on reset.
+export PATH="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
+SCRIPT_DIR="$HOME/Projects/Designer-Wallcoverings/shopify/scripts"
+LOG="$SCRIPT_DIR/data/romo-cost-backfill/push.log"
+PLIST="$HOME/Library/LaunchAgents/com.steve.romo-roll-pricing.plist"
+LABEL="com.steve.romo-roll-pricing"
+
+echo "===== $(date) =====" >> "$LOG"
+OUT=$(/usr/local/bin/node "$SCRIPT_DIR/romo-add-roll-pricing.js" --apply 2>&1)
+echo "$OUT" >> "$LOG"
+
+# Self-unload once everything is done: a run with nothing left creates 0 and fails 0
+# (every product skipped because it already has a roll variant).
+if echo "$OUT" | grep -qE 'created=0 skipped=[0-9]+ failed=0'; then
+  echo "All Romo roll prices landed — unloading $LABEL" >> "$LOG"
+  /bin/launchctl bootout "gui/$(id -u)/$LABEL" 2>/dev/null
+  /bin/mv "$PLIST" "$PLIST.done" 2>/dev/null
+fi
diff --git a/shopify/scripts/romo-add-roll-pricing.js b/shopify/scripts/romo-add-roll-pricing.js
index 17e024a4..6253b88d 100644
--- a/shopify/scripts/romo-add-roll-pricing.js
+++ b/shopify/scripts/romo-add-roll-pricing.js
@@ -27,7 +27,9 @@ const os = require('os');
 const args = process.argv.slice(2);
 const APPLY = args.includes('--apply');
 const LIMIT = (() => { const i = args.indexOf('--limit'); return i >= 0 ? parseInt(args[i + 1], 10) : Infinity; })();
-const CSV = '/tmp/romo_push.csv';
+// durable worklist (survives reboot); fall back to the /tmp scratch copy
+const DURABLE_CSV = __dirname + '/data/romo-cost-backfill/romo-roll-push-pending-20260611.csv';
+const CSV = fs.existsSync(DURABLE_CSV) ? DURABLE_CSV : '/tmp/romo_push.csv';
 const TODAY = new Date().toISOString().slice(0, 10);
 
 const env = fs.readFileSync(os.homedir() + '/Projects/secrets-manager/.env', 'utf8');

← 75964c0c Romo per-unit pricing: repair 57 corrupt total_price_per_rol  ·  back to Designer Wallcoverings  ·  Stage launchd template for optional hands-off Romo push resu 430f4bcb →