Loop fitness
Definition¶
The result of calling a background loop's loop_fitness(ctx) method for one evaluation window. Carries kind (SCORED or HOUSEKEEPING), an optional normalized score in [0, 1] valid only for intra-loop trend comparison, raw components for diagnosis, sample_count, and a Confidence signal (OK or INSUFFICIENT_DATA) keyed off sample_count vs a per-loop threshold. Produced by every BaseBackgroundLoop subclass; consumed by FitnessScorecardLoop and persisted to fitness.jsonl. (ADR-0093)
Invariants¶
scoreis normalized 0–1 and valid only for intra-loop use (trend over time, or intra-loop config ranking). Cross-loop comparison ofscoreis architecturally invalid.- When
kindisHOUSEKEEPING,scoreis alwaysNone;componentscarries raw counters. confidenceisINSUFFICIENT_DATAwhensample_countis below the loop'smin_samplesthreshold;scoreisNonein that case regardless ofkind.