fix(config): Fix inconsistent defaults for configs#6072
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c569636. Configure here.
| fn default_max_rate_limit() -> Option<u32> { | ||
| Some(300) // 5 minutes | ||
| } | ||
|
|
There was a problem hiding this comment.
Partial config uses wrong defaults
High Severity
Container #[serde(default)] fills omitted keys with each field type’s Default, not values from the struct’s impl Default. Removing field-level serde(default = …) on Processing, EnvelopeSpool, and AuthConfig makes partial YAML (e.g. only enabled or path) deserialize with zeros, empty strings, or None instead of documented defaults like max_secs_in_future 60, signature_max_age 300, or spool limits.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit c569636. Configure here.
There was a problem hiding this comment.
There was a problem hiding this comment.
Also serde's docs: https://serde.rs/container-attrs.html#default
loewenheim
left a comment
There was a problem hiding this comment.
In addition to being correct it's also much nicer to read.


Depending on how you instantiate the config you either get the derived
Defaultor the serde default. Always useserde(default)on the struct, always implementDefault.