[HYBRID-v3] architect handoff + retry policy 5x/120s
lint / hygiene (push) Failing after 49s
standard / check (push) Successful in 13s
lint / hygiene (pull_request) Failing after 35s
standard / check (pull_request) Successful in 35s

This commit is contained in:
architect committed 2026-12-04 00:08:29 +03:00
1 parent f1d88de14e
commit b8efe51b1b
2 files changed
+135

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# retry.sh — 5 attempts, 120s between, for transport failures only.
# usage: retry.sh <cmd> [args...]
set -u
n=0
max=5
while [ "$n" -lt "$max" ]; do
n=$((n+1))
echo "[retry] attempt $n/$max: $*" >&2
if "$@"; then
echo "[retry] success on attempt $n" >&2
exit 0
fi
if [ "$n" -lt "$max" ]; then
sleep 120
fi
done
echo "[retry] failed after $max attempts" >&2
exit 1