[object Object]

← back to Designerwallcoverings

maharam-onboard: dedicated daily drip runner + launchd plist (draft) — trickle 1429 sample-only wallcoverings daily, backlog-metered, task-spec titles + PG write-back

18333b809b934ba597e57929b7cb94c1b68200da · 2026-07-26 20:12:00 -0700 · Steve Abrams

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

Files touched

Diff

commit 18333b809b934ba597e57929b7cb94c1b68200da
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sun Jul 26 20:12:00 2026 -0700

    maharam-onboard: dedicated daily drip runner + launchd plist (draft) — trickle 1429 sample-only wallcoverings daily, backlog-metered, task-spec titles + PG write-back
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 .../com.steve.dw-maharam-daily.plist               | 27 ++++++++++++++++++
 scripts/maharam-onboard/maharam-daily-drip.sh      | 33 ++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/scripts/maharam-onboard/com.steve.dw-maharam-daily.plist b/scripts/maharam-onboard/com.steve.dw-maharam-daily.plist
new file mode 100644
index 0000000..d191ce2
--- /dev/null
+++ b/scripts/maharam-onboard/com.steve.dw-maharam-daily.plist
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>Label</key>
+  <string>com.steve.dw-maharam-daily</string>
+  <key>ProgramArguments</key>
+  <array>
+    <string>/bin/bash</string>
+    <string>/Users/macstudio3/Projects/designerwallcoverings/scripts/maharam-onboard/maharam-daily-drip.sh</string>
+  </array>
+  <!-- Once/day at 05:30 local — grabs fresh 'backlog' budget headroom before the 6am hourly cadence.
+       Task-spec titles + PG-first write-back; drains the 1,429 Maharam wallcoverings as a daily trickle.
+       DRAFT — install to ~/Library/LaunchAgents/ + launchctl bootstrap (Steve-gated). -->
+  <key>StartCalendarInterval</key>
+  <dict>
+    <key>Hour</key><integer>5</integer>
+    <key>Minute</key><integer>30</integer>
+  </dict>
+  <key>StandardOutPath</key>
+  <string>/tmp/dw-maharam-daily.launchd.out</string>
+  <key>StandardErrorPath</key>
+  <string>/tmp/dw-maharam-daily.launchd.err</string>
+  <key>RunAtLoad</key>
+  <false/>
+</dict>
+</plist>
diff --git a/scripts/maharam-onboard/maharam-daily-drip.sh b/scripts/maharam-onboard/maharam-daily-drip.sh
new file mode 100755
index 0000000..5f13238
--- /dev/null
+++ b/scripts/maharam-onboard/maharam-daily-drip.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Maharam quote-only onboarding — DEDICATED DAILY DRIP (Steve "trickle in cadence daily" 2026-07-26).
+# Once/day: create up to DAILY_CAP sample-only DRAFTS (task-spec titles "Pattern Color | Maharam",
+# custom+dwc mfr metafields, global.width, ≥1 image, PG-FIRST shopify_product_id write-back), then
+# go-live those drafts (activate + inventory 2026 + 12 channels, Google excluded) so they auto-join
+# the maharam-wallcoverings smart collection. Resumable + idempotent (skips live/created SKUs).
+# Metered by the shared 'backlog' variant budget (budget.cjs) — never bursts, cooperates with the
+# 5-field backlog drain. Held OUT of the shared hourly cadence via vendors.js mahDrip:true.
+set -u
+# launchd runs with a minimal PATH — node (/usr/local/bin) + psql (homebrew) aren't on it.
+export PATH="/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/opt/postgresql@14/bin:$PATH"
+DIR="$HOME/Projects/designerwallcoverings/scripts/maharam-onboard"
+LOG="/tmp/dw-maharam-daily.log"
+KILL="$HOME/.dw-fixer-stop"
+DAILY_CAP="${MAHARAM_DAILY_CAP:-100}"     # ceiling; the 'backlog' budget caps the real number lower
+exec >>"$LOG" 2>&1
+echo "═══════ maharam-daily-drip $(date '+%F %T')  cap=$DAILY_CAP ═══════"
+[ -f "$KILL" ] && { echo "kill-switch $KILL present — skip"; exit 0; }
+cd "$DIR" || { echo "FATAL: no $DIR"; exit 1; }
+
+# refresh payloads from staging (cheap, idempotent — reflects any staging edits)
+node build-payloads.mjs || { echo "build-payloads failed"; exit 1; }
+
+# 1) create drafts (budget-metered via 'backlog'; PG-first write-back inside)
+node create-drafts.mjs --apply --limit="$DAILY_CAP"
+# 2) activate today's (and any leftover) drafts → auto-join the smart collection
+node go-live.mjs --apply --limit="$DAILY_CAP"
+
+# quick tally
+REMAIN=$(psql "postgresql:///dw_unified?host=/tmp" -tAc \
+  "SELECT count(*) FROM maharam_catalog WHERE proposed_dw_type='Wallcovering' AND dedup_skip=false AND activation_ready=true AND coalesce(shopify_product_id::text,'')='';" 2>/dev/null || echo '?')
+echo "maharam wallcoverings still un-onboarded (no shopify_product_id): $REMAIN"
+echo "═══════ done $(date '+%F %T') ═══════"

← 6bae8c2 chore: lint, refactor, v0.1.1 (session close) — execFileSync  ·  back to Designerwallcoverings  ·  auto-save: 2026-07-26T20:15:38 (2 files) — package-lock.json 3dbd602 →