Problem
Git line-count metrics (e.g. "Code lines added", "Lines added") sum every
added line reported by the commit diff. Files are bucketed only by
extension (code / docs / config), with no consideration of whether the
file is authored or machine-produced. As a result, content that a person did
not write by hand is counted as their contribution:
- vendored dependencies checked into the repo (e.g.
.venv / site-packages,
node_modules, vendor/)
- build/generated output (e.g.
dist/, build/, minified bundles, generated
code or data files)
- lockfiles and other machine-managed artifacts
A single commit that adds such a directory can contribute hundreds of
thousands of lines under a code extension (e.g. vendored .py/.js), which
are then attributed as authored code.
Impact
- Per-person distortion: individuals whose repos happen to include
vendored/generated content show wildly inflated line counts that do not
reflect real output. This correlates with role and repo hygiene rather than
contribution.
- Peer-pool distortion: because peer standing is computed against a
cohort (e.g. department) median/quartiles, one such outlier skews the
benchmark for everyone in that cohort, degrading every peer comparison in
the group.
- Line-count metrics are currently untrustworthy wherever a repo does not
perfectly gitignore generated/vendored content — which is common.
Root cause
File classification keys on file extension only. There is no path-based
exclusion for vendored/generated content, so such files pass through the same
as authored source.
Proposed direction
Add a path-based exclusion applied before line-count aggregation, so
vendored/generated files are not counted toward authored line metrics:
- Maintain an exclusion list of well-known vendored/generated path patterns
(dependency directories, build output, minified assets, lockfiles). Treat it
as configuration so it can evolve without code changes.
- Apply the exclusion in the git file-change classification / observation
layer so it flows consistently to every downstream line-count metric and to
peer aggregation.
- Consider a separate "generated/vendored" category rather than a hard drop,
so the signal is auditable and could be surfaced distinctly later.
Acceptance criteria
Scope
Independent of the metric-family migrations; affects the git domain only.
Problem
Git line-count metrics (e.g. "Code lines added", "Lines added") sum every
added line reported by the commit diff. Files are bucketed only by
extension (code / docs / config), with no consideration of whether the
file is authored or machine-produced. As a result, content that a person did
not write by hand is counted as their contribution:
.venv/site-packages,node_modules,vendor/)dist/,build/, minified bundles, generatedcode or data files)
A single commit that adds such a directory can contribute hundreds of
thousands of lines under a code extension (e.g. vendored
.py/.js), whichare then attributed as authored code.
Impact
vendored/generated content show wildly inflated line counts that do not
reflect real output. This correlates with role and repo hygiene rather than
contribution.
cohort (e.g. department) median/quartiles, one such outlier skews the
benchmark for everyone in that cohort, degrading every peer comparison in
the group.
perfectly gitignore generated/vendored content — which is common.
Root cause
File classification keys on file extension only. There is no path-based
exclusion for vendored/generated content, so such files pass through the same
as authored source.
Proposed direction
Add a path-based exclusion applied before line-count aggregation, so
vendored/generated files are not counted toward authored line metrics:
(dependency directories, build output, minified assets, lockfiles). Treat it
as configuration so it can evolve without code changes.
layer so it flows consistently to every downstream line-count metric and to
peer aggregation.
so the signal is auditable and could be surfaced distinctly later.
Acceptance criteria
metric and in peer/cohort aggregation.
Scope
Independent of the metric-family migrations; affects the git domain only.