Skip to content

improve: add range, enum, and cross-field config validation#134

Merged
1Lucas1apk merged 2 commits into
PerformanC:devfrom
aroradev1010:improve-config-validation-coherence
Dec 20, 2025
Merged

improve: add range, enum, and cross-field config validation#134
1Lucas1apk merged 2 commits into
PerformanC:devfrom
aroradev1010:improve-config-validation-coherence

Conversation

@aroradev1010

Copy link
Copy Markdown
Contributor

Changes

This PR strengthens configuration validation at startup by adding:

  • Range validation for numeric config values (ports, intervals, thresholds)
  • Enum validation for fixed-value options (audio quality, route planner strategy)
  • Cross-field validation to ensure related values are coherent (e.g. rate-limit hierarchy, cluster worker limits)
  • Clear, actionable error messages when invalid configurations are detected

Why

Previously, many configurations were only type-checked or relied on runtime failures.
This allowed logically invalid but syntactically valid configurations to pass silently and fail later.

These changes:

  • Fail fast during startup
  • Prevent subtle runtime bugs

Scope

  • No API changes
  • No runtime behavior changes when configuration is valid
  • Validation only runs during startup

Checkmarks

  • Tested locally with valid and invalid configurations

aroradev1010 and others added 2 commits December 20, 2025 21:38
Removed comments that explain code behavior.

Signed-off-by: Lucas Morais Rodrigues <76886832+1Lucas1apk@users.noreply.github.com>
@1Lucas1apk 1Lucas1apk merged commit e68a4aa into PerformanC:dev Dec 20, 2025
@aroradev1010 aroradev1010 deleted the improve-config-validation-coherence branch February 21, 2026 19:20
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.

2 participants