-
-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: split evaluator/mod.rs into focused submodules #59
Copy link
Copy link
Labels
enhancementNew feature or requestNew feature or requestevaluatorRule evaluation engine and logicRule evaluation engine and logicpriority:normalStandard work itemStandard work itemsize:MThis PR changes 30-99 lines, ignoring generated files.This PR changes 30-99 lines, ignoring generated files.
Milestone
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestevaluatorRule evaluation engine and logicRule evaluation engine and logicpriority:normalStandard work itemStandard work itemsize:MThis PR changes 30-99 lines, ignoring generated files.This PR changes 30-99 lines, ignoring generated files.
Type
Fields
Give feedbackNo fields configured for Task.
Summary
src/evaluator/mod.rsis 2,638 lines -- 4.4x the project's 500-600 line guideline. It contains multiple responsibilities that should be separated into focused submodules.Current State
The file contains:
EvaluationContextstruct and methods (~200 lines)MatchResulttype and methods (~50 lines)evaluate_single_rule()public function (~20 lines)evaluate_rules()recursive hierarchical evaluation (~200 lines)evaluate_rules_with_config()wrapper#[cfg(test)]testsProposed Split
evaluator/mod.rs-- Public API surface only:EvaluationContext,MatchResult, re-exportsevaluator/engine.rs-- Core evaluation logic:evaluate_single_rule(),evaluate_rules(),evaluate_rules_with_config(), and the recursive hierarchy processingtests/evaluator_tests.rsor keep as#[cfg(test)]within each submoduleWhy Before v0.2.0
v0.2.0 adds comparison operators (#34, #35), indirect offsets (#37), and relative offsets (#38). All of these will add evaluation logic to this module. Splitting now prevents the file from growing to 3,500+ lines.
Acceptance Criteria
evaluator/mod.rsis under 600 linescargo clippy -- -D warningspasses