← back to Fentucci Naturals
TK-11664: fix launchd-PATH blind spot in fentucci go-live cadence (psql not found, 18 crashed tranches)
ce29b0e76d1a8981b16d561de7ad9e7de93c9e2e · 2026-09-17 15:46:56 -0700 · Steve Abrams
launchd runs com.steve.fentucci-golive-cadence with the minimal PATH
(/usr/bin:/bin:/usr/sbin:/sbin — no homebrew), so go-live.py's bare 'psql'
settlement_map/pg_activate subprocess calls died with FileNotFoundError
BEFORE processing any product. Every scheduled tranche 2026-07-28..2026-09-15
(18 runs) crashed identically; golive-done.jsonl stalled at 2/504 and 502
drafts were left outside this gated path — 462 of them flipped ACTIVE via the
rotation activator's quotes-tag exemption instead, still carrying the $0.00
'Per Yard' placeholder that go-live.py step 3a would have deleted (the TK-11635
population). Mirrors the proven Osborne-class PATH fix already in
Designer-Wallcoverings run-cadence-hourly.sh (launchd preflight linter 2026-06-18).
Dry-run proof: with the fix, settlement_map resolves (502 to process, first
3 = DWFN-100003..5); with the old minimal PATH it still crashes. No Shopify
write fired by this commit (go-live --apply remains gated); revert with
git revert.
Files touched
M scripts/cadence-golive.sh
Diff
commit ce29b0e76d1a8981b16d561de7ad9e7de93c9e2e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Sep 17 15:46:56 2026 -0700
TK-11664: fix launchd-PATH blind spot in fentucci go-live cadence (psql not found, 18 crashed tranches)
launchd runs com.steve.fentucci-golive-cadence with the minimal PATH
(/usr/bin:/bin:/usr/sbin:/sbin — no homebrew), so go-live.py's bare 'psql'
settlement_map/pg_activate subprocess calls died with FileNotFoundError
BEFORE processing any product. Every scheduled tranche 2026-07-28..2026-09-15
(18 runs) crashed identically; golive-done.jsonl stalled at 2/504 and 502
drafts were left outside this gated path — 462 of them flipped ACTIVE via the
rotation activator's quotes-tag exemption instead, still carrying the $0.00
'Per Yard' placeholder that go-live.py step 3a would have deleted (the TK-11635
population). Mirrors the proven Osborne-class PATH fix already in
Designer-Wallcoverings run-cadence-hourly.sh (launchd preflight linter 2026-06-18).
Dry-run proof: with the fix, settlement_map resolves (502 to process, first
3 = DWFN-100003..5); with the old minimal PATH it still crashes. No Shopify
write fired by this commit (go-live --apply remains gated); revert with
git revert.
---
scripts/cadence-golive.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/scripts/cadence-golive.sh b/scripts/cadence-golive.sh
index 39db730..7da26d2 100755
--- a/scripts/cadence-golive.sh
+++ b/scripts/cadence-golive.sh
@@ -17,6 +17,17 @@ export SHOPIFY_ADMIN_TOKEN
# which the narrow SHOPIFY_ADMIN_TOKEN does not carry.
SHOPIFY_FULL_ACCESS_TOKEN=$(grep '^SHOPIFY_FULL_ACCESS_TOKEN=' "$HOME/Projects/secrets-manager/.env" | cut -d= -f2- | tr -d '"')
export SHOPIFY_FULL_ACCESS_TOKEN
+# TK-11664 blind-spot fix: launchd runs this job with the minimal PATH
+# (/usr/bin:/bin:/usr/sbin:/sbin) — no /opt/homebrew/bin — so the bare `psql`
+# subprocess calls in go-live.py (settlement_map / pg_activate) died with
+# FileNotFoundError BEFORE any product was processed. 18 tranches crashed this
+# way (2026-07-28 .. 2026-09-15, "FileNotFoundError: ... 'psql'"), leaving 502/504
+# products stranded in DRAFT outside this gated path (462 of them flipped ACTIVE
+# through the rotation activator's `quotes` exemption instead, still carrying the
+# $0.00 "Per Yard" placeholder go-live.py would have deleted). Same Osborne-class
+# launchd-PATH bug already fixed in run-cadence-hourly.sh; mirrored verbatim here.
+# Reversible: delete this line to restore the old behavior (and the crash).
+export PATH="/opt/homebrew/bin:/opt/homebrew/opt/postgresql@14/bin:$PATH"
{
echo "=== fentucci go-live tranche $(date '+%Y-%m-%d %H:%M:%S') ==="
cd "$ROOT" && python3 scripts/go-live.py --apply --limit 40
← 8805ceb auto-data-snapshot: 2026-09-17T14:12:57 (1 data files) — dat
·
back to Fentucci Naturals
·
TK-11664: propagate cadence exit codes (kill the false-green 8b8222e →