fix: concurrency config serialization skipped when value equals default
### Checklist
- [x] I added a descriptive title
- [x] I searched open reports and couldn't find a duplicate
### What happened?
The concurrency configuration was not serialized as expected in certain environments.
Specifically, when the concurrency values matched the runtime default (derived from available CPU cores), the configuration was skipped during serialization due to skip_serializing_if logic.
This caused environment-dependent behavior where the [concurrency] section would sometimes be missing from the generated TOML output, leading to failing tests such as `test_save_and_load_config`.
### Additional Context
The root cause was the use of `available_parallelism()` inside default comparison logic, which introduces non-determinism across machines with different CPU counts.
The fix ensures deterministic behavior by using a stable comparison baseline for serialization, while preserving runtime behavior for actual configuration usage.
1 条评论