Repository navigation
fix(config): add #[serde(default)] to sub-config structs for partial configs (#1134) - #1135
ousamabenyounes wants to merge 4 commits into
Conversation
feat(): batch fixs + aws extended + filter quality batch
…--components--rtk chore(master): release 0.35.0
…configs (#1134) Config::load() would fail when a user provided a partial section (e.g. [tracking] without history_days), causing telemetry_enabled() to return None and silently default to true even when the user explicitly set [telemetry] enabled = false. Generated by Claude Code Vibe coded by ousamabenyounes Co-Authored-By: Claude <[email protected]>
📊 Automated PR Analysis
SummaryAdds #[serde(default)] to five sub-config structs (TrackingConfig, DisplayConfig, FilterConfig, TelemetryConfig, LimitsConfig) so that partial TOML config sections use Default implementations instead of failing to parse. This fixes a bug where Config::load() would fail silently on partial configs, causing telemetry_enabled() to incorrectly fall back to true even when explicitly disabled. Review Checklist
Linked issues: #1134 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
|
Closing: this PR was auto-generated against issue #1134 which is already closed. Additionally it has merge conflicts with |
Summary
Fixes #1134
#[serde(default)]at the struct level toTrackingConfig,DisplayConfig,FilterConfig,TelemetryConfig, andLimitsConfig[tracking]withouthistory_days),toml::from_strpreviously returned an error, causingConfig::load()to fail silently andtelemetry_enabled()to fall back totrueeven when the user explicitly set[telemetry] enabled = falseDefaultwith correct domain values; the added attribute delegates to those existing implementationsTest plan
cargo fmt --all && cargo clippy --all-targets && cargo testtest_telemetry_disabled_via_config,test_tracking_partial_config_uses_defaults,test_telemetry_disabled_with_partial_trackingGenerated by Claude Code
Vibe coded by ousamabenyounes