-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Overview
This is a sub-task of #119 - Refactor: Address Law of Demeter violations for better encapsulation
Priority: High
Anti-pattern: God objects - classes that know/do too much
Large Classes Found (>500 lines)
mcp_fuzzer/fuzz_engine/strategy/aggressive/protocol_type_strategy.py(917 lines)mcp_fuzzer/fuzz_engine/strategy/schema_parser.py(775 lines)mcp_fuzzer/cli/args.py(671 lines)mcp_fuzzer/fuzz_engine/fuzzer/protocol_fuzzer.py(650 lines)mcp_fuzzer/fuzz_engine/runtime/watchdog.py(515 lines)mcp_fuzzer/fuzz_engine/runtime/manager.py(505 lines)
Why It's a Problem
- Low cohesion - Methods don't work together toward a single purpose
- Multiple responsibilities - Violates Single Responsibility Principle
- Hard to test, understand, and maintain
Refactoring Strategy
For each large class:
- Identify responsibilities
- Group related methods
- Extract classes
- Use composition
- Maintain backward compatibility
Acceptance Criteria
For each large class:
- Analyze responsibilities
- Design new class structure
- Extract new classes
- Update tests
- Verify all tests pass
- Update documentation
- Code review
References
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Todo