Module evaluators
Expand description
Gate evaluators: pure comparisons of analysis result sets (or a fact store)
against the configured Thresholds, each returning the list of
GateViolations it found.
Every evaluator is a noop (empty result) when its governing threshold is
unset, so a caller can invoke the family unconditionally and let the
configured gates select themselves. The threshold config these read lives in
the sibling config module.
Structs§
- Arch
Measured - Architecture metrics measured for gate evaluation, returned so callers can record the observed values (ledger, ratchet) on passing runs too.
- Gate
Violation - One detected gate violation.
Functions§
- change_
set_ gate_ verdict - The
"passed"/"failed"/"skipped"verdict for one ofevaluate_gate_thresholds’s three collection-driven gates (delta_code_health_min_per_file,new_file_health_min,no_new_cycles), given that gate’s violation count. - diff_
gate_ verdict - The
"passed"/"failed"/"skipped"verdict for the whole[diff]gate familyevaluate_diff_gateevaluates, given whether each side of the range actually measured anything. - evaluate_
architecture_ gate - Evaluate the architecture
[gates](max_dependency_cycles,max_propagation_cost) against the import graph in the fact store. Builds the graph once via the shared kernel; a noop (no graph build) when neither gate is configured. - evaluate_
architecture_ gate_ measured evaluate_architecture_gatereturning the measured metrics alongside the violations.Nonewhen neither architecture gate is configured (the import graph is not built at all).- evaluate_
clone_ gate - Evaluate the
disallow_clone_type_1gate by counting Type-1 clone families (similarity = 1.0) in the fact store. When the gate is off this is a noop; when on, every distinct clone group of similarity 1.0 surfaces as one violation row. - evaluate_
code_ health_ gate - Evaluate the
code_health_mingate against the COMPOSITEcode-healthscore (run_code_health), not the hotspots inline cognitive-only proxy. This is the score--analysis code-healthreports, so a file the analysis bandsredis the file the gate flags — the two agree. - evaluate_
corpus_ percentile_ rows - Pure inner comparison for the
corpus_percentile_maxgate. - evaluate_
diff_ gate - Evaluate the
[diff]section against a base→head delta. - evaluate_
effort_ exposure_ gate - Evaluate the
max_red_effort_pctgate: fails when theredcode-health band’s window churn share exceeds the configured ceiling. - evaluate_
effort_ exposure_ rows - Pure inner comparison for the
max_red_effort_pctgate. - evaluate_
effort_ exposure_ rows_ exempt evaluate_effort_exposure_rowswith the improving-churn exemption.- evaluate_
familiarity_ gate - Evaluate the
code_familiarity_mingate: fails when the repository’s active-team familiarity score falls below the configured floor. - evaluate_
familiarity_ rows - Pure inner comparison for the
code_familiarity_mingate. - evaluate_
finding_ overlap_ rows - Pure inner comparison for the
max_findings_in_hot_filesgate. - evaluate_
full_ tree - Evaluate the
[gates]section against a hotspots result set. Returns the list of violations. - evaluate_
gate_ thresholds - Evaluate the
[diff]gates that apply to a working-tree change-set report (codelore gate/ thegate_changesMCP tool). - evaluate_
hotspot_ anchored_ rows - Pure inner comparison for the
hotspot_anchored_maxgate. - evaluate_
new_ code_ rows - Pure inner comparison for the two-band
[new_code]gate over aNewCodeScope. - head_
has_ scorable_ source - Whether the HEAD tree carries at least one Tier-1 source file the code-health
scan should have scored — the independent witness for the
code_health_mindegraded sentinel.