[object Object]

← back to Beverlyhillsvideos

TK-11856 rc-propagation (OTHER): bhv-ig-6h run.sh exits with the IG poster rc

f97e8669d1753fc5a10ba47d2f1eb3a87e1eccda · 2026-09-26 09:22:37 -0700 · Steve

Exit-code ONLY, no behavior change (Steve ruling 2026-09-26 Q1/Q2): every step still runs as
before; the wrapper now exits with the first nonzero rc of its side-effecting step(s) instead of
swallowing it, so cron-fire-canary's exit corroboration can see a failed run. No heartbeat file added.
Revert: git -C /Users/macstudio3/Projects/beverlyhillsvideos revert <this sha>

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaiWjfgEuKQLTb5cdDreS3

Files touched

Diff

commit f97e8669d1753fc5a10ba47d2f1eb3a87e1eccda
Author: Steve <steve@designerwallcoverings.com>
Date:   Sat Sep 26 09:22:37 2026 -0700

    TK-11856 rc-propagation (OTHER): bhv-ig-6h run.sh exits with the IG poster rc
    
    Exit-code ONLY, no behavior change (Steve ruling 2026-09-26 Q1/Q2): every step still runs as
    before; the wrapper now exits with the first nonzero rc of its side-effecting step(s) instead of
    swallowing it, so cron-fire-canary's exit corroboration can see a failed run. No heartbeat file added.
    Revert: git -C /Users/macstudio3/Projects/beverlyhillsvideos revert <this sha>
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01YaiWjfgEuKQLTb5cdDreS3
---
 social/poster/run.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/social/poster/run.sh b/social/poster/run.sh
index ed4de71..d4ef7d7 100755
--- a/social/poster/run.sh
+++ b/social/poster/run.sh
@@ -13,9 +13,14 @@ if (( SLOT % 2 == 1 )); then KIND=store; else KIND=restaurant; fi
 LOG="social/poster/post.log"
 echo "----- $(date '+%Y-%m-%d %H:%M:%S %Z') · slot=$SLOT kind=$KIND -----" >> "$LOG"
 BHV_IG_KIND="$KIND" /opt/homebrew/bin/node social/poster/post-daily.mjs >> "$LOG" 2>&1
-echo "exit: $?" >> "$LOG"
+# TK-11856 rc-propagation (exit-code ONLY, no behavior change): capture the poster's rc BEFORE the
+# echo and exit with it at the end (the calendar rsync below still runs, best-effort, exactly as
+# before and is deliberately NOT counted). Was: always exit 0, so a failed IG post read green.
+POST_RC=$?
+echo "exit: $POST_RC" >> "$LOG"
 
 # Keep calendar.agentabrams.com current: push the updated ledgers to the prod calendar
 # (best-effort, non-blocking — the calendar reads these as its bundled fallback).
 rsync -az social/poster/ledger.jsonl social/poster/ledger-store.jsonl \
   root@45.61.58.125:/root/public-projects/calendar-agentabrams/data/ >> "$LOG" 2>&1 || true
+exit "$POST_RC"

← 2c0a3d1 auto-data-snapshot: 2026-09-26T08:19:11 (1 data files) — soc  ·  back to Beverlyhillsvideos  ·  auto-data-snapshot: 2026-09-26T12:14:18 (1 data files) — soc 82b5bef →