Repository navigation
fix(parsers): context-attribution batch from the #1538 audit — 7 findings across 7 languages - #1657
Merged
Merged
Conversation
…ings across 7 languages Call-site class_context was structurally dead outside Python/C++: - java/csharp: _get_parent_context returns the enclosing METHOD first, so the 'is it a class?' test never passed — every call carried (None, None)/None. Both walk again with class-like types only (cpp.py's pattern) and emit the canonical (name, line) tuple, activating super()/same-name-method resolution. - swift: class_context was hardcoded (None, None) and args hardcoded []; both are now extracted, and the bare-except that swallowed every extraction failure logs before continuing. - php: one call list carried two shapes — a bare string for plain calls and a dead (None, None) tuple for . Unified via _get_enclosing_class. - rust: impl methods carried only module_context, so Point::new was an orphan never linked to Point; the impl_item's type field now lands as class_context (+line), covering inherent and trait impls. Scoped calls also record the receiver type in inferred_obj_type as resolution groundwork. Nested-function containment outside Python: - javascript computed context/context_type and then dropped them — stored now (bare-name contract, matching python.py). - the writer's nested-CONTAINS gate matched only the literal Python node type 'function_definition'; it now accepts the function-ish node types of every grammar, recovering nested containment for JS/TS/Lua/PHP (+22 CONTAINS edges across those goldens). Rust CALLS drops 9 edges — all verified false positives (Arc::new, Box::new, Mutex::new mis-bound to an unrelated local `new`); scoped-call resolution itself is a pre-existing gap tracked separately. Unit suite 1398 passed / 7 skipped; all 21 goldens green after regeneration.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ |
Contributor
🔍 PR Code Graph Analysisfix(parsers): context-attribution batch from the #1538 audit — 7 findings across 7 languages (#1657) 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
This was referenced Aug 19, 2026
Merged
Shashankss1205
added a commit
that referenced
this pull request
Aug 26, 2026
… (#1668) The chain assembled across #1657 (impl-method class_context + scoped-call receiver types) and #1510 (label-aware called-context clause) makes scoped constructor calls resolve correctly: same-named news bind to their own impl and external Arc::new does not mis-bind locally. Pinned on a real embedded database so a regression in any of the three pieces fails this test.
This branch was successfully 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.
Third batch from the #1538 audit (C++ in #1628, wrong-values/missing-declarations in #1654). Unit suite 1398 passed / 7 skipped; all 21 goldens green after regeneration.
Call-site
class_contextwas structurally dead outside Python/C++:_get_parent_contextreturns the enclosing method first, so the class test never passed — every call carried a dead context. Both now walk again for class-like ancestors only (cpp.py's pattern) and emit the canonical(name, line)tuple, activating the super()/same-name-method resolution paths.class_contextwas hardcoded(None, None)andargshardcoded[]— both extracted now, and the bare-except: continuethat swallowed every extraction failure logs first.new X(). Unified.class_context, soPoint::newwas an orphan never linked toPoint. Theimpl_item's type field now lands as owner (+line) for inherent and trait impls; scoped calls also record their receiver type as resolution groundwork.Nested-function containment outside Python:
Rust CALLS −9 on the golden — all verified false positives:
Arc::new/Box::new/Mutex::newwere mis-bound to an unrelated localnew. Scoped-call (X::y()) resolution itself turns out to be a pre-existing gap (zero edges even pre-change on a minimal repro) — filing separately.Addresses the context-attribution section of #1538; the duplicate/spurious-records section remains.