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§
- Calibration
Config - 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. - Diff
Gates - Gates
- NewCode
Gates - 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); otherwiseNone(uncalibrated).