Skip to content

fix(config): add #[serde(default)] to sub-config structs for partial configs (#1134) - #1135

Closed
ousamabenyounes wants to merge 4 commits into
rtk-ai:developfrom
ousamabenyounes:fix/issue-1134
Closed

ousamabenyounes wants to merge 4 commits into
rtk-ai:developfrom
ousamabenyounes:fix/issue-1134

Conversation

@ousamabenyounes

Copy link
Copy Markdown
Contributor

Summary

Fixes #1134

  • Adds #[serde(default)] at the struct level to TrackingConfig, DisplayConfig, FilterConfig, TelemetryConfig, and LimitsConfig
  • When a user provides a partial config section (e.g. [tracking] without history_days), toml::from_str previously returned an error, causing Config::load() to fail silently and telemetry_enabled() to fall back to true even when the user explicitly set [telemetry] enabled = false
  • All five structs already implement Default with correct domain values; the added attribute delegates to those existing implementations

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • 3 new regression tests added: test_telemetry_disabled_via_config, test_tracking_partial_config_uses_defaults, test_telemetry_disabled_with_partial_tracking
  • Full test suite: 1353 pass, 0 fail (baseline 1350 + 3 new)

Generated by Claude Code
Vibe coded by ousamabenyounes

aeppling and others added 4 commits April 6, 2026 12:54
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]>
@CLAassistant

CLAassistant commented Apr 10, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@pszymkowiak pszymkowiak added bug Something isn't working effort-small Quelques heures, 1 fichier good first issue Good for newcomers labels Apr 10, 2026
@pszymkowiak

Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Adds #[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

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #1134


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@ousamabenyounes

Copy link
Copy Markdown
Contributor Author

Closing: this PR was auto-generated against issue #1134 which is already closed. Additionally it has merge conflicts with develop (branched off master instead of upstream/develop). The /contribute script failed to check issue state before proceeding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working effort-small Quelques heures, 1 fichier good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabling telemetry in config file does not work

4 participants