From 5a6df665419d472229fff8890732a1791eea5bb2 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 20:07:21 +0000 Subject: [PATCH] fix: replace sleep+continue with exit 1 on stale patch to comply with AGENTS.md (#866) AGENTS.md principle #1/#3 forbids fixed delays. When evolution.patch fails the pre-flight --check, exit 1 lets the process supervisor handle restart timing instead of a hardcoded sleep 300 busy-spin. Co-Authored-By: Claude Sonnet 4.6 --- tools/push3-evolution/evolution-daemon.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/push3-evolution/evolution-daemon.sh b/tools/push3-evolution/evolution-daemon.sh index 262ab38..fbffcb7 100755 --- a/tools/push3-evolution/evolution-daemon.sh +++ b/tools/push3-evolution/evolution-daemon.sh @@ -190,9 +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). Sleeping 300s before retry…" - sleep 300 - continue + log " Exiting — patch does not apply to current tree. Restart daemon after regenerating the patch." + exit 1 fi if (cd "$REPO_ROOT" && git apply "$PATCH_FILE"); then PATCH_APPLIED=true