Stop user-cred from counting reverse linked-account edges - #165
Open
Pitchfork-and-Torch wants to merge 1 commit into
Open
Stop user-cred from counting reverse linked-account edges#165Pitchfork-and-Torch wants to merge 1 commit into
Pitchfork-and-Torch wants to merge 1 commit into
Conversation
Account-expansion pairs are undirected. Matching only (userId, linkedUserId) left alt→main follows and engagements in the PageRank graph, so linked alts could still pump mass into the primary account. Co-authored-by: Jon Bailey <Pitchfork-and-Torch@users.noreply.github.com>
This was referenced Sep 7, 2026
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.
Bug
filterLinkedUserEdgesexists to keep linked-account pairs out of UserCred PageRank. It joined follow and engagement edges on the exact ordered pair(userId, linkedUserId)fromAccountExpansionInvestigations.That dataset is an undirected investigation pair, not a graph edge. Flock follows and 7-day fav/RT edges are oriented the other way: follower→followee, engager→author. Mass flows that same direction.
Proof
(mainId, altId).(altId, mainId).(altId, mainId)≠(mainId, altId)→ edge kept.isHighPageRankV2/cred.score. Abuse enforcement skips oncred.is_high || cred.score >= 50. Safety-label user-agg excludes high page-rank users from NSFW account labels.Main→alt was the only direction dropped — the one that does not inflate the primary.
Fix
Emit both orders of each linked pair (skip self-pairs).
filterLinkedUserEdgesis unchanged. If the snapshot already stores both directions, the extra keys are a no-op.One file:
user-cred-v2/UserCredV2App.scala.Not a home-mixer / VF / Thunder change. Not a fork PR.