From 00dc3a61953cd9877fd5cd4450f223f19a254d71 Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 12 Mar 2026 20:08:38 +0000 Subject: [PATCH] fix: don't revert files during evolution runs Factory supervisor reverted OptimizerV3.sol during an active evolution run, killing all candidate scoring. Added evolution pipeline awareness to git best-practices: check for running evolve.sh before reverting dirty state. --- factory/best-practices/git.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/factory/best-practices/git.md b/factory/best-practices/git.md index 45d4e68..3f401d3 100644 --- a/factory/best-practices/git.md +++ b/factory/best-practices/git.md @@ -24,6 +24,13 @@ - `git worktree add` fails if target directory exists (even empty). Remove first. - Many old branches exist locally (100+). Normal — don't bulk-delete. +## Evolution Pipeline +- The evolution pipeline (`tools/push3-evolution/evolve.sh`) temporarily modifies + `onchain/src/OptimizerV3.sol` and `onchain/src/OptimizerV3Push3.sol` during runs. +- **DO NOT revert these files while evolution is running** (check: `pgrep -f evolve.sh`). +- If `/tmp/evolution.pid` exists and the PID is alive, the dirty state is intentional. +- Evolution will restore the files when it finishes. + ## Lessons Learned - NEVER delete remote branches before confirming merge. Close PR, rebase locally, force-push if needed. - Stale rebase caused 5h factory stall once (2026-03-11). Auto-heal added to dev-agent.