[object Object]

← back to Wallco Ai

cron-build-tifs.sh: only alarm on disk-guard abort (rc=2), not expected 404s

ecbba0fb99a582d72927ae468df73543651ca283 · 2026-06-02 09:05:24 -0700 · Steve Abrams

The ~408 designs with no source PNG fail every run (rc=1), which made the
wrapper log a misleading 'exited non-zero' nightly. Now rc=2 (disk abort) is
the only real warning; rc=1 logs as expected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit ecbba0fb99a582d72927ae468df73543651ca283
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Jun 2 09:05:24 2026 -0700

    cron-build-tifs.sh: only alarm on disk-guard abort (rc=2), not expected 404s
    
    The ~408 designs with no source PNG fail every run (rc=1), which made the
    wrapper log a misleading 'exited non-zero' nightly. Now rc=2 (disk abort) is
    the only real warning; rc=1 logs as expected.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 scripts/cron-build-tifs.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/cron-build-tifs.sh b/scripts/cron-build-tifs.sh
index af7a5b0..9478ec3 100755
--- a/scripts/cron-build-tifs.sh
+++ b/scripts/cron-build-tifs.sh
@@ -31,6 +31,13 @@ if ! flock -n 9; then
 fi
 
 echo "=== $(date -Is) wallco-tif nightly backfill start ===" >> "$LOG"
-python3 scripts/pilot-build-tifs.py --all --min-free-gb 15 --progress-every 500 >> "$LOG" 2>&1 || \
-  echo "$(date -Is) builder exited non-zero (disk guard or partial failures — see above)" >> "$LOG"
+rc=0
+python3 scripts/pilot-build-tifs.py --all --min-free-gb 15 --progress-every 500 >> "$LOG" 2>&1 || rc=$?
+# exit codes: 0=all built · 1=some unbuildable (missing-source 404s — EXPECTED,
+# a chronic ~408 designs have no source PNG on disk) · 2=disk-guard abort (real).
+if [ "$rc" = "2" ]; then
+  echo "$(date -Is) ⚠️  DISK-GUARD ABORT (rc=2) — free disk too low, backfill incomplete" >> "$LOG"
+elif [ "$rc" != "0" ]; then
+  echo "$(date -Is) ok (rc=$rc — some designs have no source image to TIF; expected)" >> "$LOG"
+fi
 echo "=== $(date -Is) wallco-tif nightly backfill done ===" >> "$LOG"

← bce674c Add nightly TIF backfill cron wrapper (cron-build-tifs.sh)  ·  back to Wallco Ai  ·  tif-gate C+D (DTD verdict 2026-06-02): correct the docs + ad 093259a →