Repository navigation
fill: list the open call sites the project may own and settle them in batches (#1835) - #2028
Merged
Merged
Conversation
… keeps its own version) 0.2.3 is released, so what merges into this branch ships in 0.2.4. package.json (version and the five @axiomcode/engine-* pins) and the four editor plugin and extension manifests move from 0.2.3 to 0.2.4. The parser keeps its own version.
…m in batches, and say so once per build The engine has done what it can by the end of a build; the sites it leaves are calls through a value (a handler table, a callback parameter, getattr, reflection) or a member called on a receiver it could not type. An answer listed the ones it stopped at; nothing listed them all, and nothing told the agent to look. - `axiomcode unresolved` / MCP `unresolved(limit, decisions)`: a summary line, then the open sites inside the most called callers first, each with its code, the engine's reason and its candidates. Only sites that may land in the project are listed: a member call needs a project method of that name, a bare call through a value counts unless the file imports the name. A library's method on an untyped value is counted, not listed. - `link --batch -`: links, rejected leads (`not:`) and `?` (read, nothing certain) in one apply, each validated as a single link is. A `?` or a rejection is kept in .axiomcode/fill-skipped.tsv keyed by the line's text, so the site is asked again only when its line changes. - the build ends with the summary line; the first prompt (hook) and the first query answer (MCP, for hosts without hooks) after a build say how many sites are open and how to fill them, once per build. - skill `fill` (`/axiomcode:fill`), forked into a subagent where the host supports it: read each site, link only what the code makes certain, return one line.
… import is a package's name
- `subprocess.run(cmd)`, `asyncio.run(..)`, `child_process.exec(..)` matched the reflective names (`run`, `exec`) and
every answer listed them under "to resolve" as running a value. A call written on a process or event-loop module,
read through an import alias (`import a as b, subprocess as sp`, `import * as cp from 'child_process'`), is no
longer one. Method.invoke, Function.apply and Thread.run still are.
- a JS/TS `import { z } from 'zod'` line was read by the Python import rule, so its names were never taken as a
package's and a bare call of one was listed as a call through a value; a relative import is still the project's own.
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
November 18, 2026 23:39
…als and workspace packages
Measured on a TypeScript monorepo, the fill list dropped every call through a local value there: the bare-call kinds
were Python's only. And it kept what is not the project's:
- a bare call is FUNCTION_CALL / JSX_COMPONENT_CALL in TypeScript and JavaScript and INVOCATION / DELEGATE_INVOKE in
C#, not only SIMPLE_CALL (`const { useWidget } = ctx; useWidget()` was filed as a library's)
- an import whose braces span lines (`import {\n expectTypeOf,\n} from 'vitest'`) is read; the reader is bounded, so a
Python file's `import` lines cannot make it scan the whole file (a 120 s worklist on a 70k-line project before)
- a runtime or test-runner global (`fetch`, `expect`, `expectTypeOf`, `assert`) is the platform's, unless the file
imports the project's own declaration of that name from a relative path or a workspace package
- an import from one of the repository's own workspace packages (a monorepo's `@scope/core`) is the project's
- a bare call reaches functions, classes, consts and variables, never a method; a call on a receiver reaches methods
…olved The summary line was printed after `graph at <path>`, which callers read as the build's last line (tests/publish_order.py's one-language control). It now prints just above the warnings and that line. AGENTS.md lists the unresolved tool, and the Gemini skill copy and the Cursor rule are regenerated with packaging/copies.py (tests/manifests.py).
Merged
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.
Refs #1835
By the end of a build the engine has resolved what it can. The call sites it leaves are calls through a value (a handler table, a callback parameter,
getattr, reflection) or a member called on a receiver it could not type. An answer listed the sites it stopped at, but nothing listed them all, and nothing told the agent to look. This adds a fill pass: after a build, the agent is told how many sites are open and settles them by reading the code. Links are validated by the same rules aslink, and each one is recorded as[asserted], never asresolved.What changes
axiomcode unresolvedand the MCP toolunresolved(limit, decisions): a summary line, then the open sites inside the most called callers first. Each site comes with its code, the engine's reason and its candidates.decisionstakes one line per site and answers with what was taken plus the next page:<site> <target>links the site;<site> not:<target>rejects a lead;<site> ?leaves the site open.text.strip(),path.exists()) is counted, not listed.link --batch -applies many decisions at once, validating each like a single link. A?or a rejection is kept in.axiomcode/fill-skipped.tsv, keyed by the line's text, so the site comes back only when its line changes.graph at <path>. The first prompt after a build (a hook, on every supported host) and the first MCP query answer (for hosts without hooks) say how many sites are open and how to fill them. Each says it once per build.fill(/axiomcode:fill): runs in a forked subagent where the host supports it, links only what the code makes certain, and returns one line.subprocess.run(..),asyncio.run(..)andchild_process.exec(..)matched the reflective names, so every answer listed them under "to resolve" as running a value. A call on a process or event-loop module, including through an import alias, no longer counts.Method.invoke,Function.applyandThread.runstill do.Measured
On a 70k-line Python project (one Python graph, built from a scratch copy):
dict.get,str.strip,Path.exists,argparseand a third-party library's methods./axiomcode:fillsettled all 81 open sites (before the process-launcher fix, there was one more): $0.51, 69 s.The links were callbacks returned as a tuple from a factory, a function chosen by a conditional (two links), and a predicate passed in as a parameter.
impactnow walks them.On a 400-file TypeScript monorepo (one TypeScript graph, from a scratch copy):
JSON, string methods.FUNCTION_CALLthere, notSIMPLE_CALL;/axiomcode:fillrun worked through 8 pages (the skill's budget): $1.50, 4 min.React.useContext,Headers.get,Set.add,Promise.resolve, ...), 2 plausible2,779 sites remain open for later passes. The links:
Proxy→ the handler-table entry it dispatches to.Tests
tests/fill.py(new, 28 checks):graph at;?and rejection skips;tests/surfaces.py,tests/mcp.py,tests/mcp_docs.py,tests/front_door.py:unresolvedis a public verb and an MCP tool with two parameters;linkkeeps two.tests/hosts.py: the fill hook answers in each supported host's hook output shape.tests/manifests.py:AGENTS.mdnamesunresolved, and the Gemini and Cursor copies are regenerated.tests/hooks_from_path.pyandtests/mcp_first.pypass unchanged.tests/surfaces.pystill reportsREADME.md CLI section: names the flag --fresh. That failure is already ondev; this PR does not touch the README.