Skip to content

fix(scrapers): resolve an alias-keyed user to the real account and fold alias-twin researchers - #4990

Merged
quntao-z merged 1 commit into
betafrom
fix/alias-twin-accounts
Oct 11, 2026
Merged

quntao-z merged 1 commit into
betafrom
fix/alias-twin-accounts

Conversation

@quntao-z

Copy link
Copy Markdown
Collaborator

Closes #4988

What changes

  • Readers: joinUserIdentityToExistingResearcher and resolveInferredPiKeyIdentity no longer let a local-part netid stop at its own twin account.
    When the key's netid is an email local part and resolveNetidForRosterEmailAlias resolves 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-dedupe folds 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 email observation 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.
  • The archived twin researcher drops its accountId, because the index allows one researcher per account and accounts: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 as both-accounts-link-a-researcher.

Measured on Development (dry run)

  • researcher-dedupe plans 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.
  • Integration test: the reader reaches the real researcher, and after the fold the alias key still reaches a live record, also with the twin account archived; reverting the reader change fails it.

Data operation

Stored-data fix: run researcher-dedupe (researchers:dedupe-accountless-shells --apply), then accounts:merge-local-part-netid-twins --apply, on Development, and verify integrity-gate duplicatePeople and the observation keys still resolving.

@ycs-ylabs-maintenance
ycs-ylabs-maintenance temporarily deployed to fix/alias-twin-accounts - yalelabs-beta PR #4990 October 11, 2026 20:23 — with Render Destroyed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved automatically: the author holds the Admin repository role (#4512).

@quntao-z
quntao-z added this pull request to the merge queue Oct 11, 2026
Merged via the queue into beta with commit 32a6ade Oct 11, 2026
10 checks passed
@quntao-z
quntao-z deleted the fix/alias-twin-accounts branch October 11, 2026 20:33

This branch was successfully deployed

No deployments
fix/alias-twin-accounts - yalelabs-beta PR #4990 — 437f1747 Deployed Oct 11, 2026 by ycs-ylabs-maintenance
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.

fix(scrapers): resolve an alias-keyed user to the real account and fold the 3 alias-twin researchers

2 participants