Config Validation & Safe Environment Parsing
This release hardens the service configuration layer: environment variables that were previously parsed with raw int() now use safe_get_int_env() (crash-safe, with min/max bounds), and a new validate_config() function runs cross-field validation at both MCP server and HTTP server startup.
Fixed
- Config: replace raw
int(os.getenv())withsafe_get_int_env(): Hybrid backend sync interval, batch size, queue size, retry count, health check interval, drift check interval, retention periods, and mDNS discovery timeout were parsed with rawint()which crashes on invalid input. Now usesafe_get_int_env()andsafe_get_bool_env()with sensible min/max bounds.
Added
validate_config()function: New cross-field validation callable at startup. Catches: HTTPS enabled without cert/key files, hybrid search weights not summing to 1.0 (with auto-normalization notice). Returns a list of issue strings; called at both MCP server and HTTP server startup. 8 new tests coveringsafe_get_int_envrobustness andvalidate_configcross-field checks.
Upgrade Notes
No breaking changes. This release is fully backward compatible.
Full Changelog
See CHANGELOG.md for the complete version history.