claude-evolve 1.0.15 → 1.0.16
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-run +7 -12
- package/package.json +1 -1
package/bin/claude-evolve-run
CHANGED
|
@@ -77,9 +77,10 @@ fi
|
|
|
77
77
|
# Find oldest pending row (pure shell)
|
|
78
78
|
find_empty_row() {
|
|
79
79
|
local row_num=2 # Start after header
|
|
80
|
-
|
|
80
|
+
local csv_id csv_based_on csv_desc csv_perf csv_status
|
|
81
|
+
while IFS=, read -r csv_id csv_based_on csv_desc csv_perf csv_status; do
|
|
81
82
|
# Look for rows with pending status or empty status (but not complete/failed/running)
|
|
82
|
-
if [[ $
|
|
83
|
+
if [[ $csv_status == "pending" || (-z $csv_perf && -z $csv_status) ]]; then
|
|
83
84
|
echo $row_num
|
|
84
85
|
return 0
|
|
85
86
|
fi
|
|
@@ -102,14 +103,15 @@ update_csv_row() {
|
|
|
102
103
|
# Read CSV and update specific row
|
|
103
104
|
local temp_file="${FULL_CSV_PATH}.tmp"
|
|
104
105
|
local current_row=1
|
|
106
|
+
local csv_id csv_based_on csv_desc csv_perf csv_stat
|
|
105
107
|
|
|
106
|
-
while IFS=, read -r
|
|
108
|
+
while IFS=, read -r csv_id csv_based_on csv_desc csv_perf csv_stat; do
|
|
107
109
|
if [[ $current_row -eq $row_num ]]; then
|
|
108
110
|
# Update this row
|
|
109
|
-
echo "$
|
|
111
|
+
echo "$csv_id,$csv_based_on,$csv_desc,$performance,$status"
|
|
110
112
|
else
|
|
111
113
|
# Keep original row
|
|
112
|
-
echo "$
|
|
114
|
+
echo "$csv_id,$csv_based_on,$csv_desc,$csv_perf,$csv_stat"
|
|
113
115
|
fi
|
|
114
116
|
((current_row++))
|
|
115
117
|
done <"$FULL_CSV_PATH" >"$temp_file"
|
|
@@ -125,9 +127,7 @@ fi
|
|
|
125
127
|
|
|
126
128
|
# Get row data
|
|
127
129
|
row_data=$(get_csv_row "$row_num")
|
|
128
|
-
echo "[DEBUG] Raw row data: '$row_data'"
|
|
129
130
|
IFS=, read -r id based_on_id description performance status <<<"$row_data"
|
|
130
|
-
echo "[DEBUG] After parsing - ID: '$id', based_on_id: '$based_on_id'"
|
|
131
131
|
|
|
132
132
|
# Check if ID is empty
|
|
133
133
|
if [[ -z $id ]]; then
|
|
@@ -147,9 +147,6 @@ echo "[INFO] Based on ID: $based_on_id"
|
|
|
147
147
|
# Set interrupt handler - just exit without updating CSV status
|
|
148
148
|
trap 'echo "[INFO] Evolution interrupted"; exit 130' INT
|
|
149
149
|
|
|
150
|
-
# Mark as running
|
|
151
|
-
update_csv_row "$row_num" "" "running"
|
|
152
|
-
|
|
153
150
|
# Determine parent algorithm
|
|
154
151
|
if [[ -z $based_on_id || $based_on_id == "0" || $based_on_id == '""' ]]; then
|
|
155
152
|
# Empty or zero basedonID means use the base algorithm
|
|
@@ -167,9 +164,7 @@ fi
|
|
|
167
164
|
echo "[INFO] Using parent algorithm: $parent_file"
|
|
168
165
|
|
|
169
166
|
# Generate mutation
|
|
170
|
-
echo "[DEBUG] ID is: '$id', FULL_OUTPUT_DIR is: '$FULL_OUTPUT_DIR'"
|
|
171
167
|
output_file="$FULL_OUTPUT_DIR/evolution_id${id}.py"
|
|
172
|
-
echo "[DEBUG] Output file will be: '$output_file'"
|
|
173
168
|
echo "[INFO] Generating algorithm mutation..."
|
|
174
169
|
|
|
175
170
|
# Copy parent algorithm to output file first
|