Skip to content

Epic 5.5: Extract evolution engines to loop.py + strategies.py#43

Merged
Deepfreezechill merged 2 commits into
mainfrom
epic/5.5-evolution-engines
Apr 6, 2026
Merged

Epic 5.5: Extract evolution engines to loop.py + strategies.py#43
Deepfreezechill merged 2 commits into
mainfrom
epic/5.5-evolution-engines

Conversation

@Deepfreezechill

Copy link
Copy Markdown
Owner

Epic 5.5 - Extract Evolution Engines

The largest extraction in P5: 670 lines from evolver.py into 2 new modules.

New Modules

  • evolution/loop.py (~300 lines): run_evolution_loop, parse_evolution_output, apply_with_retry
  • evolution/strategies.py (~340 lines): evolve_fix, evolve_derived, evolve_captured

evolver.py

  • 1,022 -> 362 lines (thin delegates only)
  • All internal calls preserve MRO via evolver._method()
  • Unused imports cleaned up
  • EvolutionTrigger re-exported for backward compat

Tests

  • 45 new tests (29 loop + 16 strategies)
  • 1,562 total pass, 127 skipped

Review: /8eyes + /collab (4 agents)

  • 8eyes-impl: unused imports fixed
  • 8eyes-sec: recording truncation verified (false positive on retry LLM content)
  • Opus 4.6: APPROVE (0.95) - no behavioral drift
  • GPT-5.4: APPROVE - SkillRecord field assertions strengthened

Brian Krafft and others added 2 commits April 5, 2026 19:02
Extract 6 methods (~670 lines) from evolver.py into evolution/ package:

evolution/loop.py (~300 lines):
  - run_evolution_loop: token-driven LLM agent loop
  - parse_evolution_output: extract edit content or failure reason
  - apply_with_retry: apply edit with retry + validation + recording
  - Constants: _MAX_EVOLUTION_ITERATIONS, _MAX_EVOLUTION_ATTEMPTS

evolution/strategies.py (~340 lines):
  - evolve_fix: in-place fix (same dir, new version)
  - evolve_derived: enhanced version (new dir, merge support)
  - evolve_captured: brand-new skill from pattern

evolver.py: 1022 -> 370 lines (thin delegates, MRO preserved)
All internal calls go through evolver._method() for subclass compat.
Unused imports cleaned up (copy, json, re, shutil, uuid, etc.)
EvolutionTrigger re-exported for backward compat.

45 new tests (29 loop + 16 strategies); 1,562 total pass, 127 skipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8eyes-impl R1: removed SkillEnginePrompts, _RECORDING_MAX_CHARS,
_SKILL_CONTENT_MAX_CHARS, _truncate unused imports from evolver.py.
GPT-5.4 R1: added SkillRecord field assertions to evolve_fix test
(origin, generation, parent_ids, source_task_id, tool_deps).

1,562 total pass, 127 skipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown

🔒 Phase Gate Enforcement — 🚫 FAIL

Check Result Detail
Issue linkage No linked issues found. PR must contain "Closes #N", "Fixes #N", or "Resolves #N".

Verdict: FAIL
Timestamp: 2026-04-06T15:42:57.352Z
Run: View workflow run


How to fix: Ensure all prerequisite phases are complete, or add emergency:bypass label with a ## Bypass Reason section in the PR body.

@Deepfreezechill Deepfreezechill merged commit 3eb4529 into main Apr 6, 2026
0 of 5 checks passed
@Deepfreezechill Deepfreezechill deleted the epic/5.5-evolution-engines branch April 6, 2026 15:43
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.

1 participant