Skip to content

Move validation logic from CoreSolver to RunConfig/RunPlan #31

@jc-macdonald

Description

@jc-macdonald

Validation of solver configuration is currently embedded in CoreSolver methods, but belongs in RunConfig/RunPlan dataclasses using __post_init__.

Problem

CoreSolver performs input validation that should happen at configuration time, not at solve time. This makes the solver harder to test and blurs responsibility boundaries.

Scope

  • Move validation at L840 and L855 of core_solver.py into RunConfig/RunPlan.__post_init__
  • Ensure errors are raised at config construction time with clear messages
  • Update tests accordingly

Related

Ref: PR #18 review by @TimothyWillard (L840, L855)

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorCode reorganization without behavior change

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions