Repository navigation
fix(query): drop "get" filler verbs from query terms - #4686
AndresDiagoM wants to merge 1 commit into
Conversation
"get" survived stopwording, so a question like "how does X get authorized" exact-matched framework hubs such as a NestJS Get decorator import and made it a BFS seed. Graphify-Labs#1602 guards short low-degree leaves, not hubs. Add get/gets/got/getting next to work/works/working; node text, find_node/explain and the all-stopwords fallback are unchanged. Fixes Graphify-Labs#4684 Co-Authored-By: OpenAI Codex <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for the pull request, @AndresDiagoM. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; no formal proof of the changed code.
Graphify review — findings
Adds get, gets, got and getting to the query stopwords, so a question like "how does payroll approve get authorized" no longer seeds on a framework hub such as a NestJS Get decorator import (#4684). The filter only applies to query terms; node lookup stays unfiltered, so a symbol literally named Get is still findable via _find_node, and a query made only of these words falls back to the unfiltered terms. Tests cover the verb variants, the all-stopword fallback, and a hub-heavy graph where get is no longer picked as a seed.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 764 functions depend on the 407 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
_score_query()— 18 callers, 7 callees - worse:
_query_terms()— 22 callers, 3 callees
Verification — 764 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 567 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
16 of 443 test file(s) selected (4%) via static blast radius.
tests/test_benchmark.py— impacttests/test_benchmark_raw_graph.py— impacttests/test_benchmark_real_query.py— impacttests/test_explain_same_file_tie.py— impacttests/test_file_label_disambiguation.py— impacttests/test_mcp_graph_view_cache.py— impacttests/test_path_cli.py— impacttests/test_query_induced_edges.py— impacttests/test_query_mcp_direction.py— impacttests/test_query_names_its_graph.py— impacttests/test_query_seed_order.py— impacttests/test_query_seeds.py— impacttests/test_serve.py— impact, changed-testtests/test_serve_http.py— impacttests/test_terraform.py— impacttests/test_truncation_full_answer.py— impact
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
· 2 more finding(s) on lines outside this diff (see the check run).
|
Landed in v0.9.97, now on PyPI (pip install graphifyy==0.9.97). Filler verbs like get/got are dropped from query terms so a framework hub is not pulled in as a seed. Thanks for the fix, @AndresDiagoM. |
What does this PR do?
Fixes #4684.
Questions such as "how does payroll.approve get authorized" keep the term
get. In codebases whoseframework exports a symbol named
Get(a NestJS@Get()decorator import, HTTP routers), thatsymbol is a high-degree hub: the term exact-matches its label, gets
_EXACT_MATCH_BONUS, andbecomes a BFS seed, so the traversal starts in the controller layer instead of at the content
words. #1602's guard covers short, low-degree leaves, not hubs.
This adds
get,gets,got,gettingto the English part of_QUERY_STOPWORDS, next towork/works/working, which exist for the same reason, and extends the comment above the set.Type of change
Verification & Invariants
Only query terms change. Node text,
_find_node/explain/path/get_noderesolution,affectedseed resolution, scoring constants and the all-stopwords fallback are unchanged. TheCLI, the MCP
query_graphtool and the benchmark's real-graph mode all go through_query_termsand inherit the change. No persisted graph, cache or generated artifact is affected.
Regression tests (
tests/test_serve.py):test_query_terms_drops_get_question_filler:['payroll', 'approve', 'get', 'authorized']→['payroll', 'approve', 'authorized'].test_query_terms_drops_get_variants:gets/got/getting.test_query_terms_get_only_falls_back_to_unfiltered:"get"→['get'],"how do I get it"→['how', 'get'].test_pick_seeds_get_question_ignores_framework_hub: 20 controllers importing aGethub; seeds were['get', 'approve']before the fix,getis absent after it, and_find_node(G, "Get")still resolves the hub.With the stopword line removed, the new term and seed tests fail (seeds
['get', 'approve']); with it, they pass.Limitations. The filter applies to every question, not only bare HTTP-verb queries: in a mixed
question the word is dropped and the remaining terms drive seeding, e.g.
GET endpoint→['endpoint'],get user→['user'],got request→['request']. That loses the GET-vs-POSTdistinction and a literal function or package named
get/gotin mixed questions. Theall-stopwords fallback only restores the term when nothing else is left. Identifiers that merely
contain the word (
getter,getValue,get_user) are single tokens and unaffected, andexplain "Get"still finds the symbol.How was this tested?
Linux (WSL2, Ubuntu 22.04), Python 3.10.
Graphify-specific checklist
uv run python -m tools.skillgen --bless) when changing their source fragments. (not applicable: no fragments touched)Co-Authored-Bytrailers: OpenAI Codex wrote the implementation and tests; Claude designed the change, coordinated an independent review and drafted the issue and PR text.)