Skip to content

Additions Ratio: Fix the Net-New-File Inflation Problem (High Priority) #24

Description

@kenjudy

This is the most significant measurement error in the toolkit. additions / max(deletions, 1) for a commit of entirely new files yields a ratio approaching infinity, which explodes both the median and p90. The RETROSPECTIVE noted p90=446x is "almost certainly dominated by these net-new-file commits" but leaves it as documentation debt.

Proposed fix: Compute a second ratio alongside the current one:

net_additions_ratio = (additions - deletions) / total_lines_changed
This is bounded 0–1, immune to the new-file distortion, and more directly measures "what percentage of this commit is truly new code vs replacement." A ratio consistently above 0.8 means 80% of every commit is net-new code — the actual batch-acceptance signal.

Alternatively, exclude commits where prod_files_count > 0 AND total_deletions < 5 from the ratio distribution (they're new-file bootstraps, not drift signals), and document this filtering in the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions