Skip to content

fix(platform): merge Hyper Engineers when a repo's commit name is the GitHub handle itself - #206

Merged
clickmatos merged 1 commit into
mainfrom
fix-hyper-engineers-github-handle-as-name
Aug 27, 2026
Merged

fix(platform): merge Hyper Engineers when a repo's commit name is the GitHub handle itself#206
clickmatos merged 1 commit into
mainfrom
fix-hyper-engineers-github-handle-as-name

Conversation

@clickmatos

Copy link
Copy Markdown
Contributor

Summary

Reported: Lucas Tribioli showed up twice in Hyper Engineers (18 repos / 11 repos), both under "Identificados", both linking to the same lucastribioliclickbus GitHub profile.

Confirmed live via gh api search/commits against the real org data: he uses two different commit emails across repos — a noreply email in some, his corporate email (lucas.tribioli@clickbus.com) in others — and in the corporate-email repos, his local git config name is literally his GitHub handle (lucastribioliclickbus) instead of "Lucas Tribioli".

Root cause: computeHyperEngineers's grouping key only checked nameToGithub (built from each repo's already-resolved active_users push). For repos where push-time API resolution failed to tie the corporate email to a login, there's no nameToGithub entry for the raw handle-as-name string — so that entry grouped separately, keyed by the raw name/email instead of the shared identity. userMap did already know the right mapping (from a different repo's successful resolution), but that richer lookup only ran at display time, after grouping had already split the person into two buckets — so the split entry still showed a resolved GitHub link, just as a second, separate card.

Fix

  • computeHyperEngineers now also checks userMap by name during grouping, not only at display time — closing the exact gap above.
  • Repo counting switched from a raw counter to a Set of repo ids, so a repo that lists the same merged identity under two name/email variants (possible within one repo too) only counts once — addresses "removendo os repositórios repetidos".
  • Display name now prefers a name with a space over a bare username string when no userMap entry is found, since the raw handle-as-name string otherwise wins by being longer.

Test plan

  • Added 2 new test cases in platform/tests/org-summary.test.ts reproducing the exact scenario (raw name = GitHub handle, resolved via userMap not nameToGithub; and same-repo double-counting)
  • npx vitest run — full suite passes (275/275)
  • npx tsc --noEmit — clean
  • npx eslint — clean

… GitHub handle itself

Confirmed live (gh api search/commits) that some people's git config uses
their GitHub username as the commit author name in some repos (e.g.
"lucastribioliclickbus") and their real name in others ("Lucas Tribioli"),
often paired with different commit emails (noreply vs. corporate) across
repos. When push-time API resolution failed to tie the corporate email to
a login for those specific repos, nameToGithub had no entry for the raw
handle-as-name string, splitting the person into two Hyper Engineers cards
— even though userMap already knew the mapping from a different repo's
successful resolution, just not until display time.

computeHyperEngineers now checks userMap by name during grouping too, not
only at display time, so the two variants merge into one. Also switches
repo counting from a raw counter to a Set of repo ids, so a repo that
lists the same person under two name/email variants only counts once.

Co-Authored-By: claude-code_2-1-238_agent <claude-code_2-1-238_agent@iris.invalid>
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clickbus-iris Ready Ready Preview Aug 27, 2026 7:35pm

Request Review

@clickmatos
clickmatos merged commit 59043d5 into main Aug 27, 2026
5 checks passed
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.

1 participant