refactor(config): extract load_single_layer; add Layer/Provenance + dirs

Split the body of load_config_in into a load_single_layer(cwd, path) helper that
loads and fully processes one config file (version-gating, legacy scan, normalize)
— the seam the upcoming layered loader needs — while load_config_in keeps its exact
single-layer semantics (an explicit --config still errors on a missing file).

Add the precedence-ordered Layer enum (Default < Global < State < Project) and a
Provenance side-table newtype for the merge engine, plus the dirs dependency
(already in the lock tree via lance, so zero new crates). No behavior change.
This commit is contained in:
Ragnor Comerford 2026-06-05 11:08:09 +02:00
parent 14736a9ca5
commit 349673283a
No known key found for this signature in database
4 changed files with 115 additions and 62 deletions

1
Cargo.lock generated
View file

@ -4604,6 +4604,7 @@ version = "0.6.1"
dependencies = [
"clap",
"color-eyre",
"dirs",
"serde",
"serde_ignored",
"serde_yaml",