diff --git a/tools/push3-evolution/evolve.sh b/tools/push3-evolution/evolve.sh index 536edf0..6b771b8 100755 --- a/tools/push3-evolution/evolve.sh +++ b/tools/push3-evolution/evolve.sh @@ -423,7 +423,7 @@ PYEOF else # --- Default mode: N copies of the seed, each independently mutated --- for i in $(seq 0 $((POPULATION - 1))); do - CAND_FILE="$GEN_DIR/candidate_$(printf '%03d' $i).push3" + CAND_FILE="$GEN_DIR/candidate_$(printf '%03d' "$i").push3" MUTATED=$(run_mutate_cli mutate "$SEED" "$MUTATION_RATE") \ || fail "Failed to mutate seed for initial candidate $i" printf '%s\n' "$MUTATED" > "$CAND_FILE" @@ -814,7 +814,7 @@ for fname in sorted(os.listdir(output_dir)): try: d = json.loads(line) cid = d.get('candidate_id', '') - fitness = int(d.get('fitness', 0)) + fitness = int(d.get('fitness') or 0) if fitness < threshold: continue # Canonical CID format is "candidate_XXX" (zero-padded numeric suffix, @@ -889,11 +889,12 @@ if not new_items: # Add new inflation/distortion flags here; no other code change is required. ZERO_RATED_FLAGS = { 'token_value_inflation', + 'processExecIf_fix', } def effective_fitness(entry): flags = entry.get('fitness_flags') or '' - if any(flag in flags for flag in ZERO_RATED_FLAGS): + if any(flag in flags.split(',') for flag in ZERO_RATED_FLAGS): return 0 return int(entry.get('fitness') or 0) diff --git a/tools/push3-evolution/seeds/manifest.schema.json b/tools/push3-evolution/seeds/manifest.schema.json index a90e5fb..4c42ae2 100644 --- a/tools/push3-evolution/seeds/manifest.schema.json +++ b/tools/push3-evolution/seeds/manifest.schema.json @@ -17,7 +17,7 @@ }, "fitness_flags": { "type": ["string", "null"], - "description": "Space-separated flags that qualify or invalidate the fitness value (e.g. token_value_inflation). null when no flags apply." + "description": "Comma-separated flags that qualify or invalidate the fitness value (e.g. token_value_inflation). null when no flags apply." }, "origin": { "type": "string",