Commit 2719a85
authored
docs(rfd): Add RFD 060 for
Add RFD 060, proposing a global `--explain` flag that traces JP's
layered config resolution chain, showing users exactly where each field
value originates.
The motivation: when a config value isn't what the user expects, there's
currently no way to find out which layer set it — file configs, env
vars, conversation deltas, CLI flags, and alias resolution all silently
compete. `--explain` makes that chain visible.
Two modes are proposed: broad mode (bare `--explain`) groups all
non-default fields by the layer that set them, and focused mode
(`--explain=<field>`) traces a single field through every layer
including "not set" and "not found" entries. Both modes support JSON
output via `--format=json`.
The implementation approach uses snapshot-and-diff provenance:
`PartialAppConfig` is cloned after each layer is applied, and `delta()`
is used to determine what each layer contributed. A `CliRecorder`
captures the CLI flag-to-field mappings including alias resolution
details. The flag suppresses command execution, following the precedent
of e.g. `terraform plan`.
---------
Signed-off-by: Jean Mertz <git@jeanmertz.com>--explain config resolution flag (#466)1 parent ea74542 commit 2719a85
5 files changed
Lines changed: 637 additions & 42 deletions
File tree
- docs
- .vitepress
- rfd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
0 commit comments