From 57b83b6fe9cfabfcc53da289c1985aff9ac4df6a Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 13:28:13 +0000 Subject: [PATCH] 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"