[Bug] Human-authored release-branch backports are counted again in file ownership

Open
#6,410 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Papito084 is already working on this.

Since Nov 26, 2026.

  • #6433 by @Papito084 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
git, python

Research direction

Start at packages/core/src/repowise/core/ingestion/git_commit_index.py:261-262 and read the ingestion tests in tests/unit/ingestion/. Reproduce the double counting with one fix and two human backports, then check that unrelated commits still count separately and ordinary (#N) subjects, churn, and last-modified fields remain unchanged. A linked open pull request (#6433) is already addressing the issue.

Written by the indexing model from the issue text.

Description

bug help wanted

Summary

File ownership counts a human-authored backport once more for every release branch it was cherry-picked to, so the author of a fix reads as owning more of a file than they wrote. patchback[bot] backports are already excluded by the bot filter; human ones are not.

packages/core/src/repowise/core/ingestion/git_commit_index.py:261-262

raw = repo.git.log(
    *revisions, "-M", "--numstat", "--no-merges", f"--format={_LOG_FORMAT}"

Mechanism

  • The repo-wide log buckets every reachable non-merge commit by the files it touches, with no path limit. A fix and each of its backport commits are separate commits, so each lands in the file's author counts.
  • Backport subjects carry the original PR number: [PR #13930/b1f6c87b backport][3.14] ... (#13942) or ... (#13833) (#13836).

Repro

aiohttp, aiohttp/cookiejar.py, 90 days back from the newest commit (2026-11-26):

git log --no-merges --since=90.days.ago --format=%an -- aiohttp/cookiejar.py   -> Sam Bull 5, Koston 1, Svetlov 1
git log --full-history --no-merges --since=90.days.ago ... (same)             -> Sam Bull 10, Koston 4, Svetlov 1, patchback[bot] 4

The index reports Sam Bull 10 of 15 commits.

Impact

Owner shares and "who owns this" answers overweight authors who backport by hand.

Done looks like

  • Count one commit per change: skip a commit whose subject matches the backport pattern, or group by the PR number in the subject and keep the earliest.
  • Must not change: ordinary (#N) subjects, and the churn and last-modified fields.

Tests

tests/unit/ingestion/: a fix plus two human backports counts once for its author; two unrelated commits still count twice.

Dominant language
Python
Stars
7.1k
Forks
756
Avg merge
21h 5m
Merged PRs (30d)
797

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from repowise-dev/repowise

All issues in repowise-dev/repowise

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.