Repository navigation
fix: find functions by argument type - #1686
Conversation
|
@oxura is attempting to deploy a commit to the shashankss1205's projects Team on Vercel. A member of the Team first needs to authorize it. |
…aphContext#1677) VS Code and its forks write settings.json as JSONC. json.load rejects comments and trailing commas, and the wizard treated that rejection as "no settings yet" before writing the file back, so a user's whole configuration was replaced by a lone mcpServers key. Parse JSONC before giving up, and if the file still cannot be parsed, leave it alone instead of overwriting it. Back up the file before writing either way, and say so when comments are present, since json.dump cannot preserve them. Fixes CodeGraphContext#660 Signed-off-by: Aloys Jehwin <[email protected]>
…xt#1680) Anything git ignores is now ignored by the indexer, so a repository no longer needs a .cgcignore that restates its .gitignore. Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is last-match-wins, so a negated pattern in .cgcignore can still bring a git-ignored path back into the graph. Fixes CodeGraphContext#729 Signed-off-by: Aloys Jehwin <[email protected]>
…aphContext#1682) * fix(viz): display source filenames for synthetic module nodes * fix(jobs): serialize last update time in job responses (CodeGraphContext#1679) * fix(cli): explain embedded database lock conflicts (CodeGraphContext#1684) * fix(setup-wizard): stop replacing IDE settings that are JSONC (CodeGraphContext#1677) VS Code and its forks write settings.json as JSONC. json.load rejects comments and trailing commas, and the wizard treated that rejection as "no settings yet" before writing the file back, so a user's whole configuration was replaced by a lone mcpServers key. Parse JSONC before giving up, and if the file still cannot be parsed, leave it alone instead of overwriting it. Back up the file before writing either way, and say so when comments are present, since json.dump cannot preserve them. Fixes CodeGraphContext#660 Signed-off-by: Aloys Jehwin <[email protected]> * feat(cgcignore): treat .gitignore as an ignore source (CodeGraphContext#1680) Anything git ignores is now ignored by the indexer, so a repository no longer needs a .cgcignore that restates its .gitignore. Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is last-match-wins, so a negated pattern in .cgcignore can still bring a git-ignored path back into the graph. Fixes CodeGraphContext#729 Signed-off-by: Aloys Jehwin <[email protected]> * normalize module-node label to the plain filename in all render sites --------- Signed-off-by: Aloys Jehwin <[email protected]> Co-authored-by: Donovan Yohan <[email protected]> Co-authored-by: Aloys Jehwin <[email protected]> Co-authored-by: Shashank Shekhar Singh <[email protected]>
Shashankss1205
left a comment
There was a problem hiding this comment.
Right architecture — schema migration for Function.arg_types on the embedded backends (without which any query-side fix is Neo4j-only), tool/docs updates, and the optional-match dedupe idea. One correctness fix pushed to your branch: a WHERE attached to an OPTIONAL MATCH only constrains the optional part, so the query as written never filtered f — every function came back for any search term (verified on a real Kùzu graph; the query-text mock couldn't see it). Restructured to filter after the optional parameter materializes, and replaced the text assertion with a behavioral test on a real graph: type search returns exactly the arg_types match, name search exactly the parameter match, unrelated functions never. Full suite green (1444). Thanks @oxura — closes #1685.
…1676) * feat: add SSL connection parameters to cassandra_ingester.py * feat: add SSL connection parameters to mysql_ingester.py * fix(jobs): serialize last update time in job responses (#1679) * fix(cli): explain embedded database lock conflicts (#1684) * fix(setup-wizard): stop replacing IDE settings that are JSONC (#1677) VS Code and its forks write settings.json as JSONC. json.load rejects comments and trailing commas, and the wizard treated that rejection as "no settings yet" before writing the file back, so a user's whole configuration was replaced by a lone mcpServers key. Parse JSONC before giving up, and if the file still cannot be parsed, leave it alone instead of overwriting it. Back up the file before writing either way, and say so when comments are present, since json.dump cannot preserve them. Fixes #660 Signed-off-by: Aloys Jehwin <[email protected]> * feat(cgcignore): treat .gitignore as an ignore source (#1680) Anything git ignores is now ignored by the indexer, so a repository no longer needs a .cgcignore that restates its .gitignore. Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is last-match-wins, so a negated pattern in .cgcignore can still bring a git-ignored path back into the graph. Fixes #729 Signed-off-by: Aloys Jehwin <[email protected]> * fix(viz): display source filenames for synthetic module nodes (#1682) * fix(viz): display source filenames for synthetic module nodes * fix(jobs): serialize last update time in job responses (#1679) * fix(cli): explain embedded database lock conflicts (#1684) * fix(setup-wizard): stop replacing IDE settings that are JSONC (#1677) VS Code and its forks write settings.json as JSONC. json.load rejects comments and trailing commas, and the wizard treated that rejection as "no settings yet" before writing the file back, so a user's whole configuration was replaced by a lone mcpServers key. Parse JSONC before giving up, and if the file still cannot be parsed, leave it alone instead of overwriting it. Back up the file before writing either way, and say so when comments are present, since json.dump cannot preserve them. Fixes #660 Signed-off-by: Aloys Jehwin <[email protected]> * feat(cgcignore): treat .gitignore as an ignore source (#1680) Anything git ignores is now ignored by the indexer, so a repository no longer needs a .cgcignore that restates its .gitignore. Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is last-match-wins, so a negated pattern in .cgcignore can still bring a git-ignored path back into the graph. Fixes #729 Signed-off-by: Aloys Jehwin <[email protected]> * normalize module-node label to the plain filename in all render sites --------- Signed-off-by: Aloys Jehwin <[email protected]> Co-authored-by: Donovan Yohan <[email protected]> Co-authored-by: Aloys Jehwin <[email protected]> Co-authored-by: Shashank Shekhar Singh <[email protected]> * fix: find functions by argument type (#1686) * fix: find functions by argument type * fix(jobs): serialize last update time in job responses (#1679) * fix(cli): explain embedded database lock conflicts (#1684) * fix(setup-wizard): stop replacing IDE settings that are JSONC (#1677) VS Code and its forks write settings.json as JSONC. json.load rejects comments and trailing commas, and the wizard treated that rejection as "no settings yet" before writing the file back, so a user's whole configuration was replaced by a lone mcpServers key. Parse JSONC before giving up, and if the file still cannot be parsed, leave it alone instead of overwriting it. Back up the file before writing either way, and say so when comments are present, since json.dump cannot preserve them. Fixes #660 Signed-off-by: Aloys Jehwin <[email protected]> * feat(cgcignore): treat .gitignore as an ignore source (#1680) Anything git ignores is now ignored by the indexer, so a repository no longer needs a .cgcignore that restates its .gitignore. Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is last-match-wins, so a negated pattern in .cgcignore can still bring a git-ignored path back into the graph. Fixes #729 Signed-off-by: Aloys Jehwin <[email protected]> * fix(viz): display source filenames for synthetic module nodes (#1682) * fix(viz): display source filenames for synthetic module nodes * fix(jobs): serialize last update time in job responses (#1679) * fix(cli): explain embedded database lock conflicts (#1684) * fix(setup-wizard): stop replacing IDE settings that are JSONC (#1677) VS Code and its forks write settings.json as JSONC. json.load rejects comments and trailing commas, and the wizard treated that rejection as "no settings yet" before writing the file back, so a user's whole configuration was replaced by a lone mcpServers key. Parse JSONC before giving up, and if the file still cannot be parsed, leave it alone instead of overwriting it. Back up the file before writing either way, and say so when comments are present, since json.dump cannot preserve them. Fixes #660 Signed-off-by: Aloys Jehwin <[email protected]> * feat(cgcignore): treat .gitignore as an ignore source (#1680) Anything git ignores is now ignored by the indexer, so a repository no longer needs a .cgcignore that restates its .gitignore. Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is last-match-wins, so a negated pattern in .cgcignore can still bring a git-ignored path back into the graph. Fixes #729 Signed-off-by: Aloys Jehwin <[email protected]> * normalize module-node label to the plain filename in all render sites --------- Signed-off-by: Aloys Jehwin <[email protected]> Co-authored-by: Donovan Yohan <[email protected]> Co-authored-by: Aloys Jehwin <[email protected]> Co-authored-by: Shashank Shekhar Singh <[email protected]> * fix the argument query so it filters f; behavioral pin on real kuzu --------- Signed-off-by: Aloys Jehwin <[email protected]> Co-authored-by: Donovan Yohan <[email protected]> Co-authored-by: Aloys Jehwin <[email protected]> Co-authored-by: Upanshi Mittal <[email protected]> Co-authored-by: Shashank Shekhar Singh <[email protected]> * fix(viz): render FalkorDB relationships in the live graph (#1689) parse_element classified relationships by class name, matching only Relationship/KuzuRelationship. FalkorDB's edge class is named Edge, so it matched no branch and every FalkorDB relationship was silently dropped — on the backend that is CGC's default on Unix under Python 3.12+. parse_rel directly below already reads FalkorDB edges correctly; it was never reached. The offline renderer in cli_helpers already classified by duck typing and handled this (#1453). Both renderers now share those predicates in utils/graph_shapes, so classification cannot drift apart again. * expose --ssl-verify/--ssl-ca-certs on the datasource CLI; test the driver kwargs --------- Signed-off-by: Aloys Jehwin <[email protected]> Co-authored-by: Donovan Yohan <[email protected]> Co-authored-by: Aloys Jehwin <[email protected]> Co-authored-by: Upanshi Mittal <[email protected]> Co-authored-by: Shashank Shekhar Singh <[email protected]> Co-authored-by: Mansurshakh Japarov <[email protected]> Co-authored-by: Abhinav Singh <[email protected]>
Closes #1685
find_functions_by_argumentnow searches both parameter identifiers and the parent function'sarg_typeslist. The query starts fromFunction, uses an optional parameter match, and deduplicates functions so type matches work even when a function has multiple parameters or lacks parameter nodes.The embedded Kùzu/Ladybug schema now persists
Function.arg_typesand migrates that column onto existing databases, keeping the query compatible with both embedded and schemaless backends. CLI/MCP descriptions and reference docs now describe the name-or-type behavior.Verification:
python -m pytest tests/unit/tools/test_find_functions_by_argument.py tests/unit/tools/test_kuzu_find_functions_by_argument.py -q(3 passed)ruff checkon both new regression test filespython -m py_compileon all changed Python modulescgc find argument --helpsmoke test./tests/run_tests.sh fast: 1,489 passed, 7 skipped; 23 unrelated failures remain (21 parser-golden subprocesses run a sanitized/usr/bin/pythonwithout installedtyper, plus two existing Emacs Lisp parser/indexing expectations).