pub fn load(start: &Path) -> Result<Config, ConfigError>Expand description
Load and merge configuration from standard locations.
Search order (first found wins for each layer):
-
.marque.tomldiscovered by walking upward fromstartpercontracts/cli.md. The walk stops at the first of:- a directory containing
.marque.toml - a directory containing
.git/(git repository root) - the filesystem root
If the walk finds a
.marque.toml, that directory is the project root for both Layer 1 (committed) and Layer 2 (local). If the walk finds a git root or filesystem root first, no project config is loaded — Layer 3 (env vars) still runs. - a directory containing
-
.marque.local.tomlonly in the same directory as the discovered.marque.toml. The local-config search is never independently walked, so a stray.marque.local.tomlin a parent directory cannot silently attach to a child project’s config. -
Environment variables (
MARQUE_CLASSIFIER_ID,MARQUE_CONFIDENCE_THRESHOLD,MARQUE_LOG).
Hard-fail validators run after merging all layers.