Plan filesystem sources and underlays
This commit is contained in:
@@ -108,6 +108,22 @@ must never run implicitly as part of configuration loading.
|
||||
Remote data can enter through application-supplied input without introducing a
|
||||
network provider into the library.
|
||||
|
||||
## Loading Lifecycle
|
||||
|
||||
Configuration loading is a synchronous, complete-on-return operation. A successful
|
||||
load provides the final configuration and inspection metadata after the configured
|
||||
processing and validation phases complete. A failed load reports diagnostics and
|
||||
returns no usable partial result. The normal application pattern is one load near
|
||||
startup; applications may explicitly initiate additional loads.
|
||||
|
||||
ConfigKit releases its library-owned loading handles before returning and remains
|
||||
inactive until the application explicitly invokes it again. It performs no
|
||||
background watching, refresh, or mutation of published results. Caller-owned
|
||||
resources and application callback effects remain the caller's responsibility.
|
||||
The [configuration contract](../config.md#completion-and-resource-lifetime) owns
|
||||
the precise completion and ownership behavior. The proposed decision record is
|
||||
[ADR 0008](../adr/0008-complete-on-return-loading.md).
|
||||
|
||||
## Public API And Dependency Direction
|
||||
|
||||
Keep one small, coherent public surface for the supported lifecycle. Simple
|
||||
@@ -136,9 +152,20 @@ framework on this library.
|
||||
|
||||
## Configuration Integrity
|
||||
|
||||
Composition and intentional overlay are distinct operations. Composition must
|
||||
not silently become last-wins override through file ordering. The decision and
|
||||
alternatives are recorded in [ADR 0001](../adr/0001-separate-composition-and-overlay.md).
|
||||
Within a configuration tier, independent contributions use strict composition:
|
||||
shared mappings combine recursively, while overlapping non-mapping definitions
|
||||
are conflicts, including equal values. Between precedence tiers, intentional
|
||||
overlay combines mappings recursively, retains omitted lower-priority children,
|
||||
and replaces other present values according to the existing overlay rules.
|
||||
Tier precedence is explicit; traversal order within a tier establishes stable
|
||||
reporting, not permission to override. The distinction and its rationale are
|
||||
recorded in [ADR 0001](../adr/0001-separate-composition-and-overlay.md).
|
||||
|
||||
The main document and its imports currently form the strictly composed base
|
||||
tier. Input-specific constraints, including CLI path rules and opt-in version
|
||||
ownership, remain part of the configuration contract. Consistent combination
|
||||
semantics do not require identical acquisition or lifetime behavior from every
|
||||
source kind.
|
||||
|
||||
ConfigKit must define supported YAML semantics explicitly rather than inherit
|
||||
parser defaults. Processing order and diagnostics must be deterministic for the
|
||||
|
||||
Reference in New Issue
Block a user