[object Object]

← back to Designer Wallcoverings

Durable one-shot launchd test-add (5:02pm, survives session close; self-removes)

7a10f8ec8b0590e0a79d49856e5b7d15a46004bd · 2026-06-11 16:29:27 -0700 · SteveStudio2

Files touched

Diff

commit 7a10f8ec8b0590e0a79d49856e5b7d15a46004bd
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Thu Jun 11 16:29:27 2026 -0700

    Durable one-shot launchd test-add (5:02pm, survives session close; self-removes)
---
 shopify/scripts/cadence/kravet-roll-testadd.sh | 33 ++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/shopify/scripts/cadence/kravet-roll-testadd.sh b/shopify/scripts/cadence/kravet-roll-testadd.sh
new file mode 100755
index 00000000..b491a8cf
--- /dev/null
+++ b/shopify/scripts/cadence/kravet-roll-testadd.sh
@@ -0,0 +1,33 @@
+#!/bin/zsh
+# Durable one-shot: add ONE Kravet roll variant (Entangle) as a live proof, verify, report to
+# CNCP + macOS notification. Fires via launchd at 17:02 (after the 00:00 UTC variant-cap reset),
+# independent of any Claude session. Self-removes after running.
+cd /Users/stevestudio2/Projects/Designer-Wallcoverings/shopify/scripts/cadence
+OUT=/tmp/kravet-roll-testadd.txt
+{
+  echo "Kravet roll TEST add — $(date '+%Y-%m-%d %-I:%M %p %Z')"
+  /usr/local/bin/node add-kravet-roll-variants.js --only 7422938939443 --commit --limit 1 2>&1 | grep -v NOTICE | tail -6
+  echo "--- live verify ---"
+  /usr/local/bin/node -e '
+const https=require("https"),fs=require("fs"),os=require("os");
+const env=fs.readFileSync(os.homedir()+"/Projects/secrets-manager/.env","utf8");
+const T=(env.match(/^SHOPIFY_ADMIN_TOKEN=(.*)$/m)||[])[1].replace(/[\x27"]/g,"").trim();
+const d=JSON.stringify({query:`{product(id:"gid://shopify/Product/7422938939443"){variants(first:10){nodes{title sku price inventoryPolicy}}}}`});
+const r=https.request({host:"designer-laboratory-sandbox.myshopify.com",path:"/admin/api/2024-10/graphql.json",method:"POST",headers:{"X-Shopify-Access-Token":T,"Content-Type":"application/json","Content-Length":Buffer.byteLength(d)}},x=>{let b="";x.on("data",c=>b+=c);x.on("end",()=>{JSON.parse(b).data.product.variants.nodes.forEach(v=>console.log(`  ${v.title} | ${v.sku} | $${v.price} | ${v.inventoryPolicy}`))})});r.write(d);r.end();
+'
+} > "$OUT" 2>&1
+
+# did a roll variant land?
+LANDED=$(grep -c "Single Roll" "$OUT")
+if [ "$LANDED" -gt 0 ]; then
+  /usr/bin/osascript -e 'display notification "Entangle roll variant added at $561 MAP — verify on the Kravet Rolls card" with title "Kravet roll TEST add ✓"' 2>/dev/null
+  /usr/bin/curl -s -X POST http://127.0.0.1:3333/api/wins -H 'Content-Type: application/json' \
+    -d '{"project":"designer-wallcoverings","title":"Kravet roll TEST add landed: Entangle @ $561 MAP","summary":"Proved the roll-variant add path live on Shopify after the cap reset; nightly bulk runner clears the ~2,028 backlog.","valueToday":"Mechanism verified end-to-end"}' >/dev/null 2>&1
+else
+  /usr/bin/osascript -e 'display notification "Test add did NOT land — check /tmp/kravet-roll-testadd.txt" with title "Kravet roll TEST add ✗"' 2>/dev/null
+fi
+
+# self-remove the launchd job (one-shot)
+/bin/launchctl bootout gui/$(id -u) /Users/stevestudio2/Library/LaunchAgents/com.steve.kravet-roll-testadd.plist 2>/dev/null
+/bin/rm -f /Users/stevestudio2/Library/LaunchAgents/com.steve.kravet-roll-testadd.plist 2>/dev/null
+cat "$OUT"

← c5d370e1 Durable launchd morning report for Kravet roll-variant runne  ·  back to Designer Wallcoverings  ·  Part 2: Schumacher cost handoff (DTD-B decoupled) — Mac2 exp 06a4f86b →