claude-evolve 1.8.2 → 1.8.3
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 +4 -0
- package/lib/evolution_csv.py +5 -3
- package/package.json +1 -1
package/bin/claude-evolve-worker
CHANGED
|
@@ -304,6 +304,8 @@ from lib.evolution_csv import EvolutionCSV
|
|
|
304
304
|
with EvolutionCSV('$FULL_CSV_PATH') as csv:
|
|
305
305
|
csv.update_candidate_status('$candidate_id', 'complete')
|
|
306
306
|
" 2>/dev/null || true
|
|
307
|
+
# Clear CURRENT_CANDIDATE_ID before returning to prevent cleanup from interfering
|
|
308
|
+
CURRENT_CANDIDATE_ID=""
|
|
307
309
|
return 0
|
|
308
310
|
fi
|
|
309
311
|
|
|
@@ -374,6 +376,8 @@ with EvolutionCSV('$FULL_CSV_PATH') as csv:
|
|
|
374
376
|
echo "[WORKER-$$] Deleted corrupted algorithm file: $target_file" >&2
|
|
375
377
|
# Set status to pending for retry
|
|
376
378
|
update_candidate_status "$candidate_id" "pending"
|
|
379
|
+
# Clear CURRENT_CANDIDATE_ID before returning
|
|
380
|
+
CURRENT_CANDIDATE_ID=""
|
|
377
381
|
# Return 0 to indicate that this specific processing step is handled,
|
|
378
382
|
# and the candidate is now pending for a future retry.
|
|
379
383
|
return 0
|
package/lib/evolution_csv.py
CHANGED
|
@@ -153,7 +153,8 @@ class EvolutionCSV:
|
|
|
153
153
|
for i in range(len(rows) - 1, start_idx - 1, -1):
|
|
154
154
|
row = rows[i]
|
|
155
155
|
if self.is_pending_candidate(row):
|
|
156
|
-
|
|
156
|
+
# Strip both whitespace and quotes to handle CSV corruption
|
|
157
|
+
candidate_id = row[0].strip().strip('"')
|
|
157
158
|
current_status = row[4].strip() if len(row) > 4 else ''
|
|
158
159
|
pending.append((candidate_id, current_status))
|
|
159
160
|
|
|
@@ -181,7 +182,8 @@ class EvolutionCSV:
|
|
|
181
182
|
row = rows[i]
|
|
182
183
|
|
|
183
184
|
if self.is_pending_candidate(row):
|
|
184
|
-
|
|
185
|
+
# Strip both whitespace and quotes to handle CSV corruption
|
|
186
|
+
candidate_id = row[0].strip().strip('"')
|
|
185
187
|
original_status = row[4].strip() if len(row) > 4 else ''
|
|
186
188
|
|
|
187
189
|
# Ensure row has at least 5 columns
|
|
@@ -335,7 +337,7 @@ class EvolutionCSV:
|
|
|
335
337
|
for row in rows[start_idx:]:
|
|
336
338
|
if self.is_valid_candidate_row(row) and row[0].strip().strip('"') == candidate_id.strip().strip('"'):
|
|
337
339
|
return {
|
|
338
|
-
'id': row[0].strip() if len(row) > 0 else '',
|
|
340
|
+
'id': row[0].strip().strip('"') if len(row) > 0 else '',
|
|
339
341
|
'basedOnId': row[1].strip() if len(row) > 1 else '',
|
|
340
342
|
'description': row[2].strip() if len(row) > 2 else '',
|
|
341
343
|
'performance': row[3].strip() if len(row) > 3 else '',
|