Skip to content

refactor(config): formalize config validation #737

@cpcloud

Description

@cpcloud

Config validation in LoadFromPath is an ad-hoc pile of one-off if checks with no consistent pattern. Each new config field adds another bespoke validation block, making it easy to miss fields and hard to audit coverage.

Formalize config validation with a consistent approach:

  • Consider a declarative validation model (struct tags, a validation table, or a Validate() method per config section)
  • Ensure all numeric ranges, required fields, enum values, and cross-field constraints are covered systematically
  • Make it obvious when a new config field is missing validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions