Skip to content

v0.171.2

Choose a tag to compare

@github-actions github-actions released this 17 Oct 18:17
· 105 commits to main since this release

Upgrading: nothing to do (INDEX_VERSION is unchanged). To pin the binary
back: npm i -g @sdsrs/code-graph@0.171.1 (or, from source, cargo install --locked --git https://github.com/sdsrss/code-graph-mcp --tag v0.171.1 --features embed-model), then delete ~/.cache/code-graph/bin/code-graph-mcp
and set CODE_GRAPH_NO_AUTO_UPDATE=1, as described under 0.171.0.

A starting MCP server no longer waits for incremental-index to embed

0.171.1's incremental-index held .code-graph/index-build.lock until it
exited, its embeddings included, and a starting MCP server waits for that lock
before its startup index. A server started while an incremental-index run by
hand (without --no-embed, as the 0.171.1 notes suggest for getting vectors)
was computing embeddings therefore answered every tool call
Indexing in progress until the embeddings were done or 10 minutes had
passed. 0.171.1 listed this under Not covered. Measured on this repository
(7,157 nodes to embed, about 5 a second), the server started 3 s after the
CLI: 18 of 18 tool calls over 119 s failed, where 0.171.0 answered the first
one at once.

incremental-index now lets go of the build lock once its index is written,
before it embeds, as the server's own startup index already did. The lock
still covers writing the index, as in 0.171.1. In the same test: 12 of 12
calls over 55 s answered, the first at once, while the CLI was still
embedding.

Not covered

  • A server that starts while incremental-index embeds computes embeddings
    for the same nodes beside it, until one of them has embedded them all, as
    0.171.0's and 0.171.1's did. Run to the end on a project with 1,162 nodes
    to embed (1,286 in all), 0.171.0 and this version both left a healthy index
    with a vector for every one of them and no orphan vector, and the CLI
    exited 0.
  • An index run beside that embedding, a starting server's or another
    incremental-index's, can leave nodes with vectors computed from their
    previous text: those of a file it indexed again, when the new nodes got
    the old ones' ids, and callers elsewhere whose context it rewrote. 0.171.0
    did the same. 0.171.1 avoided it in both cases by making that run wait, for
    up to 10 minutes; that wait is what this release removes. A node's vector
    is dropped when its text changes again, and the next embedding fills it in.
  • Apart from this wait, the items 0.171.1 listed under Not covered are
    unchanged.