claude-evolve 1.6.17 → 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.
@@ -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
- # Atomically reset status to pending only if it is not already complete
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
- if info and info.get('status', '').lower() != 'complete':
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
  }
@@ -220,7 +217,7 @@ process_candidate() {
220
217
  source_file="$FULL_OUTPUT_DIR/evolution_${parent_id}.py"
221
218
  if [[ ! -f "$source_file" ]]; then
222
219
  echo "[WORKER-$$] ERROR: Parent algorithm not found: $source_file" >&2
223
- return 1
220
+ return 78 # New exit code for missing parent
224
221
  fi
225
222
  fi
226
223
 
@@ -574,9 +571,8 @@ with EvolutionCSV('$FULL_CSV_PATH') as csv:
574
571
  if [[ $process_exit_code -eq 0 ]]; then
575
572
  echo "[WORKER-$$] Successfully processed $candidate_id"
576
573
  elif [[ $process_exit_code -eq 77 ]]; then
577
- # Special exit code 77 means AI failed to generate code
574
+ # AI generation failed, mark for retry
578
575
  echo "[WORKER-$$] AI generation failed for $candidate_id - marking as failed-ai-retry"
579
- # Mark with special status that indicates AI generation failed (not evaluation)
580
576
  "$PYTHON_CMD" -c "
581
577
  import sys
582
578
  sys.path.insert(0, '$SCRIPT_DIR/..')
@@ -584,6 +580,18 @@ from lib.evolution_csv import EvolutionCSV
584
580
  with EvolutionCSV('$FULL_CSV_PATH') as csv:
585
581
  csv.update_candidate_status('$candidate_id', 'failed-ai-retry')
586
582
  " 2>/dev/null || true
583
+ elif [[ $process_exit_code -eq 78 ]]; then
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
594
+ break
587
595
  else
588
596
  echo "[WORKER-$$] Failed to process $candidate_id"
589
597
  # Other failures (evaluation errors, etc) mark as failed
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-evolve",
3
- "version": "1.6.17",
3
+ "version": "1.6.19",
4
4
  "bin": {
5
5
  "claude-evolve": "./bin/claude-evolve",
6
6
  "claude-evolve-main": "./bin/claude-evolve-main",