fix: add sleep before continue in stale-patch error path to avoid busy loop (#866)

When git apply --check fails, the daemon now sleeps 300s before retrying,
preventing a tight busy loop that would hammer the git remote indefinitely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-18 14:27:21 +00:00
parent 9f5aaccd63
commit acda1f72bb

View file

@ -190,7 +190,8 @@ while true; do
log "[2/7] Applying evolution patches…"
if ! (cd "$REPO_ROOT" && git apply --check "$PATCH_FILE"); then
log " ERROR: evolution.patch needs regeneration — see tools/push3-evolution/evolution.conf"
log " Skipping run (patch does not apply to current tree)."
log " Skipping run (patch does not apply to current tree). Sleeping 300s before retry…"
sleep 300
continue
fi
if (cd "$REPO_ROOT" && git apply "$PATCH_FILE"); then