Skip to content

fix(controller): honor explicit zero iteration budgets - #531

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
justavibedev:fix/explicit-zero-iterations
Oct 22, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
justavibedev:fix/explicit-zero-iterations

Conversation

@justavibedev

Copy link
Copy Markdown
Contributor

OpenEvolve.run(iterations=0) falls back to config.max_iterations because the override is selected by truthiness. An initialization-only call can therefore schedule the configured evolution budget, which defaults to 10,000 iterations.

Use the configured value only when iterations is None, matching the method's documented contract. An explicit zero still evaluates and returns the initial program, but submits no evolutionary work. Positive overrides and the None fallback retain their behavior.

Three regression tests exercise the public run() method through the real scheduler and submission path, replacing the process executor and model/evaluator boundaries with synthetic results. On the base commit, the zero-budget test submits three tasks and fails; the None and positive controls pass. All three pass after the fix.

Validation on Python 3.10.21:

  • OPENAI_API_KEY=test-key-for-unit-tests python -m unittest discover -s tests -p 'test_*.py' -v — 794 tests, OK, with two existing scipy-dependent tests skipped because scipy is not installed.
  • 19 focused iteration-budget, iteration-counting, and checkpoint-resume tests passed.
  • Black on both changed files, isort on the new test module, and git diff --check passed.

No live-model integration tests were run locally. Codex assisted with development and testing.

@codelion
codelion merged commit 57a7aac into algorithmicsuperintelligence:main Oct 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants