From 57b83b6fe9cfabfcc53da289c1985aff9ac4df6a Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 13:28:13 +0000 Subject: [PATCH 1/5] fix: evolution.patch has no apply-validation step in CI or evolve.sh (#866) Co-Authored-By: Claude Sonnet 4.6 --- .woodpecker/ci.yml | 19 +++++++++++++++++++ tools/push3-evolution/evolution-daemon.sh | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/.woodpecker/ci.yml b/.woodpecker/ci.yml index 7f14b68..ae4b9dd 100644 --- a/.woodpecker/ci.yml +++ b/.woodpecker/ci.yml @@ -82,6 +82,25 @@ steps: fi ' + - name: validate-evolution-patch + image: registry.niovi.voyage/harb/node-ci:latest + when: + - event: pull_request + path: + include: + - onchain/** + - tools/push3-evolution/** + commands: + - | + bash -c ' + set -euo pipefail + if ! git apply --check tools/push3-evolution/evolution.patch; then + echo "ERROR: evolution.patch needs regeneration — see tools/push3-evolution/evolution.conf" >&2 + exit 1 + fi + echo "evolution.patch applies cleanly." + ' + - name: node-quality image: registry.niovi.voyage/harb/node-ci:latest environment: diff --git a/tools/push3-evolution/evolution-daemon.sh b/tools/push3-evolution/evolution-daemon.sh index 7dbf8cc..1e969fe 100755 --- a/tools/push3-evolution/evolution-daemon.sh +++ b/tools/push3-evolution/evolution-daemon.sh @@ -188,6 +188,11 @@ while true; do PATCH_APPLIED=false if [ "$HAS_PATCH" = "true" ]; then 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)." + continue + fi if (cd "$REPO_ROOT" && git apply "$PATCH_FILE"); then PATCH_APPLIED=true log " Patches applied OK" From 9f5aaccd63b75a41f186246670281a7453e39bae Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 13:57:30 +0000 Subject: [PATCH 2/5] ci: retrigger after infra failure (#866) From acda1f72bb9c1446296772d0a0a93c6a72da21cf Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 14:27:21 +0000 Subject: [PATCH 3/5] 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 --- tools/push3-evolution/evolution-daemon.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/push3-evolution/evolution-daemon.sh b/tools/push3-evolution/evolution-daemon.sh index 1e969fe..262ab38 100755 --- a/tools/push3-evolution/evolution-daemon.sh +++ b/tools/push3-evolution/evolution-daemon.sh @@ -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 From 0fa80de0b97c376defcfe0a1e58ba8027688e981 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 18:09:44 +0000 Subject: [PATCH 4/5] ci: retrigger after infra failure (#866) From 5a6df665419d472229fff8890732a1791eea5bb2 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 20:07:21 +0000 Subject: [PATCH 5/5] 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