[object Object]

← back to Dw Marketing Reels

TK-10395: wire push-alert (CNCP card + George email to steve-office) on nightly IG-publish failure [Steve APPROVED: PUSH OPEN]

da29f0a3d62227db0427274f1e738c90e5f15ca6 · 2026-08-10 10:55:04 -0700 · cre-agent

Files touched

Diff

commit da29f0a3d62227db0427274f1e738c90e5f15ca6
Author: cre-agent <steve@designerwallcoverings.com>
Date:   Mon Aug 10 10:55:04 2026 -0700

    TK-10395: wire push-alert (CNCP card + George email to steve-office) on nightly IG-publish failure [Steve APPROVED: PUSH OPEN]
---
 scripts/cron-run.sh | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/scripts/cron-run.sh b/scripts/cron-run.sh
index 21d4836..72515da 100755
--- a/scripts/cron-run.sh
+++ b/scripts/cron-run.sh
@@ -29,4 +29,20 @@ fi
 # when the IG post fails, which is how the 2207076 failure went silently green. This makes the
 # nightly job report a non-zero exit (visible in launchd + reels-cron.log) when an ARMED IG post
 # did not actually land — incl. a 2207076 that survived the retry. Read-only, no network.
-node scripts/check-publish-status.mjs || { echo "IG PUBLISH CHECK FAILED — armed reel did not land (see reels.json publish.instagram)"; exit 1; }
+# On failure it also PUSHES an alert (Steve-approved 2026-08-10 "PUSH OPEN"): CNCP parking-lot
+# card + George email to steve-office, so a silent no-post surfaces without reading the log.
+if ! node scripts/check-publish-status.mjs; then
+  MSG="TK-10395: nightly IG reel publish did NOT land (armed) on the $(date +%H:%M) run — likely a 2207076 that survived the 3x retry (possibly persistent -> gated Option C: IG re-auth). See reels.json publish.instagram + reels-cron.log."
+  echo "IG PUBLISH CHECK FAILED — $MSG"
+  curl -sS --max-time 10 "${CNCP_URL:-http://localhost:3333}/api/parking-lot" \
+    -H 'Content-Type: application/json' \
+    -d "{\"url\":\"http://marketing.designerwallcoverings.com/\",\"note\":\"$MSG\"}" \
+    >/dev/null 2>&1 && echo "CNCP card posted" || echo "CNCP post failed (non-fatal)"
+  if [ -f "$HOME/.claude/skills/_shared/george-send.sh" ]; then
+    . "$HOME/.claude/skills/_shared/george-send.sh"
+    george_send steve-office "${REELS_ALERT_TO:-steve@designerwallcoverings.com}" \
+      "⚠ DW nightly reel IG publish FAILED — $(date +%Y-%m-%d)" \
+      "<p>$MSG</p>" >/dev/null 2>&1 && echo "George alert sent" || echo "George send failed (non-fatal)"
+  fi
+  exit 1
+fi

← 7ad29bf TK-10395: fix retry/timeout race (client 90s->240s) + wire p  ·  back to Dw Marketing Reels  ·  TK-10395: monitor fails loud on armed 'posted-unverified' (w 060af89 →