fix(support): drop recommendation edges pointing beyond the graph node cap#3917
Closed
TaprootFreak wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
|
Superseded by the consolidated #3948 (now targets develop and includes this fix). |
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.
Problem
getRecommendationGraphcaps the BFS atMAX_NODES(500). Ref-code (UsedRef) edges are already filtered to endpoints contained invisitedUsers, but recommendation edges are not. When the cap is reached, a recommendation edge can reference a node that was queued but never loaded, so the response contains edges pointing to nodes that are absent fromnodes[]. The graph screen drops those edges silently and its edge counter over-reports (edges.lengthvs. rendered).Fix
Apply the same
visitedUsersmembership guard to recommendation edges that the ref-code edges already use. Minimal, consistent with the existing pattern, no DTO/contract change.Verification (real data, userDataId 321067)
edgeCount584; frontend rendered 514.edgeCount514 == rendered edges; node cap (500), dedup, ref-code edges, panel and navigation all unchanged.prettier,eslint,buildgreen.Targets the #3897 feature branch so the fix folds into that PR.