Skip to content

Label bare-name method elections; strict mode declines them - #9

Closed
haoran-ding wants to merge 1 commit into
mainfrom
fork/no-bare-name-method-guess
Closed

Label bare-name method elections; strict mode declines them#9
haoran-ding wants to merge 1 commit into
mainfrom
fork/no-bare-name-method-guess

Conversation

@haoran-ding

Copy link
Copy Markdown

Default behavior unchanged: a bare-name calls ref elected among K same-named METHODS by proximity now carries methodCandidates: K in edge metadata. CODEGRAPH_STRICT_METHOD_RESOLUTION=1 declines the election instead (ref stays in unresolved_refs). Motivation: Rust extraction records method calls bare; (*uptr).assume_init_mut().queue.init() resolved to the neighboring ProcessManager::init instead of StaticLinkedList::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

…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>
@haoran-ding
haoran-ding deleted the fork/no-bare-name-method-guess branch August 23, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant