Repository navigation
fix(scrapers): resolve an alias-keyed user to the real account and fold alias-twin researchers - #4990
Merged
Merged
Conversation
…ld alias-twin researchers Closes #4988.
ycs-ylabs-maintenance
temporarily deployed
to
fix/alias-twin-accounts - yalelabs-beta PR #4990
October 11, 2026 20:23 — with
Render
Destroyed
There was a problem hiding this comment.
Approved automatically: the author holds the Admin repository role (#4512).
This was referenced Oct 11, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4988
What changes
joinUserIdentityToExistingResearcherandresolveInferredPiKeyIdentityno longer let a local-part netid stop at its own twin account.When the key's netid is an email local part and
resolveNetidForRosterEmailAliasresolves it to a different live account, that account wins.Only local-part netids that already reach an account pay the extra lookup, which is 8 accounts on Development.
researcher-dedupefolds an alias-twin researcher into the real one through its existing merge path (edges repointed or archived as redundant, attributes unioned, roster rows re-gated).The alias map only proposes, because it reads every
emailobservation including a lane that has attached a namesake's profile, so the two display names must also agree, using the fix(scripts): fold researcher duplicates split by an unprobed link or a compound surname #4920 surname rule plus a given name found among the other record's given names.A twin account that has signed in is refused.
accountId, because the index allows one researcher per account andaccounts:merge-local-part-netid-twins(fix(accounts): refuse minting a non-netid account and merge local-part twins #4782) repoints that field when it merges the twin account next; that tool refused these exact pairs asboth-accounts-link-a-researcher.Measured on Development (dry run)
researcher-dedupeplans 3 alias-twin folds, the 3 the gate reports.Refused: 4 local-part accounts whose alias does not resolve, 1 whose resolved account is not live.
Data operation
Stored-data fix: run
researcher-dedupe(researchers:dedupe-accountless-shells --apply), thenaccounts:merge-local-part-netid-twins --apply, on Development, and verifyintegrity-gateduplicatePeopleand the observation keys still resolving.