Skip to content

refactor: extract strategy classes from engine, fix_pipeline, and result_handler (fixes #518)#527

Open
mickume wants to merge 1 commit intodevelopfrom
fix/issue-518-extract-strategy-classes
Open

refactor: extract strategy classes from engine, fix_pipeline, and result_handler (fixes #518)#527
mickume wants to merge 1 commit intodevelopfrom
fix/issue-518-extract-strategy-classes

Conversation

@mickume
Copy link
Copy Markdown
Contributor

@mickume mickume commented Apr 23, 2026

Summary

Extract collaborator classes from the three largest files in the codebase to improve readability and testability:

  • BlockDecision / evaluate_review_blockingengine/blocking.py (result_handler.py: 793 → 590 lines, −26%)
  • SerialDispatcher / ParallelDispatcherengine/dispatch.py (engine.py: 2051 → 1817 lines, −11%)
  • CoderReviewerLoopnightshift/coder_reviewer.py (fix_pipeline.py: 1237 → 980 lines, −21%)

Closes #518

Changes

File Change
agent_fox/engine/blocking.py New: blocking evaluation logic
agent_fox/engine/dispatch.py New: serial/parallel dispatch strategies
agent_fox/nightshift/coder_reviewer.py New: coder-reviewer retry loop
agent_fox/engine/result_handler.py Removed blocking logic (−26%)
agent_fox/engine/engine.py Dispatch delegates to new module (−11%)
agent_fox/nightshift/fix_pipeline.py Loop delegates to new module (−21%)
4 test files Updated import paths

Tests

  • All 4292 existing tests pass unchanged
  • 4 test files updated for import path changes only

Verification

  • All existing tests pass: ✅
  • Linter / formatter: ✅
  • No regressions: ✅

Auto-generated by af-fix.

…ult_handler (fixes #518)

Extract collaborator classes from the three largest files:
- BlockDecision/evaluate_review_blocking → engine/blocking.py
- SerialDispatcher/ParallelDispatcher → engine/dispatch.py
- CoderReviewerLoop → nightshift/coder_reviewer.py
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