← back to Allnewsdaily
push-videos: wait for network before Cognito/rsync (boot-race exit=255, TK-12250)
40f706f72fdace2f1f0fc87850762326ae280e60 · 2026-09-25 14:05:20 -0700 · Steve Abrams
Sibling of TK-12257 (ads-dashboard-fmpro). Mac2 reboot at 11:52:25 PDT (18:52Z)
fired RunAtLoad before the network route was up, so sync-videos.mjs's fetch and
the rsync/ssh to Kamatera died with "fetch failed" / "No route to host" -> exit
255. Reuses the shared boot-grace.sh helper (bounded network wait inside the
900s post-boot grace window; a genuine outage still proceeds and FAILs).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hkjf1KKfdbgE7fNCSHt8jZ
Files touched
Diff
commit 40f706f72fdace2f1f0fc87850762326ae280e60
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Sep 25 14:05:20 2026 -0700
push-videos: wait for network before Cognito/rsync (boot-race exit=255, TK-12250)
Sibling of TK-12257 (ads-dashboard-fmpro). Mac2 reboot at 11:52:25 PDT (18:52Z)
fired RunAtLoad before the network route was up, so sync-videos.mjs's fetch and
the rsync/ssh to Kamatera died with "fetch failed" / "No route to host" -> exit
255. Reuses the shared boot-grace.sh helper (bounded network wait inside the
900s post-boot grace window; a genuine outage still proceeds and FAILs).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hkjf1KKfdbgE7fNCSHt8jZ
---
scripts/push-videos.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/scripts/push-videos.sh b/scripts/push-videos.sh
index b2c5931..fda2475 100755
--- a/scripts/push-videos.sh
+++ b/scripts/push-videos.sh
@@ -7,6 +7,19 @@ cd "$(dirname "$0")/.." # allnewsdaily repo root
PROD="${PROD_HOST:-root@45.61.58.125}"
REMOTE="/root/Projects/allnewsdaily/data/videos.json"
+# Boot race (TK-12250, sibling of TK-12257): launchd RunAtLoad fires right after a
+# reboot, before the network interface/route is up, so the API fetch + ssh/rsync die
+# with "fetch failed" / "No route to host" -> exit 255. Wait (bounded) for network
+# using the shared helper before doing any real work. Post-grace-window, a real
+# outage still proceeds and FAILs normally (never masks a genuine problem).
+# shellcheck source=/dev/null
+source "$HOME/.claude/skills/_shared/boot-grace.sh"
+boot_grace_wait network
+if [ "$BOOT_GRACE_ACTION" = "boot_grace" ]; then
+ echo "[videos-push] $BOOT_GRACE_REASON — skipping this RunAtLoad fire, next StartCalendarInterval tick will run normally"
+ exit 0
+fi
+
NODE="$(command -v node || true)"
for cand in /opt/homebrew/bin/node /usr/local/bin/node /usr/bin/node; do
[ -z "$NODE" ] && [ -x "$cand" ] && NODE="$cand"
← c1ab0a9 chore: commit code deployed in 2026-09-15 fleet push
·
back to Allnewsdaily
·
(newest)