Repository navigation
Require indexed relationships for dispatch expansion - #907
Merged
Merged
Conversation
Same-name methods on unrelated classes cannot establish virtual dispatch. Keep exact override and inheritance paths, and expose missing relationships through the graph uncertainty metadata. Signed-off-by: zlareb1 <[email protected]>
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
code.callersandcode.impactrequire indexed override or inheritance relationships when expanding a method to its base declarations. Unrelated methods with the same name and signature are excluded from that expansion.Why
A matching method name and signature do not establish virtual dispatch. Adding an unrelated class as a base produces false callers and impact results, including when
include_ambiguous=false. Missing relationships must remain an explicit limit of the graph answer.Scope and risk
The shared dispatch resolver keeps exact override edges and the bounded inheritance walk. The name-only fallback and its unused store query are removed, together with the corresponding analyzer fixture and SQL shape. Results can contain fewer edges when inheritance is not indexed. Regression tests retain genuine override and inheritance paths and check lower-bound metadata.
Compatibility, rollout and rollback
dispatch_seedsno longer reports unsupportedvirtual_by_nameguesses; generated reference comments describe the remaining relationship sources.Tests
The regression failed before the source fix on four depth/ambiguity variants and the impact expansion. The final regression exercises the full callers handler and checks hop counts and missing-dispatch disclosure.
Focused local checks passed:
git diff --checkpass.Core reproduction:
Full local suites were deferred to CI.
AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (Codex wrote the diff): the request evidence, shared callers and impact paths, generated output and focused regression results were checked.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed.