Repository navigation
Fix #6149: resolve has_method edges regardless of symbol declaration order - #6188
Open
wanjinhao1 wants to merge 1 commit into
Open
wanjinhao1 wants to merge 1 commit into
wanjinhao1 wants to merge 1 commit into
Conversation
…declaration order
wanjinhao1
requested review from
RaghavChamadiya and
swati510
as code owners
November 22, 2026 18:10
Contributor
|
🟢 Safe to merge. No open points. Defers intra-file has_method containment edges in GraphBuilder.add_file until all of a file's symbols are added, so a method emitted before its class or struct still gets its edge. Adds three ordering tests. Checked: health of changed files Fair (unchanged), no new security findings.
Settings and updatesSilence one PR with |
This branch has not been 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.
Summary
GraphBuilder.add_filenow defers intra-filehas_methodcontainment edges until all symbols of the file are added, then resolves them in a second passimplabove itsstruct) keeps itshas_methodedge instead of silently dropping itRelated Issues
Fixes #6149
Test Plan
pytest) —tests/unit/ingestion/test_graph.py(66 passed), plustests/unit/pipeline/test_incremental_graph_patch.pyandtests/unit/pipeline/test_graph_seed_cache.py(164 passed total)ruff check .) — ruff clean on both changed filesnpm run build) — no frontend changesNew
TestHasMethodEdgeOrdercases cover method-before-parent, parent-before-method, and missing-parent.Checklist
This change was implemented with AI assistance and reviewed by me (@wanjinhao1).