Skip to content

Epic 5.3: Extract trigger functions to evolution/triggers.py#41

Merged
Deepfreezechill merged 2 commits intomainfrom
epic/5.3-evolution-triggers
Apr 3, 2026
Merged

Epic 5.3: Extract trigger functions to evolution/triggers.py#41
Deepfreezechill merged 2 commits intomainfrom
epic/5.3-evolution-triggers

Conversation

@Deepfreezechill
Copy link
Copy Markdown
Owner

Epic 5.3 — Evolution Triggers Extraction

Extracts 3 trigger functions + 3 helpers from evolver.py → evolution/triggers.py (~380 lines).

Extracted functions

  • \process_analysis\ — Trigger 1: post-analysis evolution
  • \process_tool_degradation\ — Trigger 2: fix skills for degraded tools
  • \process_metric_check\ — Trigger 3: periodic health-based evolution
  • \�uild_context_from_analysis\ — Build EvolutionContext from analyzer output
  • \load_skill_content\ — Load SKILL.md (registry or disk)
  • \diagnose_skill_health\ — Pure metric classifier

Review gate (4 reviewers)

Reviewer Verdict
8eyes-impl ✅ PASS
8eyes-sec ✅ PASS
Opus 4.6 ✅ APPROVE (6 findings — all fixed)
GPT-5.4 ✅ Fixed (MRO preservation for helper calls)

Key fix from review

Helper calls now route through \�volver._method()\ to preserve MRO/subclass overrides — same pattern established in 5.2.

Tests

  • 24 trigger tests (including 2 new happy-path confirm→execute tests)
  • 1,470 total pass, 127 skipped

Impact

  • evolver.py: 58KB → 44.7KB (-230 lines delegated)

Brian Krafft and others added 2 commits April 3, 2026 15:50
- New: evolution/triggers.py (380 lines) — process_analysis, process_tool_degradation, process_metric_check, build_context_from_analysis, load_skill_content, diagnose_skill_health
- Modified: evolver.py — 6 methods now delegate to triggers module (-230 lines, 44.7KB from 58KB)
- Constants moved: _ANALYSIS_CONTEXT_MAX, thresholds (re-imported in evolver.py)
- New: tests/test_evolution_triggers.py — 22 tests
- Suite: 1,468 passed, 127 skipped

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review fixes from /8eyes + /collab gate:
- Route helper calls through evolver._method() to preserve MRO (GPT-5.4 MEDIUM)
- Add 2 happy-path tests: confirm->execute for triggers 2 & 3 (Opus M-2)
- Remove unused import logging (Opus L-1)
- Move _ANALYSIS_NOTE_MAX_CHARS to evolver.py where used (Opus L-2)
- Restore diagnose_skill_health return type annotation (Opus L-3)

24 trigger tests pass; 1,470 total pass, 127 skipped.

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

github-actions Bot commented Apr 3, 2026

🔒 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-03T23:12:56.489Z
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 fc743e1 into main Apr 3, 2026
0 of 5 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.

1 participant