validateConfig
validateConfig(
commandLineConfigOverrides):Promise<ConfigValidationReport>
Defined in: core/dist/config/loader.d.ts:216
Locate and validate the effective raw config against the schema WITHOUT building the LLM
or merging defaults (the read-side of GS2-1). Honours --config, up-tree discovery, and the
identity profile via findProjectConfigPath.
GS2-29 — validates the SAME layer set a real run does: the discovered PROJECT layer (if any)
AND the GLOBAL layer (if any), mirroring initConfig’s validateRawConfigLayer(project) +
applyGlobalConfigBase → loadGlobalRawConfig(global). Each present layer is validated
independently (validateRawGthConfig) and its outcome recorded in ConfigValidationReport.layers, so a removed shape in EITHER file is reported (labelled with
its source) rather than under-reported.
A PROJECT-layer JSONC/module parse failure is thrown to the caller (surfaced as a clear
“invalid config” error + non-zero exit). A GLOBAL-layer parse failure is treated as an absent
global (no layer added) but is surfaced with a displayWarning — exactly as a run does (it
warns the user while ignoring the broken global’s value) — see loadGlobalRawConfigUnvalidated.
GS2-73 — for the PROJECT layer it also walks the GS2-41 profile extends chain (via the SAME
composeExtends/resolveExtendsChain the run path uses), so a cycle or a missing
base — which fail a real run — is reported here as a not-ok layer instead of passing OK and only
failing at run time. The GLOBAL layer is NOT walked, mirroring the run (resolveConfigExtends
runs on the project/profile layer only).
Parameters
Section titled “Parameters”commandLineConfigOverrides
Section titled “commandLineConfigOverrides”Returns
Section titled “Returns”Promise<ConfigValidationReport>