← back to Designerwallcoverings
Stout daily-drip wrapper + plist (draft, mirrors Maharam TK-00060; gated install memo in pending-approval)
fed35c95eecc3edc0af1ab6ac98b0377027b7a38 · 2026-07-27 16:21:06 -0700 · Steve Abrams
Files touched
A scripts/stout-onboard/com.steve.dw-stout-daily.plistA scripts/stout-onboard/stout-daily-drip.sh
Diff
commit fed35c95eecc3edc0af1ab6ac98b0377027b7a38
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 27 16:21:06 2026 -0700
Stout daily-drip wrapper + plist (draft, mirrors Maharam TK-00060; gated install memo in pending-approval)
---
.../stout-onboard/com.steve.dw-stout-daily.plist | 28 ++++++++++++++++
scripts/stout-onboard/stout-daily-drip.sh | 39 ++++++++++++++++++++++
2 files changed, 67 insertions(+)
diff --git a/scripts/stout-onboard/com.steve.dw-stout-daily.plist b/scripts/stout-onboard/com.steve.dw-stout-daily.plist
new file mode 100644
index 0000000..236ba41
--- /dev/null
+++ b/scripts/stout-onboard/com.steve.dw-stout-daily.plist
@@ -0,0 +1,28 @@
+<?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-stout-daily</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>/bin/bash</string>
+ <string>/Users/macstudio3/Projects/designerwallcoverings/scripts/stout-onboard/stout-daily-drip.sh</string>
+ </array>
+ <!-- Once/day at 05:35 local (5 min after Maharam's 05:30 so they don't both grab budget at the same
+ instant) - drains the 154 remaining Stout Textiles wallcoverings as a daily trickle via its own
+ finite 'stout' budget category. Idempotent + resumable.
+ DRAFT - install to ~/Library/LaunchAgents/ + launchctl bootstrap (Steve-gated). See install memo. -->
+ <key>StartCalendarInterval</key>
+ <dict>
+ <key>Hour</key><integer>5</integer>
+ <key>Minute</key><integer>35</integer>
+ </dict>
+ <key>StandardOutPath</key>
+ <string>/tmp/dw-stout-daily.launchd.out</string>
+ <key>StandardErrorPath</key>
+ <string>/tmp/dw-stout-daily.launchd.err</string>
+ <key>RunAtLoad</key>
+ <false/>
+</dict>
+</plist>
diff --git a/scripts/stout-onboard/stout-daily-drip.sh b/scripts/stout-onboard/stout-daily-drip.sh
new file mode 100755
index 0000000..165b5f8
--- /dev/null
+++ b/scripts/stout-onboard/stout-daily-drip.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+# Stout Textiles wallcovering onboard — DEDICATED DAILY DRIP (mirrors the approved Maharam pattern).
+# Once/day: create up to DAILY_CAP sample-only DRAFTS (titles "Pattern Color | Stout Textiles",
+# custom+dwc mfr metafields, global.width, >=1 image, settlement-gated, PG-FIRST shopify_product_id
+# write-back), then go-live those drafts (activate + inventory 2026 + 12 channels, Google EXCLUDED
+# per the $4.25 GMC-leak rule) so they auto-join the stout-wallcoverings smart collection
+# (rule vendor = "Stout Textiles"). Resumable + idempotent (skips live/created SKUs).
+# 154 remaining -> ~2 days at 100/day.
+#
+# Metered by its OWN finite 'stout' variant-budget category (budget.cjs), NOT the shared 'backlog'
+# category (which is drained daily by the 5-field backfill and granted Stout 0/day — the exact bug
+# TK-00060 fixed for Maharam). The 'stout' category is gated behind the budget.cjs edit in the
+# install memo; until that lands this wrapper falls back to 'backlog' and will no-op on 0 headroom.
+set -uo pipefail
+export PATH="/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/opt/postgresql@14/bin:$PATH"
+export DW_STOUT_BUDGET="${DW_STOUT_BUDGET:-stout}" # own finite category once budget.cjs adds it
+DIR="$HOME/Projects/designerwallcoverings/scripts/stout-onboard"
+LOG="/tmp/dw-stout-daily.log"
+KILL="$HOME/.dw-fixer-stop"
+DAILY_CAP="${STOUT_DAILY_CAP:-100}"
+exec >>"$LOG" 2>&1
+echo "======= stout-daily-drip $(date '+%F %T') cap=$DAILY_CAP budget=$DW_STOUT_BUDGET ======="
+[ -f "$KILL" ] && { echo "kill-switch $KILL present - skip"; exit 0; }
+cd "$DIR" || { echo "FATAL: no $DIR"; exit 1; }
+
+# refresh payloads from staging (cheap, idempotent)
+node build-payloads.mjs || { echo "build-payloads failed"; exit 1; }
+# re-run settlement gate so any new payloads are verdicted before go-live re-gates on it
+node settlement-gate.mjs || { echo "settlement-gate failed"; exit 1; }
+
+# 1) create drafts (budget-metered; PG-first write-back). Budget-exhausted = clean exit 0.
+node create-drafts.mjs --apply --limit="$DAILY_CAP" || { echo "create-drafts failed (rc=$?)"; exit 1; }
+# 2) activate today's (and any leftover) drafts -> auto-join the smart collection
+node go-live.mjs --apply --limit="$DAILY_CAP" || { echo "go-live failed (rc=$?)"; exit 1; }
+
+REMAIN=$(psql "postgresql:///dw_unified?host=/tmp" -tAc \
+ "SELECT count(*) FROM stout_catalog WHERE coalesce(shopify_product_id::text,'')='';" 2>/dev/null || echo '?')
+echo "stout rows still un-onboarded (no shopify_product_id): $REMAIN"
+echo "======= done $(date '+%F %T') ======="
← 28920ac TK-00060: contrarian FIX-FIRST fixes on maharam budget (roun
·
back to Designerwallcoverings
·
auto-save: 2026-07-27T16:21:58 (2 files) — scripts/sample-sp 039ce33 →