feat(graph): implement two-pass symbol resolution for PropertyGraph - #20
Merged
Merged
Conversation
ManSio
commented
Aug 29, 2026
Owner
- Transition graph building from single-pass to Extract -> Resolve model.
- Enrich placeholder nodes with call metadata (caller_node_id, line_number, raw_symbol_name).
- Add GraphSymbolResolver to resolve placeholders via imports, unique global names, and stdlib.
- Integrate resolver pass in GraphRAG, Indexer, and SymbolIndexAdapter.
- Add test_graph_resolver.py covering all resolution strategies and cleanup.
- Transition graph building from single-pass to Extract -> Resolve model. - Enrich placeholder nodes with call metadata (caller_node_id, line_number, raw_symbol_name). - Add GraphSymbolResolver to resolve placeholders via imports, unique global names, and stdlib. - Integrate resolver pass in GraphRAG, Indexer, and SymbolIndexAdapter. - Add test_graph_resolver.py covering all resolution strategies and cleanup.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
added 7 commits
August 29, 2026 12:27
- Sync AGENT_DIARY.md with symbol resolution implementation. - Rotate KNOWN_ISSUES.md to archive 2026-07. - Add check_known_issues script and update pre-commit hooks installer. - Add NodeLabel.DEPENDENCY to graph core.
_find_nodes_flexible now also queries the bare last-dot component when the symbol is qualified (Class.method), because CALLS edges from unqualified parser output live on bare nodes. Prior behavior under-estimated blast radius for any object-method call (impact_analysis returned 0 callers). Funnel-shared fix covers both impact and topology paths. Also fix stale health docstring (timeout=30s -> actual 15s).
Write path (issue #21): modification_guard and the one-target write_tools ops (move/replace/insert_before/insert_after) now REFUSE a symbol that resolves to >1 definition instead of silently picking defs[0]'s file - a write could hit the wrong module. Ambiguity returns the full candidate list (file:line) so the caller can pass an explicit file_path matching exactly one. Verify-on-read (issue #22): symbol anchors are now fail-closed. The graph/index carries no freshness mark in this build, so "not found" cannot prove absence: _symbol_resolver returns only True (referent on disk -> VERIFIED) or None (unknown/absent -> INCONCLUSIVE), never False; _classify maps any non-True symbol check to INCONCLUSIVE, never REFUTED. Honest REFUTED becomes reachable only after the freshness layer (build HEAD + clean tree) lands separately. Fixes #21 Fixes #22
Verify-On-Read REFUTES a symbol only when the index it was checked against provably reflects the current codebase: - record `build_head` in graph meta on a successful full index (index_project); - read-time: `_symbol_resolver` returns False (REFUTED) only when that recorded build_head equals the live HEAD on a clean tree; legacy index / HEAD mismatch / non-git / dirty tree / resolver failure -> None (INCONCLUSIVE), never REFUTED; - drop the fail-closed symbol branch in `_classify` — freshness is now the resolver's job, the classifier trusts it again; - pure gating helpers `evaluate_freshness` + `resolve_head_dirty` in verify_on_read.py, plus PropertyGraph meta (set_meta/get_meta) and SymbolIndexAdapter.build_head(). Opens honest REFUTED for absent symbols from a fresh index while keeping the stale-index guarantee fail-closed (issue #22). 1602 tests green, ruff clean. Fixes #21 Fixes #22
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.