Problem
In config_loader.rs:123-126, when merging overlay configs, the entire Defaults struct is replaced if any field differs. This means:
- Parent config sets
defaults.base = "main", defaults.scope = "added"
- Child config sets
defaults.fail_on = "error"
- Result: only
fail_on is set — base and scope are lost
Fix
Implement field-wise merge for Defaults:
Option<T> fields: child overrides parent only if Some
- Non-option fields: child overrides parent only if non-default
Source
PR #5 review — Codex P1 (comment #2).
Problem
In
config_loader.rs:123-126, when merging overlay configs, the entireDefaultsstruct is replaced if any field differs. This means:defaults.base = "main",defaults.scope = "added"defaults.fail_on = "error"fail_onis set —baseandscopeare lostFix
Implement field-wise merge for
Defaults:Option<T>fields: child overrides parent only ifSomeSource
PR #5 review — Codex P1 (comment #2).