fix(extraction): record callers for methods passed as values (#1820) - #1894
Open
JosefAschauer wants to merge 3 commits into
Open
JosefAschauer wants to merge 3 commits into
JosefAschauer wants to merge 3 commits into
Conversation
…henry#1820) pool.submit(obj.method), thread_pool_exec(self.store.fetch), and Go Submit(c.store.Fetch) produced no callers/impact edge because only obj.method(...) call expressions were captured. Member values are now emitted as *.method function-refs and resolve unique-or-drop (same-file first). Two methods of the same name still produce no edge. Go go c.store.Fetch(ids) remains a calls edge (it is a call expression). EXTRACTION_VERSION 27: MCP daemon catch-up rebuilds a stale index on start so the watcher does not keep serving the hole after upgrade.
…value callers A unique production method plus a unit-test double of the same name was treated as ambiguous, so retrieve_vision_vectors still looked callback-invisible on a real repo. Prefer the non-test file when exactly one production target remains.
colbymchenry#1820 unique-or-drop treated DocStoreConnection.delete_payload_fields (the ABC stub) and QdrantConnection.delete_payload_fields as ambiguous, so gc_stale_member_stamps stayed invisible. Skip short not-implemented stubs when exactly one real implementation remains.
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.
Fixes #1820
Problem
codegraph callers/impactonly recordedobj.method(...)call expressions. A method passed as a first-class value had no production edge:A unique production method then looked test-only.
Approach
Same capture/resolution discipline as existing function-as-value (#756):
self.store.fetch/Foo.parsein a value position →*.fetchfunction-refc.store.Fetchin a value position →*.Fetchfunction-refself.method/this.methodpaths unchangedfetchmethods still produce no edge — a wrong callback is worse than none)Native kernel (python.rs / go.rs) and the wasm
function-ref.tspath stay in lockstep.EXTRACTION_VERSION27.Watcher / daemon
Incremental
sync()cannot backfill new edge kinds. MCPcatchUpSync()now callsindexAll()whenisIndexStale()socodegraph serve --mcprebuilds once after upgrade; the file watcher then keeps those edges current on subsequent edits.Tests
__tests__/function-ref.test.ts: Python unique-method callback, Python decoy (twofetchmethods → no edge), GoSubmit(c.store.Fetch)+go c.store.Fetch(ids). 23/23 in that file on Node 22.