From acab082db282d18d146320eb24b7420269fc94c7 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 25 Mar 2026 00:18:56 +0800 Subject: [PATCH] fix: prevent early-stabilize from overriding FORCE_INNOVATION When FORCE_INNOVATION=true is set, the early-stabilize heuristic was incorrectly overriding it for cycles 1-5. This adds a flag to preserve the explicit user intent. Fixes regression in v1.39.0 where FORCE_INNOVATION env var was being ignored in favor of early-stabilize auto-detection. --- src/gep/strategy.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gep/strategy.js b/src/gep/strategy.js index c35a12a..d754ffb 100644 --- a/src/gep/strategy.js +++ b/src/gep/strategy.js @@ -87,16 +87,21 @@ function resolveStrategy(opts) { var name = String(process.env.EVOLVE_STRATEGY || 'balanced').toLowerCase().trim(); // Backward compatibility: FORCE_INNOVATION=true maps to 'innovate' + var forceInnovation = false; if (!process.env.EVOLVE_STRATEGY) { var fi = String(process.env.FORCE_INNOVATION || process.env.EVOLVE_FORCE_INNOVATION || '').toLowerCase(); - if (fi === 'true') name = 'innovate'; + if (fi === 'true') { + name = 'innovate'; + forceInnovation = true; // Mark that user explicitly requested innovation + } } // Auto-detection: when no explicit strategy is set (defaults to 'balanced'), // apply heuristics inspired by Echo-MingXuan's "fix first, innovate later" pattern. + // NOTE: Don't override if user explicitly set FORCE_INNOVATION=true var isDefault = !process.env.EVOLVE_STRATEGY || name === 'balanced' || name === 'auto'; - if (isDefault) { + if (isDefault && !forceInnovation) { // Early-stabilize: first 5 cycles should focus on fixing existing issues. var cycleCount = _readCycleCount(); if (cycleCount > 0 && cycleCount <= 5) {