Skip to content

Fix MAP-Elites eviction (#454) & sampling (#452) bugs; harden library API; dhara CI + Frame SAST#462

Merged
codelion merged 3 commits into
algorithmicsuperintelligence:mainfrom
boasmeier:fix/store-artifacts-of-initial-program
Jul 5, 2026
Merged

Fix MAP-Elites eviction (#454) & sampling (#452) bugs; harden library API; dhara CI + Frame SAST#462
codelion merged 3 commits into
algorithmicsuperintelligence:mainfrom
boasmeier:fix/store-artifacts-of-initial-program

Conversation

@boasmeier

@boasmeier boasmeier commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Builds on the original fix (store artifacts for the initial program) and stacks several related fixes, plus test-infra and CI changes, targeting the 0.3.0 release.

Bug fixes

Closes #454
Closes #452

Testing / CI

  • Swap the integration-test model from the gated google/gemma-3-270m-it to the public codelion/dhara-250m (served via optillm), with a bounded max_tokens so the model does not ramble to the 4096-token default.
  • Run the full integration suite in CI (drop -m "not slow") so contributor PRs are exercised end-to-end; cache HF models; install the math-verify dep that pip install optillm omits; poll the server for health.
  • New tests: elite protection, orphan removal, initial-program artifacts, and a real-LLM iteration/checkpoint test. Fix the MockEvaluator interface and remove a stale .bak file. Zero skipped tests.

Security

  • Add a Frame SAST workflow (mirrors optillm's) that scans PR-changed Python files and fails on high/critical severity.

Bumps version to 0.3.0.

@CLAassistant

CLAassistant commented May 15, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

…l to dhara

Bug fixes:
- database.py: protect MAP-Elites cell owners during population eviction
  (non-elite/homeless programs are removed first) — fixes algorithmicsuperintelligence#454 bug 1.
- database.py: remove programs displaced from their cell that become orphaned
  (in no island, owning no cell) instead of leaking them as unsampleable
  "zombies" that consume population slots — fixes algorithmicsuperintelligence#454 bug 2.
- api.py: fix run_evolution() with a lambda evaluator generating
  `return <lambda>(...)` (SyntaxError); extract and bind the lambda expression
  so the generated evaluator module is self-contained and subprocess-safe.
- controller.py: pass usedforsecurity=False to hashlib.md5 (seed derivation is
  not security-sensitive) to satisfy SAST weak-hash checks.

Testing / CI:
- Swap the integration-test model from google/gemma-3-270m-it to
  codelion/dhara-250m (served via optillm). Bound max_tokens to 256 in the
  integration configs: dhara does not stop at the ChatML <|im_end|> marker, so
  unbounded it rambled to the 4096-token default (10-20 min per call).
- Run the FULL integration suite in CI (drop the `-m "not slow"` filter) so
  contributor PRs are exercised end-to-end; raise the job timeout to 90 min.
- Add tests: elite protection, orphan removal, initial-program artifacts,
  and a real-LLM iteration/checkpoint test (moved out of the unit suite so it
  no longer skips when no server is present). Update snapshot/parallel tests
  that relied on the zombie behaviour to use distinct islands.
- Fix MockEvaluator (missing get_pending_artifacts) and the hardcoded model in
  the library-API test config. Remove a stale .bak test file.

Security:
- Add a Frame SAST workflow that scans PR-changed Python files (SARIF ->
  code scanning, non-blocking).

Bump version to 0.3.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codelion codelion force-pushed the fix/store-artifacts-of-initial-program branch from 7759b06 to ccaf034 Compare July 5, 2026 05:30
- Remove dead code openevolve/iteration.py (the single-process sample() path).
  It was never imported or executed (the live path is ProcessParallelController
  -> process_parallel.py), and it carried the hardcoded get_top_programs(5)/(3)
  counts and the divergent sampling logic the issue flagged (algorithmicsuperintelligence#452 points 2 & 4).
- Size inspirations by num_diverse_programs instead of num_top_programs so that
  config parameter actually controls the inspiration count (algorithmicsuperintelligence#452 point 1).
- Deduplicate inspirations against the top/diverse programs already shown in the
  prompt so a program is not listed twice (algorithmicsuperintelligence#452 point 3); add tests.
- Rename secret_patterns -> redaction_patterns in the artifact security filter so
  SAST tools do not misread the redaction table as a hardcoded secret.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codelion codelion changed the title fix: store artifacts for initial program if available Fix MAP-Elites eviction (#454) & sampling (#452) bugs; harden library API; dhara CI + Frame SAST Jul 5, 2026
@codelion codelion merged commit b28ac15 into algorithmicsuperintelligence:main Jul 5, 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.

MAP-Elites cell owners not protected during population eviction (regression from #150 fix) Bugs and confusion on the programs sampling process

3 participants