claude-evolve 1.6.18 → 1.6.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/claude-evolve-worker +14 -11
- package/lib/ai-cli.sh +2 -1
- package/package.json +1 -1
package/bin/claude-evolve-worker
CHANGED
|
@@ -26,21 +26,18 @@ TERMINATION_SIGNAL=""
|
|
|
26
26
|
cleanup_on_exit() {
|
|
27
27
|
if [[ -n "$CURRENT_CANDIDATE_ID" ]]; then
|
|
28
28
|
echo "[WORKER-$$] Worker terminated while processing $CURRENT_CANDIDATE_ID" >&2
|
|
29
|
-
#
|
|
29
|
+
# Grab current status; only reset if it is not already a failure or complete
|
|
30
30
|
echo "[WORKER-$$] Determining status before resetting" >&2
|
|
31
31
|
"$PYTHON_CMD" -c "
|
|
32
32
|
import sys
|
|
33
33
|
sys.path.insert(0, '$SCRIPT_DIR/..')
|
|
34
34
|
from lib.evolution_csv import EvolutionCSV
|
|
35
35
|
csv = EvolutionCSV('$FULL_CSV_PATH')
|
|
36
|
-
# Acquire lock and read current status safely
|
|
37
36
|
info = csv.get_candidate_info('$CURRENT_CANDIDATE_ID')
|
|
38
|
-
|
|
37
|
+
status = info.get('status', '').lower() if info else ''
|
|
38
|
+
# Do not reset if already failed, failed-ai-retry, or complete
|
|
39
|
+
if status and status not in ('complete', 'failed', 'failed-ai-retry', 'failed-parent-missing'):
|
|
39
40
|
csv.update_candidate_status('$CURRENT_CANDIDATE_ID', 'pending')
|
|
40
|
-
sys.exit(0)
|
|
41
|
-
else:
|
|
42
|
-
# No reset needed
|
|
43
|
-
sys.exit(0)
|
|
44
41
|
" 2>/dev/null || echo "[WORKER-$$] Warning: failed to reset status" >&2
|
|
45
42
|
fi
|
|
46
43
|
}
|
|
@@ -584,10 +581,16 @@ with EvolutionCSV('$FULL_CSV_PATH') as csv:
|
|
|
584
581
|
csv.update_candidate_status('$candidate_id', 'failed-ai-retry')
|
|
585
582
|
" 2>/dev/null || true
|
|
586
583
|
elif [[ $process_exit_code -eq 78 ]]; then
|
|
587
|
-
# Missing parent;
|
|
588
|
-
echo "[WORKER-$$] Parent missing for $candidate_id -
|
|
589
|
-
|
|
590
|
-
|
|
584
|
+
# Missing parent; mark as failed-parent-missing for clarity
|
|
585
|
+
echo "[WORKER-$$] Parent missing for $candidate_id - marking failed-parent-missing"
|
|
586
|
+
"$PYTHON_CMD" -c "
|
|
587
|
+
import sys
|
|
588
|
+
sys.path.insert(0, '$SCRIPT_DIR/..')
|
|
589
|
+
from lib.evolution_csv import EvolutionCSV
|
|
590
|
+
with EvolutionCSV('$FULL_CSV_PATH') as csv:
|
|
591
|
+
csv.update_candidate_status('$candidate_id', 'failed-parent-missing')
|
|
592
|
+
" 2>/dev/null || true
|
|
593
|
+
# Stop looping so we don't keep retrying for missing dependency
|
|
591
594
|
break
|
|
592
595
|
else
|
|
593
596
|
echo "[WORKER-$$] Failed to process $candidate_id"
|
package/lib/ai-cli.sh
CHANGED
|
@@ -55,7 +55,8 @@ $prompt"
|
|
|
55
55
|
ai_output=$(timeout 500 codex exec -m o3-mini -c model_reasoning_effort="high" --dangerously-bypass-approvals-and-sandbox "$prompt" 2>&1)
|
|
56
56
|
local ai_exit_code=$?
|
|
57
57
|
;;
|
|
58
|
-
gemini)
|
|
58
|
+
gemini|gemini-flash)
|
|
59
|
+
# Unified Gemini handling; gemini-flash behaves like standard gemini.
|
|
59
60
|
# Debug: Show exact command
|
|
60
61
|
echo "[DEBUG] Running: timeout 1200 gemini -y -p <prompt>" >&2
|
|
61
62
|
echo "[DEBUG] Working directory: $(pwd)" >&2
|