feat(support): recommendation graph — ref-code edges, edge-cap fix & lazy 1-hop expansion#3948
Open
TaprootFreak wants to merge 10 commits into
Open
feat(support): recommendation graph — ref-code edges, edge-cap fix & lazy 1-hop expansion#3948TaprootFreak wants to merge 10 commits into
TaprootFreak wants to merge 10 commits into
Conversation
…on network graph The compliance recommendation network graph and panel only read the Recommendation table, so classic ref-code relationships (user.usedRef -> user.ref) were invisible even though they drive AML (InvalidKycStatusRefUser) and ref rewards. Traverse usedRef in both directions during the graph BFS, emit deduplicated ref-code edges (recommendation wins for shared pairs), expose the referrer userData id on user support info, and index user.usedRef for the reverse lookup.
…counts); always include upward referrers in neighbors
|
…t external-degree expandability, RefEdge type, enum edge fields, controller presence checks
…point, page-size const, self-pair/NaN guards, test hardening
…n, drop dead neighborIds, filter self-loop edges
…der side-effect, real migration timestamp, centralize ref predicate
…p take with Max, fix stale edge-id comment, cover getUsersByUsedRefs
3 tasks
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.
Consolidated PR — the complete referral-network work for the support recommendation graph, in one unit against develop.
Includes
user.usedRef → user.refrelationships asUsedRefedges in the recommendation graph (deduplicated against recommendations),refUserDataIdin the support user info, and an index onuser.usedRef.GET support/recommendation-graph/:id/neighbors?skip&take(paginatedhasMore, cheap per-nodeexpandable) for progressive expansion — avoids the 500-node hairball for hub accounts.Shared helpers (
collectHop,buildGraphPayload) keep the full-graph and neighbors endpoints consistent. Verified end-to-end on real production data (userData 321067, hub 2085) on a local stack. Build/eslint green.Supersedes the separate PRs #3897 and #3917.