Skip to main content

Module config

Module config 

Expand description

Threshold configuration: parse, discover, and validate .codelore-thresholds.toml.

The [gates] / [diff] / [calibration] sections deserialize into Thresholds. deny_unknown_fields turns a mistyped key into a parse error, and Thresholds::validate range-checks every numeric bound so a degenerate value (nan, inf, out-of-domain) surfaces as a configuration error rather than a silently vacuous gate. The evaluators that consume this config against a fact store or analysis rows live in the sibling evaluators module.

Structs§

CalibrationConfig
The [calibration] section: repo-declared analysis calibration, applied wherever the equivalent CLI flag is accepted. This is a config selector, not a gate — its presence never enables gate evaluation on its own.
DiffGates
Gates
NewCodeGates
The [new_code] section: a two-band, period-scoped quality gate over the active working set.
Thresholds

Constants§

THRESHOLDS_FILENAME
Conventional filename auto-discovered at the repo root.

Functions§

resolve_defect_calibration
Resolve the effective defect-calibration artifact path for a repo: an explicit flag wins; otherwise the discovered thresholds file’s [calibration] defect_artifact (relative paths joined to the repo root); otherwise None (uncalibrated).