P242 · Evaluation & feedback

Measured baseline ratchet

Adopt a measured nonregression direction when an arbitrary target would fail the inherited baseline.

Editorially reviewed

These examples and illustrative results are independently authored teaching materials, not measured model results.

Use case

A legacy project has 62% coverage and no settled path to 80%. A teaching gate can first require no decline under the same measurement contract while tracking absolute improvement separately.

Mechanism

Record baseline code/tests/tool, denominator, direction and tolerance. Use the same included scope for coverage, where higher is better. State whether the measure is enforced. Detect comparable declines; after confirmed improvement to 65%, update under the contract so it cannot fall back to 62%. Changed metric scope needs a newly justified baseline rather than copied numbers.

Bad example

Set an arbitrary 80% to keep inherited code permanently red, or call 62% sufficient final quality. Lower baselines to hide regression.

Good example

Measure and record current 62% with scope/command, require comparable nonregression and update after verified 65%. Track higher absolute quality separately and say whether the gate is wired or merely measured. Explain denominator changes before resetting the baseline.

Why the change matters

A measured ratchet detects deterioration instead of demanding an immediately unreachable number. Tightening retains gains without presenting inherited low quality as sufficient.

Observable expectation

With zero regression tolerance,62→61 fails;62→65 passes and updates after confirmation, then 64 fails. Excluding files to raise the ratio is not comparable improvement. Verify CI runs the gate rather than merely documenting it.

Limits

Nonregression does not establish sufficient quality. Coverage and complexity have different directions/denominators; noisy measures need defined tolerance. Frozen measured, provisional and enforced states differ and must be labeled accordingly.

Sources and evidence

Read the editorial criteria