Summary
ProgramManager.update_frontier() raises IndexError: list index out of range when get_frontier_with_scores() returns an empty list (all frontier programs have score=None).
Reproduction
from src.registry import ProgramManager
manager = ProgramManager("/path/to/repo")
# Manually mark a program as frontier without a score
manager.create_program("base", config_without_score)
manager.mark_frontier("base")
# Later, try to update frontier with a scored program
manager.update_frontier("iter-1", 0.85)
Expected: The unscored program is either included with a default score or the comparison is skipped.
Actual: get_frontier_with_scores() filters out all programs with score=None, returning an empty list. Then scored[-1] raises IndexError: list index out of range.
Root Cause
In src/registry/manager.py:
get_frontier_with_scores() (line 325-344): if score is not None filters out unscored programs
update_frontier() (line 423): worst_name, worst_score = scored[-1] — if all frontier programs are unscored, scored is empty and scored[-1] raises IndexError
Trigger Conditions
This happens when:
- A program is added to frontier via
mark_frontier() without being evaluated, OR
- Config read fails for all frontier programs (the
except Exception: continue on line 341 silently skips them), OR
ProgramConfig.get_score() returns None for all frontier members
Impact
- The self-improving loop crashes mid-run, losing all progress
- The error is silent until it happens; no validation prevents unscored programs from entering the frontier
Suggested Fix
Handle empty scored list in update_frontier:
scored = self.get_frontier_with_scores()
if not scored:
# No scored programs yet; add unconditionally
self.mark_frontier(name)
return True
Or default score to 0.0 in ProgramConfig.get_score() instead of returning None.
Environment
- EvoSkill version: latest (2026-09-16)
- Python: 3.11
Summary
ProgramManager.update_frontier()raisesIndexError: list index out of rangewhenget_frontier_with_scores()returns an empty list (all frontier programs havescore=None).Reproduction
Expected: The unscored program is either included with a default score or the comparison is skipped.
Actual:
get_frontier_with_scores()filters out all programs withscore=None, returning an empty list. Thenscored[-1]raisesIndexError: list index out of range.Root Cause
In
src/registry/manager.py:get_frontier_with_scores()(line 325-344):if score is not Nonefilters out unscored programsupdate_frontier()(line 423):worst_name, worst_score = scored[-1]— if all frontier programs are unscored,scoredis empty andscored[-1]raisesIndexErrorTrigger Conditions
This happens when:
mark_frontier()without being evaluated, ORexcept Exception: continueon line 341 silently skips them), ORProgramConfig.get_score()returnsNonefor all frontier membersImpact
Suggested Fix
Handle empty
scoredlist inupdate_frontier:Or default
scoreto0.0inProgramConfig.get_score()instead of returningNone.Environment