[object Object]

← back to Dw Rotation Activator

TK-11856 rc-propagation (SHOPIFY): rotation-activator drain.sh exits with activator rc (then prune rc)

90be0b4830ea37811b8055b8ac8be9417a1b536e · 2026-09-26 09:22:12 -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/dw-rotation-activator 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 90be0b4830ea37811b8055b8ac8be9417a1b536e
Author: Steve <steve@designerwallcoverings.com>
Date:   Sat Sep 26 09:22:12 2026 -0700

    TK-11856 rc-propagation (SHOPIFY): rotation-activator drain.sh exits with activator rc (then prune 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/dw-rotation-activator revert <this sha>
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01YaiWjfgEuKQLTb5cdDreS3
---
 drain.sh | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drain.sh b/drain.sh
index bc0bd01..00b47db 100755
--- a/drain.sh
+++ b/drain.sh
@@ -39,7 +39,16 @@ echo "[$(ts)] rotation-activate end rc=$RC" >>"$LOG"
 # schedule (Steve's rule — the daily cadence must never list already-live items).
 # Local, reversible, idempotent; a no-op when the snapshot is already clean.
 PRUNE="$HOME/Projects/dw-activation-calendar/scripts/prune-active.js"
+PRUNE_RC=0
 if [ -f "$PRUNE" ]; then
   /opt/homebrew/bin/node "$PRUNE" >>"$LOG" 2>&1
-  echo "[$(ts)] cadence prune-active rc=$?" >>"$LOG"
+  PRUNE_RC=$?
+  echo "[$(ts)] cadence prune-active rc=$PRUNE_RC" >>"$LOG"
 fi
+
+# TK-11856 rc-propagation (exit-code ONLY, no behavior change): prune still runs after a failed
+# activation exactly as before; we only exit with the first nonzero rc (activator first, then prune)
+# instead of the trailing echo's 0, so a failed Shopify activation is a nonzero launchd exit.
+# The EXIT trap still frees the lock. Undo: git revert.
+if [ "$RC" -ne 0 ]; then exit "$RC"; fi
+exit "$PRUNE_RC"

← f16fc54 TK-11786: mirror tokiwa/tokiwa usa into leakGuard PL_LEAK_HA  ·  back to Dw Rotation Activator  ·  (newest)