Skip to content

CI mirror: PR #196 (fork PR full-matrix run) - #197

Closed
ualtinok wants to merge 6 commits into
mainfrom
ci/pr-196
Closed

CI mirror: PR #196 (fork PR full-matrix run)#197
ualtinok wants to merge 6 commits into
mainfrom
ci/pr-196

Conversation

@ualtinok

@ualtinok ualtinok commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Internal CI vehicle for fork PR #196 (fork PRs skip secret-gated jobs on this repo). Not for merge — will be closed after the matrix verdict is posted to #196.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Improves Rust call-graph precision by inferring receiver types for direct self.field.method() calls and linking only when the field type is provable in the same file and module scope. Also normalizes receiver parsing (including whitespace) and uses candidate start_line to locate the correct impl.

  • New Features

    • Infer Rust receiver type from direct self.field when both the struct and field type are uniquely declared in the same file/module.
    • Store receiver_expression and parse the full left side; trims whitespace around ./::/->.
    • Read candidate start_line to find the enclosing impl for accurate scope checks.
  • Bug Fixes

    • Block false positives where self.field binds to unrelated methods (e.g., same-named types in other modules or stdlib).
    • When the Rust field type is recognized but unresolved (e.g., generics, trait impls, aliases, references, wrapped types), do not fall back to name-match.

Written for commit aa340e2. Summary will update on new commits.

Review in cubic

Greptile Summary

This PR adds conservative Rust type inference for direct self.field.method() dispatch and scope-aware candidate selection.

  • Preserves the full receiver expression for dispatch analysis.
  • Uses candidate source lines to locate enclosing Rust impl blocks.
  • Adds unit and integration coverage for local type matches and ambiguous or unrelated types.

Confidence Score: 4/5

The PR does not appear safe to merge because unresolved direct Rust self-field receivers still lose otherwise available callgraph edges.

KnownButUnresolved still exits dispatch before the approximate name-match fallback, so calls through generic, trait-impl, reference, alias, wrapped, and other unsupported field types can disappear from call trees, reverse callers, impact analysis, and reachability.

Files Needing Attention: crates/aft/src/callgraph_store/mod.rs

Important Files Changed

Filename Overview
crates/aft/src/callgraph_store/mod.rs Adds direct Rust self-field type resolution, but the previously reported loss of fallback edges for unresolved field types remains.
crates/aft/tests/integration/callgraph_store_name_match_test.rs Adds integration coverage for precise local matches and suppression of unrelated same-named candidates.

Reviews (2): Last reviewed commit: "Merge branch 'pr-196' into ci-pr196-reba..." | Re-trigger Greptile

inserted += 1;
continue;
}
ReceiverTypeInference::KnownButUnresolved => continue,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Unresolved fields lose fallback edges

When a direct self.field.method() receiver uses a generic, trait, reference, alias, wrapped, or non-local type that exact inference does not support, KnownButUnresolved skips the existing name-match fallback, causing valid call-tree, reverse-caller, impact, and reachability edges to disappear.

Suggested change
ReceiverTypeInference::KnownButUnresolved => continue,
ReceiverTypeInference::KnownButUnresolved => {}

@ualtinok

ualtinok commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

Matrix verdict delivered on the rebased head (all jobs green, Windows format flake cleared on rerun); #196 is merged. Closing the CI vehicle.

@ualtinok ualtinok closed this Aug 8, 2026
@ualtinok
ualtinok deleted the ci/pr-196 branch August 8, 2026 19:19
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.

2 participants