Skip to content

loadConfiguredEvalToolCoverage

loadConfiguredEvalToolCoverage(commandLineConfigOverrides): Promise<ConfiguredEvalToolCoverage>

Defined in: packages/core/dist/config/loader.d.ts:281

BATCH-48 — the evalToolCoverage value of the run’s BASE config, read once, before gth eval runs any suite.

Why a reader, and not a config the eval command already builds

Section titled “Why a reader, and not a config the eval command already builds”

gth eval builds its configs per suite, and a suite that declares identities: builds one per identity and never builds a base config at all — it must not, because a matrix-only project may have none. So there is no run-level config object to read the run floor from, and reading it off whichever config a suite happened to build would let the floor move: a sweep cell’s merged config, or an identity’s profile, would supply the threshold. This reads the base the run was STARTED with (-i, -c, -g, or plain discovery) and nothing else, so the floor is one value per run by construction, and never an identity’s.

Why this cannot disagree with the value a run reaches

Section titled “Why this cannot disagree with the value a run reaches”

It takes the path initConfig takes for the same overrides: the same refusals first (the -g + -c pair, a missing -c file, an explicitly named profile with no config of its own — findProjectConfigPath would otherwise fall back to the plain config and the output would name a profile the value did not come from), then the same discovery, the same extends composition, and the same global underlay with the same deepMerge. The key has no default and no CLI override, so the merge with DEFAULT_CONFIG cannot change it.

It does not validate the whole config: every suite’s own initConfig does that and reports it, and warning twice about one file is worse than not warning here. The one key it reads it validates with evalToolCoverageSchema — the same rule the full parse applies — and a malformed value THROWS: a floor that failed to parse must not quietly become no floor, because a floor quietly skipped reports green forever over a run it never measured.

CommandLineConfigOverrides

Promise<ConfiguredEvalToolCoverage>