Skip to content

v1.6.6

Latest

Choose a tag to compare

@github-actions github-actions released this 30 Nov 03:09
· 3 commits to main since this release

[1.6.6] - 2026-11-30

Highlights

  • Indexing no longer stops on ordinary code. A common Kotlin pattern ended the whole index build with "Maximum call stack size exceeded", and a minified JavaScript file that registers event listeners could stall it for minutes.
  • codegraph upgrade works from PowerShell 7 on Windows. It downloaded the new version and then failed to unpack it. If you are on 1.6.5 or older, run this one upgrade from Windows PowerShell or cmd: the fix is in the version you are upgrading to.
  • Answers stay on what you asked for. codegraph_explore asked about two or more symbols answers with those symbols and the code around them, and a question about one symbol no longer lists lines that only read a field of the same name.
  • Express apps get their routes whatever the router is called. Routes were found only on a variable named app or router.
  • Preact, Solid and Vue JSX components are no longer missing. An element with class="…" or for="…" made the component around it disappear from the graph without a warning.
  • Objective-C++ is read as two languages. The C++ in a .mm file is read as C++, so its classes, methods and callers are there.
  • More accurate links in TypeScript, Python, Rust and Go. Calls reach the method they mean in more cases, and fewer land on an unrelated symbol that only shares a name.
  • Safer in shared and scripted setups. Starting a second build while one is running no longer damages the index, a git worktree beside its repository is no longer indexed twice, and tests link to Python code in the folders a project declares for pytest or Pyright.
  • Telemetry tells people from machines. One new true/false field says whether CodeGraph is running inside a container, more CI systems are recognised as CI, and a build run from a source checkout sends nothing at all. TELEMETRY.md lists the new field, and turning telemetry off works as before.
  • Upgrading: re-index your projects with codegraph index after this release. Most of these fixes are written while indexing.

New Features

  • CODEGRAPH_EXPLORE_MAX_CHARS sets a smaller size for a codegraph_explore answer, for a host whose agents ask often and pay for every answer on each later turn. It is the size an answer is built to: the finished text can be up to one and a half times that number (12,000 characters for 8,000). The default answer size is unchanged.

Fixes

Setup and the CLI

  • A development build no longer sends telemetry. CodeGraph run from a source checkout (a clone of this repository) recorded and sent usage like a release, and each run in a fresh home folder, such as a test sandbox or an agent's scratch directory, was counted as a machine never seen before. codegraph telemetry status says "development build" there, and CODEGRAPH_TELEMETRY=1 switches one on to test telemetry itself. The npm package and the release bundles are unchanged.
  • Telemetry now says whether CodeGraph is running inside a container or a cloud workspace (Docker, Podman, Kubernetes, Codespaces, Gitpod, a dev container), as one true/false field named container, and recognises CI systems that do not set CI (Jenkins, TeamCity, Azure Pipelines and others). A fresh container starts with an empty home folder and so a new anonymous machine id, and the usage numbers counted each one as a machine never seen before. Nothing about the container is read or sent beyond whether there is one. TELEMETRY.md lists the field, and turning telemetry off works as before.
  • The prompt hook reaches the project's running daemon again under a umask of 0002, the default on Ubuntu. .codegraph/ is group-writable there, the hook refuses a socket in such a folder, and the daemon kept binding one in it; it now binds the temp-directory socket, which the hook accepts. Thanks @inth3shadows for the report. (#3417)
  • On Windows, codegraph upgrade works again when CodeGraph was started from a PowerShell 7 window, or by an agent running in one. It downloaded the new version and then failed to unpack it, leaving the old version in place, with the real error buried under megabytes of progress output. install.ps1 started that way is fixed too. Thanks @lifei6671 and @satorkain for the reports. (#3436, #3502)

Answers from codegraph_explore

  • codegraph_explore asked for a dotted name such as res.send no longer answers with only a test's mock of it when the project defines that function itself. Thanks @inth3shadows for the report. (#3428)
  • codegraph_explore asked about one function, class or constant no longer lists a line that only reads an attribute or a field spelled the same (self.prompt for a function prompt, box.MAX_ITEMS for a constant MAX_ITEMS) under "Used by", or counts it in "N sites depend on it". Thanks @inth3shadows for the report. (#3431)
  • codegraph_explore and codegraph explore answer a query that names two or more symbols with those symbols and the code around them, sized to what was named, instead of filling the whole answer with code that only shares a word with the names. Words beside the names no longer widen the search. A symbol the query names is never left out to make the answer smaller: every file one is defined in has a place in the answer, and where the smaller answer still cannot show one that the full-size answer does, you get the full-size answer. CODEGRAPH_EXPLORE_NAMED_SIZING=0 restores the old answer for every query.

Indexing and sync

  • Indexing no longer stalls on a minified JavaScript file that registers event listeners, such as a vendored build of echarts. A project with a folder of such bundles could spend minutes on each one, or be stopped as unresponsive. Thanks @jerryskyr for the report. (#3501)
  • codegraph init and codegraph sync no longer hang on a named pipe (FIFO) that has the name of a file CodeGraph reads, such as package.json, .gitignore, go.mod, tsconfig.json or codegraph.json. It is skipped like a file that can't be read and is never written to; a link to a regular file is still read. Thanks @inth3shadows for the report. (#3308)
  • Running codegraph index while codegraph init is still building that project's index no longer breaks the first build: index reports the lock and stops before it touches the database, so init finishes with a complete index instead of failing and leaving an empty one. Thanks @jonjomckay for the report and the fix. (#3494)
  • A linked git worktree is no longer indexed as duplicate code when the indexed folder is not itself a git repository, such as a folder holding several repos with git worktree add ../<repo>-<topic> beside them. The watcher and scoped syncs also skip a worktree made while the daemon runs. Worktree files an earlier version indexed leave the index at the next full sync. Thanks @mrobst for the report. (#3495)

JavaScript, TypeScript, Vue, Svelte and Astro

  • TypeScript's variance annotations on a type parameter (interface Effect<out A, in E>, class Box<in out T>) are read without a parse error, so a file that uses them is parsed by the native kernel like any other. Thanks @inth3shadows for the report. (#3276)
  • TypeScript and JavaScript: a method call on a value that is only named like a class (ky.create() beside class Ky) is no longer linked to that class's static method, which an instance can't reach. Thanks @inth3shadows for the report. (#3429)
  • TypeScript: a local filled in by a method call (const s = m.make()) takes the type that method declares it returns, on a class, an interface or a type alias, so a call on it links to that type's method even when another class has a method of the same name. Thanks @inth3shadows for the report. (#3422)
  • TypeScript and JavaScript: a call on a browser value held in a local, reached through a chain, another local or a project function that returns a DOM type (const canvas = createCanvas(); const ctx = canvas.getContext('2d')!; ctx.translate(…)), is no longer linked to the project's only method of that name. Thanks @inth3shadows for the report. (#3444)
  • TypeScript: a callback's parameter typed only by the function type its function is declared with (const onChange: OnChange = ({ scene }) => …) takes that type, and a .tsx file's by-name fallback also considers methods declared in .ts files, so scene.mutateElement() links to Scene and not to another class with a method of that name. Thanks @inth3shadows for the report. (#3443)
  • JavaScript, JSX and Vue: an element that writes a reserved word as an attribute or in its name (<div class="title">, <label for="name">, <this.props.component />), as Preact, Solid and Vue's JSX do, is now read. A Vue <script> with one was reported as a file that could not be parsed, and in a .jsx or .js file the component around the element and the calls it made were missing without a warning; re-index such projects after upgrading. Thanks @alexblair for the report. (#3498)
  • Svelte and Astro: a <script> written inside a template expression, a string, an HTML comment or a quoted attribute, such as {@html `<script type="application/ld+json">${JSON.stringify(schema)}</script>`}, is no longer read as a script block, so the file is no longer reported as "could not be parsed" and, when the closing tag is escaped, the component's own script keeps its symbols. A <script> whose type is not JavaScript is treated as data. Thanks @wxhou for the report. (#3489)
  • Express: routes registered on a router or an app under any name are now found, not only on one named app or router: const routes = Router(), export const usersRouter = express.Router(), a class field, or a parameter typed Router or Application. A project that names its routers this way had almost none of its routes; re-index Express projects after upgrading. Thanks @iagomdb for the report. (#3473)
  • A client request, or a test's request, is no longer linked to a route made only of wildcards or parameters (/**, /*splat, /[...slug], /:bucket/:object), which every unmatched request used to land on. A route with a real prefix (/api/*) still serves what is under it.

Python

  • Python: a parameter or local named like a function the file imports is no longer linked to that function when it is read as a value (prompt_text = prompt inside def __init__(self, prompt=False)). Thanks @inth3shadows for the report. (#3430)
  • Python: a method call on a with … as (out, err) target or a loop variable that holds a standard-library object (an io.BytesIO, a threading.Thread) is no longer linked to the project's only method of that name. Thanks @inth3shadows for the report. (#3446)
  • Python: a loop or comprehension variable takes the element type of what it runs over (for widget in items with items: list[Parameter]), and a decorated function used as a value takes its decorator's declared return type, instead of the class their name resembles. Thanks @inth3shadows for the report. (#3445)
  • Python and Go: an attribute or a field read as a value (prompt(option.prompt), label = option.prompt, run(tt.req)) is no longer linked to an unrelated function that happens to be the only one of that name in the project. Such a link now stands only when the value is read through the function's own module or package (termui.prompt).
  • Python: a module under a folder the project declares as an import root for its tools is now found, so import helpers in a test links to server/helpers.py when pyproject.toml says pythonpath = ["server"], and callers, affected and the blast radius list that test. pytest's pythonpath and Pyright's and BasedPyright's extraPaths are read wherever those tools read them. Thanks @justinbuhler for the report. (#3470)

Rust, Go, Kotlin and Objective-C++

  • In Rust, a chain of method calls that starts from a parameter or variable written with a dependency's or std's type, like resp.status().is_success() on a resp: reqwest::blocking::Response, no longer links its last call to a project type's method of the same name. Thanks @Egrn for the report and @maxmilian for the fix. (#3483)
  • Rust: a function passed as a value inside a macro's arguments (assert!(xs.iter().all(pred)), vec![on_a, on_b], json!({ "rows": items.iter().filter_map(row).collect::<Vec<_>>() })) is now referenced as it is outside one, so its callers and impact include that use. A macro the file declares with macro_rules! whose rules take Rust code is read as well, its calls included; re-index Rust projects after upgrading. Thanks @Egrn for the report. (#3484)
  • Go: a local assigned from a call of a local closure (_, r := split(x)) takes the type the closure's signature returns, not the type of a closure parameter that shares its name. A local whose call can't be read is left untyped instead of taking another variable's type. Thanks @inth3shadows for the report. (#3448)
  • Kotlin: indexing no longer fails with "Maximum call stack size exceeded" on a class that keeps a constructor parameter in a backing property and reads it back through a local of the parameter's name (private val _prefs = prefs, then val prefs = _prefs); this had stopped the whole index build since 1.6.3. A property's initializer is now read where it is written, so such a call links to the method of the parameter's type. Thanks @b3er for the report. (#3527)
  • Objective-C++: C++ written in a .mm file outside @interface / @implementation blocks is now read as C++. An out-of-line method such as int Counter::increment() { … } is a method of its class and keeps its callers, a namespace or a class is no longer a function named after its keyword, and a brace initializer in a body (Block<int, 2> b{1, 2};) no longer makes every definition after it part of that function. Re-index projects with .mm files after upgrading. Thanks @CG911 for the report. (#3505)