Skip to content

fix(code-finder): match find_functions_by_argument against arg_types not parameter names - #1687

Closed
AloysJehwin wants to merge 1 commit into
CodeGraphContext:mainfrom
AloysJehwin:fix/find-functions-by-argument-type
Closed

AloysJehwin wants to merge 1 commit into
CodeGraphContext:mainfrom
AloysJehwin:fix/find-functions-by-argument-type

Conversation

@AloysJehwin

Copy link
Copy Markdown
Contributor

Fixes #1685.

find_functions_by_argument was matching against Parameter.name (the variable name) rather than the argument type. For typed languages like Java, type information lives on Function.arg_types, not on the Parameter node, so queries for types like OrderFilter returned no results.

The Cypher query now uses any(t IN f.arg_types WHERE t CONTAINS $arg_type) to match against the type list, with a fallback to parameter-name matching for untyped languages.

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

@AloysJehwin is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Thanks @AloysJehwin — #1686 landed first for #1685 and carried the piece this one was missing: Function.arg_types is not a declared column on the embedded backends (KùzuDB/LadybugDB, the defaults), so a query-only change can't fix the report there; the schema migration had to come with it. Your CONTAINS-vs-exact matching thought is noted for a follow-up if generic types like Page<Order> need partial matching. FWIW the merged query needed surgery too — the original never filtered f at all, which is now pinned by a behavioral test on a real graph. Closing as overlapping.

@AloysJehwin

Copy link
Copy Markdown
Contributor Author

All CI failures here are pre-existing on main and unrelated to this change:

  • Build Test (3.12/3.13/3.14): test_elisp_parser.py::test_parse_elisp_normalized_output — KeyError: 'sample-callback' — also fails on main (e.g. run 33686444387)
  • db-parity: ladybugdb exit code -11 (SIGSEGV in the ladybug shared library) — also fails on main (run 33686444386)
  • e2e: same ladybugdb crash — also fails on main (run 33686444388)

This PR could not be reopened (viewer lacks reopen permission despite being author). Re-submitted as #1701.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

find_functions_by_argument matches Parameter.name, not type — Parameter nodes have no type property

2 participants