← back to Ticket System
TK-11856 rc-propagation (EMAIL): ticket-morning-report exits nonzero when the digest send fails
8d85293861e9331de59b8eb6df1c4a146b0cbbbd · 2026-09-26 09:22:36 -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/ticket-system 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 8d85293861e9331de59b8eb6df1c4a146b0cbbbd
Author: Steve <steve@designerwallcoverings.com>
Date: Sat Sep 26 09:22:36 2026 -0700
TK-11856 rc-propagation (EMAIL): ticket-morning-report exits nonzero when the digest send fails
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/ticket-system revert <this sha>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YaiWjfgEuKQLTb5cdDreS3
---
morning-report.sh | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/morning-report.sh b/morning-report.sh
index 905f15a4..fb9b963a 100755
--- a/morning-report.sh
+++ b/morning-report.sh
@@ -12,10 +12,15 @@ TO="${REPORT_TO:-steve@designerwallcoverings.com}"
log(){ echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >> "$LOG"; }
log "=== morning report start ==="
+# TK-11856 rc-propagation (exit-code ONLY, no behavior change): same digest build + send + resumeit,
+# same log lines; a failed/impossible SEND (empty digest, missing george-send.sh, George not
+# success:true) now makes the script exit NONZERO at the end (was: always exit 0, so a dropped digest
+# read green). resumeit is backgrounded and NOT counted. Undo: git revert.
+SEND_RC=0
# 1) Build + send the digest
JSON="$("$NODE" morning-digest.js 2>>"$LOG")"
-if [ -z "$JSON" ]; then log "ERROR: digest builder produced no output"; else
+if [ -z "$JSON" ]; then log "ERROR: digest builder produced no output"; SEND_RC=1; else
SUBJECT="$(printf '%s' "$JSON" | jq -r .subject)"
BODY="$(printf '%s' "$JSON" | jq -r .html)"
COUNTS="$(printf '%s' "$JSON" | jq -rc .counts)"
@@ -24,9 +29,9 @@ if [ -z "$JSON" ]; then log "ERROR: digest builder produced no output"; else
RESP="$(george_send steve-office "$TO" "$SUBJECT" "$BODY")"
printf '%s' "$RESP" | grep -q '"success":true' \
&& log "email sent → $TO counts=$COUNTS" \
- || log "EMAIL FAILED → $TO resp=$RESP"
+ || { log "EMAIL FAILED → $TO resp=$RESP"; SEND_RC=1; }
else
- log "ERROR: george-send.sh missing"
+ log "ERROR: george-send.sh missing"; SEND_RC=1
fi
fi
@@ -41,4 +46,5 @@ else
log "resumeit skipped (iTerm2 not running)"
fi
-log "=== morning report done ==="
+log "=== morning report done (send_rc=$SEND_RC) ==="
+exit "$SEND_RC"
← 121b08b5 TK-11856 rc-propagation (RSYNC): ticket-gdrive-sync exits no
·
back to Ticket System
·
auto-data-snapshot: 2026-09-26T09:40:15 (1 data files) — tmp 6178c8c3 →