Label bare-name method elections; strict mode declines them - #9
Closed
haoran-ding wants to merge 1 commit into
Closed
Label bare-name method elections; strict mode declines them#9haoran-ding wants to merge 1 commit into
haoran-ding wants to merge 1 commit into
Conversation
…nes them A bare-name calls ref with SEVERAL same-named METHOD candidates is resolved by file/directory proximity — a heuristic guess, since method dispatch is decided by the receiver's type, which a bare ref has lost. Rust extraction records every method call bare, and the guess handed FM-Agent's verification pipeline `ProcessManager::init` for a call that reads `(*uptr).assume_init_mut().queue.init()` — an unrelated same-directory type. Default behavior is unchanged (per-app election is what colbymchenry#764 relies on), but the edge metadata now carries `methodCandidates: K` so a type-aware consumer can re-check the guess. CODEGRAPH_STRICT_METHOD_RESOLUTION=1 declines the election instead: the ref stays in unresolved_refs rather than becoming a confident wrong edge. Unique names and receiver-bearing refs are unaffected in both modes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Default behavior unchanged: a bare-name calls ref elected among K same-named METHODS by proximity now carries
methodCandidates: Kin edge metadata.CODEGRAPH_STRICT_METHOD_RESOLUTION=1declines the election instead (ref stays in unresolved_refs). Motivation: Rust extraction records method calls bare;(*uptr).assume_init_mut().queue.init()resolved to the neighboringProcessManager::initinstead ofStaticLinkedList::init, and FM-Agent's verification pipeline reasoned about the wrong function. Suite: 2905/2905. On the Atmosphere crate: 323/1706 edges annotated (default) = 323 declined (strict); the wrong edge lands in unresolved_refs. See FORK.md patch table + CHANGELOG.🤖 Generated with Claude Code