A cheap up-front estimate of the attribution (git blame) cost for a repository, computed from
git metadata alone (no filesystem walk, no file reads) so it can run while the user is still
configuring the scan. Self::blameable_files counts tracked files — including submodule
working trees via --recurse-submodules — whose name maps to a supported language, which is
exactly the set the blame pass would process.
A resolved contributor: one human, possibly spanning several raw git identities that were
auto-merged because they share a normalized email. Cross-email merges (corporate login vs.
full name vs. last name) are a follow-up interactive step; Phase 1 only auto-merges the
high-confidence same-email case, which is always safe.
A raw (name, email) pair exactly as recorded in git history (post-.mailmap). Multiple
raw identities can be folded into one Author when they share a normalized email.
How costly the per-author attribution (git blame) pass is expected to be for a repository,
used to warn the user and to auto-default attribution off on pathologically large trees.
Fold a run’s authors according to map, in place: contributors whose email belongs to the
same merge group are combined (counts summed, aliases merged, per-file ownership remapped and
re-aggregated). Authors are re-sorted by code lines owned and re-indexed. A no-op when the map
is empty or the run has no authors.
Fold each GitHub users.noreply.github.com identity into a real-email identity of the same
person, matched by display name, keeping the real email as canonical. Repos routinely carry
both a contributor’s private-email GitHub address and their real email, splitting one person
across two rows; this collapses them so the ownership view shows a single identity. Matching is
by normalized display name, so distinct bots/people (e.g. copilot-swe-agent[bot]) never
collapse into an unrelated author. Runs automatically at scan time and is a no-op when nothing
matches — the operator-driven apply_identity_map still handles arbitrary cross-account
merges on top.
Estimate the attribution cost for root from git metadata alone. Best-effort and fast (two
git calls, no walk): a non-git path or any git failure yields a zero-cost, attribution-on
estimate so nothing is ever blocked. See AttributionEstimate.