Skip to content

fix(effort): restrict share denominators to the banded population - #179

Merged
emrecdr merged 3 commits into
mainfrom
fix/effort-band-denominator
Jul 29, 2026
Merged

fix(effort): restrict share denominators to the banded population#179
emrecdr merged 3 commits into
mainfrom
fix/effort-band-denominator

Conversation

@emrecdr

@emrecdr emrecdr commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

Validated High finding, alone in its PR because it changes effort-exposure output on every repository with non-code churn: band_churn joined the banded-paths table while total_churn and total_commits did not, so lockfile/docs/config churn deflated every share — the gate got monotonically more permissive the more lockfile churn a repository carried (executed example: band-consistent 60.0 vs computed 6.0 against a ceiling of 30). Both denominators now carry the banded restriction; the improving/degrading decomposition reconciles against the same population (pinned by tests) and the commit-share Wilson interval rides the corrected n. The production-SQL fixture pins the report's scenario exactly.

The honest consequence, disclosed: this repository was passing its own red-effort gate only because of the bug — corrected shares sum to 100.0 where they summed to 34.6, and today's degrading share reads 28.98 vs the old 15.0 ceiling (calibrated on the deflated basis). The maintainer-approved second commit re-bases the ceiling to 30.0 on the corrected basis, with the restore intent documented in the thresholds file — same pattern as every basis-change re-base this campaign.

Verification

  • lib 1226 / cli 170 pass, effort integration 6/6 (agent) + independent re-run of the full chain (controller); clippy all-features clean; fmt clean
  • Reconciliation pins: improving + degrading == churn share; shares sum to ~100 across bands
  • Self-gate PASS at the re-based ceiling on the committed state

The band shares divided banded churn by ALL window churn: total_churn had
no eh_bands_v1 join and total_commits counted every window commit, so
lockfile, docs and config churn deflated every share and the red-effort
ceiling under-fired monotonically with non-code churn — a repository
passed the gate more easily the more lockfile churn it carried. The
denominators now carry the same banded restriction as the numerators, so
each share reads as a share of code-health-scorable activity; the
improving/degrading decomposition and the commit-share Wilson interval
ride the same corrected population. On this repository the corrected
shares sum to 100.0 where they previously summed to 34.6.
… basis

The previous ceiling (15.0) was calibrated against the deflated shares —
this repository's window is roughly two-thirds non-code churn, so every
band read ~2.89x low and the gate passed only because of the defect just
fixed. On the corrected basis today's degrading red share measures 28.98
(raw red 37.91, improving 8.92 exempt). The ceiling tracks that measured
worst with margin; the thresholds comment records the restore intent
toward a corrected steady state once the campaign churn rolls out.
Approved by the maintainer.
@emrecdr emrecdr closed this Jul 29, 2026
@emrecdr
emrecdr deleted the fix/effort-band-denominator branch July 29, 2026 01:23
@emrecdr
emrecdr restored the fix/effort-band-denominator branch July 29, 2026 01:23
@emrecdr emrecdr reopened this Jul 29, 2026
@emrecdr
emrecdr merged commit 821a9b3 into main Jul 29, 2026
11 checks passed
@emrecdr
emrecdr deleted the fix/effort-band-denominator branch July 29, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants