← back to Dw Pitch Followup
refresh.sh: network-readiness guard before Claris auth — kills the RunAtLoad boot-race FATAL (Cody, yoloforever c4)
f8e1a7f58acc8cb3aa3926e8d0948911d57578fe · 2026-08-18 00:09:40 -0700 · steve
Files touched
Diff
commit f8e1a7f58acc8cb3aa3926e8d0948911d57578fe
Author: steve <steve@designerwallcoverings.com>
Date: Tue Aug 18 00:09:40 2026 -0700
refresh.sh: network-readiness guard before Claris auth — kills the RunAtLoad boot-race FATAL (Cody, yoloforever c4)
---
scripts/refresh.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/scripts/refresh.sh b/scripts/refresh.sh
index 305204e..48929b7 100755
--- a/scripts/refresh.sh
+++ b/scripts/refresh.sh
@@ -6,6 +6,15 @@ DIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$DIR"
NODE=/opt/homebrew/bin/node
echo "=== refresh $(date) ==="
+# Network-readiness guard: RunAtLoad fires this on boot BEFORE the network is up, which
+# FATALs build-lists.js on Claris ID (AWS Cognito) auth every reboot. Wait up to ~120s for
+# connectivity, then proceed regardless (never hang). (yoloforever cycle 4, Cody-caught.)
+n=0
+until curl -sS --max-time 4 -o /dev/null https://www.apple.com 2>/dev/null; do
+ n=$((n + 1))
+ [ "$n" -ge 24 ] && { echo "[refresh] network not up after ~120s — proceeding anyway"; break; }
+ sleep 5
+done
"$NODE" scripts/build-lists.js
# pre-triage hits the running server (owns the follow-up cache); non-fatal if it can't
"$NODE" scripts/pretriage.js || echo "[refresh] pretriage skipped/failed (non-fatal)"
← 9f1d378 auto-data-snapshot: 2026-08-17T20:02:38 (1 data files) — dat
·
back to Dw Pitch Followup
·
auto-data-snapshot: 2026-08-19T20:02:37 (1 data files) — dat 5f4bb6e →