郝鹏宇
98488c4be4
fix(config): prevent save_config from materialising schema defaults
...
Fixes #27354
Root cause: called during init (or by any code path
that saves ) wrote injected schema defaults into
config.yaml as if the user had authored them. Two fix layers:
1. now only injects
when the user actually set
somewhere (root or agent). A user who never set
keeps it absent, so 's explicit-path
detection won't treat it as user-authored.
2. gains a parameter and a
new pass that removes keys matching
unless those paths were explicitly present in the
**raw** (pre-normalization) config on disk. Explicit-path detection
uses on *before* any
normalisation runs — preventing injected-in defaults from being
mistaken for user-set values.
All migration and edit-config call sites pass
to preserve their intentional default-seeding behaviour.
New helpers:
- — collects leaf-key paths from a raw dict
- — removes keys matching schema defaults
Test coverage: 4 new regression tests (59 total, all passing).
2026-06-27 19:38:11 -07:00
..
2026-06-26 19:15:18 -07:00
2026-06-27 19:26:04 -07:00
2026-06-23 10:32:27 -07:00
2026-06-27 12:45:23 -07:00
2026-06-22 09:57:16 -07:00
2026-06-27 03:55:01 -07:00
2026-06-26 19:15:18 -07:00
2026-06-20 10:26:45 -07:00
2026-06-02 12:37:40 -04:00
2026-06-27 19:30:32 -07:00
2026-06-27 19:38:11 -07:00
2026-06-25 16:29:09 -07:00
2026-06-22 19:16:47 -05:00
2026-06-06 11:46:24 -07:00
2026-06-24 18:53:49 +05:30
2026-06-27 04:04:15 -07:00
2026-06-16 13:09:40 -07:00
2026-06-27 19:37:33 -07:00
2026-06-27 15:59:00 -07:00
2026-06-22 12:14:30 -07:00
2026-05-28 22:26:25 -07:00
2026-06-27 19:29:06 -07:00
2026-06-27 19:06:01 -07:00
2026-06-01 19:52:28 -07:00
2026-06-19 07:46:33 -07:00
2026-06-15 11:55:02 -04:00
2026-06-13 14:50:05 -07:00
2026-05-28 22:26:25 -07:00
2026-06-06 18:33:44 -07:00
2026-05-28 22:26:25 -07:00
2026-06-24 04:16:54 +05:30
2026-05-28 22:26:25 -07:00
2026-06-19 18:06:38 -04:00
2026-06-21 12:09:16 -07:00
2026-06-17 18:48:35 -05:00
2026-06-03 07:32:00 +07:00
2026-06-14 00:27:59 -04:00
2026-06-05 02:54:34 -07:00
2026-06-10 17:37:34 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 06:32:42 -07:00
2026-06-27 15:59:00 -07:00
2026-06-27 15:59:00 -07:00
2026-06-20 10:26:45 -07:00
2026-05-28 21:40:39 -07:00
2026-05-27 14:31:55 -07:00
2026-06-25 17:49:05 -05:00
2026-06-08 09:35:22 -07:00
2026-05-29 22:29:48 -07:00
2026-06-01 20:13:42 -07:00
2026-06-25 23:49:11 -07:00
2026-06-08 02:18:21 -07:00
2026-06-18 22:11:35 +05:30
2026-06-23 21:33:08 -07:00
2026-06-18 16:26:34 +07:00
2026-06-23 10:38:15 -07:00
2026-06-18 14:14:41 +10:00
2026-06-26 20:10:20 +05:30
2026-05-28 22:26:25 -07:00
2026-06-25 23:49:11 -07:00
2026-05-28 22:26:25 -07:00
2026-06-24 23:51:31 +05:30
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 23:22:10 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 18:04:47 -07:00
2026-06-25 13:52:06 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 03:17:12 -07:00
2026-06-18 09:16:40 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 09:35:22 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 12:11:54 -07:00
2026-06-25 00:17:17 -07:00
2026-06-12 13:42:42 -04:00
2026-06-26 19:15:18 -07:00
2026-06-08 07:03:12 -07:00
2026-06-24 04:16:54 +05:30
2026-06-25 21:18:41 -07:00
2026-06-14 03:20:21 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 05:01:27 -07:00
2026-06-03 06:36:46 -07:00
2026-06-25 12:29:49 -05:00
2026-06-26 00:31:06 -05:00
2026-06-12 08:30:06 -05:00
2026-06-18 05:41:23 -07:00
2026-06-23 23:43:24 -07:00
2026-06-03 12:00:27 -07:00
2026-06-25 23:27:44 +05:30
2026-05-28 22:26:25 -07:00
2026-06-12 02:06:47 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 17:49:38 -07:00