Repository navigation
impact, context: list the call sites of a name that is called but declared nowhere - #1810
Merged
Merged
Conversation
… call sites
Asked about a function that is called but not yet written, impact counted the sites ("`scale` as written at 1
unresolved call site(s)") and then answered "directly touches it: nothing" and "the change is local"; --grep printed
no rows; context dropped the word, since only declared names reach its ranking. Writing such a function starts from
exactly those sites, and a text search finds them in one call.
- impact: each unresolved call site of a name-matched (written) target is a direct row, [by name], "calls it (no
declaration of this name)" at its file:line, so the prose, --json and --grep answers carry them.
- context: identifiers the task writes that the code calls and nothing declares are listed first, with their call
sites and code lines (called_undeclared in --json), before anything that can stop the answer early.
- ax_grep: those sites lead the grep-shaped context answer the MCP tools return by default.
tests/cases/python/called-but-undeclared: 4/4 here, 2/4 on the base (the two controls, a declared function, pass on both).
Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 30, 2026 06:31
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.
Asked about a function the code calls but that is not written yet,
impactcounted the call sites but never said where they are:The other surfaces missed them too:
--grepprinted no rows.contextdropped the word, because only declared names reach its ranking.When writing a function that is already called but not yet written, those call sites are what you need first. A text search finds them in one call, so an agent limited to the graph could not find them.
Change
impact: each unresolved call site of a name-matched target is now a direct row, e.g.[by name] Circle.area app/shapes.py:14 — calls it (no declaration of this name). It appears in the prose,--jsonand--grepoutput.context: an identifier the task mentions that the code calls but nothing declares is now listed first, with its call sites and code lines (called_undeclaredin--json). It is computed before anything that can end the answer early.ax_grep: those call sites lead the grep-shapedcontextanswer that the MCP tools return by default.Tests
tests/cases/python/called-but-undeclared: 4/4 checks pass with this change, 2/4 on the base branch. The two controls, both on a declared function, pass on both.tests/run.py: 1199/1209 checks pass. All 10 failures also fail identically on the base branch (5 cases, fixed separately).