Repository navigation
0.2.4 - #2029
Merged
Merged
0.2.4#2029
Conversation
…s not single-write (#381) symtable counts a name's binding sites per scope, so `fn = first` in the enclosing function and `nonlocal fn; fn = second` in a nested one are two rows, the cell's own saying 1. Every single-write guard read that row, so `swap(); fn()` came out known_edge -> first, a function that cannot run there, and `second` was the target of no edge. binding_rebinding now adds to a cell's count each ASSIGNED NONLOCAL binding whose LEGB walk lands on it (binding_nonlocal_write). The raw per-row count is kept as binding_rebinding_raw for the walk itself, which binding_rebinding is derived from. The site is now a declared unknown instead of a wrong committed target. A `nonlocal` that only reads the cell, and a nested local of the same name, keep their single-write answers (both are controls in the new case). Case 44-nonlocal-rebind. No other golden moved.
…t itself a file (#2022) `test-impact --files a.py b.py` handed `--files` on to `changed`, which took it as one more named path; it is not source, so it was listed as a changed file outside every indexed language and searched for by name in the tests. `--files` is now dropped with the other test-impact flags, so the named files are read as they are for `test-impact a.py b.py`. tests/test_command.py checks what reaches `changed`.
…or (#1339) With a C# library staged, `new Store()` on a library type was still reported as a construction of an unstaged dependency. Declared constructor: the site had two rows, the resolved one and `external:Store.<constructor>` (provenance external). The cause is call_ctor_target_accepts in external-types.dl, which re-checked that the target accepts the argument count under the SITE's provenance. A client site that reaches a library constructor has the constructor under "lib", so the check found nothing and the "staged type, no carried constructor" clause labelled a resolved site as unstaged. call_ctor_target already checks the arity under the constructor's own provenance, so the relation now reads it as is. No constructor carried: the site was `external:Store.<constructor>`, which says the dependency was not supplied. It now has one row to `generated:<qualified type name>#<constructor>/0` with callee_provenance lib and tier boundary_lib; the bundle gives that id a methods row with provenance generated, as it does for a delegate member's Invoke. `new T()` compiles only if T has a parameterless constructor, so the target exists, but a library IR is a signature subset and cannot say whether T declares it, so the site is still kept out of known_implicit_ctor. A site whose argument count no carried constructor accepts, where the IR carries some, keeps its external label, like an uncarried method. Tests: staging-test.sh gains both shapes; it fails on the base (2 rows / external) and passes here.
… 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.
…ts annotation's signature (#2005) A call to a const annotated with a callable type and holding a function literal resolved two ways: the literal's body and the annotation's bodiless call signature. Rule (3) in callee-resolution.dl added the signature of the callee's expr_type or expr_shape with no check that the callee already holds a literal, which the method lookup answers with its body. The namespace var_shape clause in expr-type.dl carried that guard; rule (3) did not. Rule (3) now skips a callee that holds a function literal (callee_holds_function): a local, a named import, or a namespace member read. The relation is built from relations below the expression fixpoint, so the negation stays stratifiable. A const holding a factory's result, and a parameter, keep the signature as the target. Case 101 pins the interface and function-type-alias forms through a local, a named import and a namespace read, with factory and parameter controls. On the base each literal site is multi_inferred to body and signature; here each is one known_edge to the body. Goldens: the same two-way hedge collapses to the body in 08 (lib), 63, 65, 74 and 77. The compiler names the annotation's signature, so 08, 63 and 65 record it in known-missing, the shape 92 and 98 already accept; 77 loses an extra. The comment in case 65 describes what a revert now looks like.
…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.
…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
…thon-nonlocal-rebind
…st-impact-files-flag
…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).
…-annotated-function-const
…harp-staged-ctor-not-external
fill: list the open call sites the project may own and settle them in batches (#1835)
…onst typescript: a call to a function-literal const no longer also names its annotation's signature (#2005)
…external csharp: new T() on a staged library type is not an external constructor (#1339)
plugin: test-impact --files names the files that follow it, and is not itself a file (#2022)
python: a closure cell rebound through nonlocal from a nested scope is not single-write (#381)
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
November 19, 2026 04:38
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.
Improvements
axiomcode unresolved(also an MCP tool,unresolved(limit, decisions)), lists the call sites left open after a build that may land in the project, starting with the most-called callers. Each site comes with its code, the engine's reason and its candidates. The agent settles them in batches:<site> <target>links a site,not:<target>rejects a lead and?leaves it open.link --batch -validates each decision the same way a singlelinkdoes. Links are recorded as[asserted], never asresolved. The build prints how many sites are open, and the first prompt or MCP answer after a build says so once. A new skill,/axiomcode:fill, does the work. On a 70k-line Python project the filter cut 5,333 unresolved sites to 80 (a sample of 30 dropped sites were all library calls), and one fill run linked 16 sites, all 16 correct ($0.51, 69 s). On a 400-file TypeScript monorepo: 14,701 → 3,002 open, and one run made 127 links, every one correct across 25 distinct patterns typescript python plugin mcp.--library,new T()on a library type is no longer reported as a construction of an unstaged dependency. A declared constructor goes from 2 rows (the constructor plusexternal:) to 1. A type with no carried constructor now getsgenerated:<type>#<constructor>/0(provenancelib, tierboundary_lib) instead ofexternalcsharpBugs
const f: Format = (s) => s) resolved to both the body and the annotation's bodiless signature (multi_inferred). It is now oneknown_edgeto the body, whether called through a local, a named import or a namespace. A const holding a factory's result, and a parameter, keep the signature. TypeScript suite 113 / 113 typescriptnonlocalwas treated as single-write, sofn()resolved to the first assignment (known_edge -> first) while the code runs the second. It is now a declared unknown (ambiguous_unknown). Anonlocalthat only reads the cell is unchanged pythontest-impact --files a.py b.pypassed--fileson tochangedas a path. It now names the files that follow it, exactly astest-impact a.py b.pydoes pluginsubprocess.run(..),asyncio.run(..)andchild_process.exec(..)matched the reflective names, so every answer listed them under "to resolve". A call on a process or event-loop module, including through an import alias, no longer counts;Method.invoke,Function.applyandThread.runstill doDocs
context,reportandgraph