Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
df9c1e1
docs: changelog for 0.17.1 through 0.21.0; list JetBrains plugin as C…
anvanster Oct 6, 2026
3180733
fix(vscode): download the engine automatically instead of asking (0.2…
anvanster Oct 11, 2026
0658fbd
no-mistakes(review): Back off failed engine auto-updates; confirm man…
anvanster Oct 11, 2026
ed38a86
no-mistakes(review): Add Update Now to engine update warnings
anvanster Oct 11, 2026
6922448
no-mistakes(review): Keep engine swap stop/start out of crash telemetry
anvanster Oct 11, 2026
7baa73a
fix(engine-download): abandon transfers that stop making progress
anvanster Oct 15, 2026
815b1e9
fix(engine): cap engine CPU threads; stop ONNX spin-waiting (#29)
anvanster Nov 7, 2026
21783eb
no-mistakes(review): Latch stall guard and hang up on failed transfers
anvanster Nov 8, 2026
c623ba9
no-mistakes(review): Separate engine restart failures from install fa…
anvanster Nov 8, 2026
5fdf483
no-mistakes(review): Keep failed swap restarts out of crash telemetry…
anvanster Nov 11, 2026
b8ab1d7
no-mistakes(review): Key crash telemetry off real LSP State enum
anvanster Nov 11, 2026
c57bd3b
no-mistakes(review): Drop unused attempts field from EngineInstallResult
anvanster Nov 12, 2026
06392b2
no-mistakes(review): Reset engine uptime when a start begins
anvanster Nov 12, 2026
e7b7822
no-mistakes(review): Hang up on stalled redirects; suppress contradic…
anvanster Nov 15, 2026
d795dcf
no-mistakes(document): Document automatic VS Code engine download and…
anvanster Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 96 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,102 @@
# Changelog

All notable changes to CodeGraph are documented here. Versions follow
[Semantic Versioning](https://semver.org/). Each release is tagged as
`vscode/vX.Y.Z` in the git history.
[Semantic Versioning](https://semver.org/). Releases from 0.18.1 on are tagged
`vX.Y.Z`; earlier ones `vscode/vX.Y.Z`.

## [0.21.1] - 2026-10-10

VS Code extension only; the engine stays 0.21.0.

- The extension now downloads its engine automatically on first start, with retries.
0.21.0 asked first, and most users who auto-updated from 0.19.1 (which bundled the engine) dismissed or never saw the prompt and were left without a working extension.
A failed download shows an error with a Retry button.
- An engine older than the extension expects is updated automatically instead of prompting.

## [0.21.0] - 2026-10-05

### Upgrading

Restart any `codegraph-mcp --watch` daemon after upgrading.
A daemon left running from 0.20.1 keeps writing vectors that 0.21 will not load, and sessions attached to it run without semantic search until it restarts.

Each project re-embeds once, in the background, the first time 0.21 opens it.
Keyword search keeps working while that runs.

### Search

- Identifiers whose words run together, like `getUserById`, are now also embedded in word-split form.
This mostly helps natural-language search in camelCase languages such as TypeScript, Java and C#.
Pass `--split-identifiers=false` to keep the old behaviour.
- Stored vectors now record the model and settings that built them.
Switching the embedding model or these settings re-embeds instead of silently mixing incompatible vectors.
- `--full-body-embedding=false` now takes effect; in 0.20.1 the flag was always on.

### Reliability

- A session that started while another CodeGraph process had the shared graph database open could treat it as corrupt and discard every project's saved graph.
It now waits for the other process to finish, and only a genuinely unreadable database is replaced.
The stale-`LOCK` cleanup added in 0.17.0 is gone: the OS releases a lock when its holder exits, so a leftover `LOCK` file never blocked an open, and deleting one could let two processes open the same database on Linux.
- After the database was replaced, a project could stay empty until its files changed.
It is now re-indexed.
- The file watcher honours the workspace's exclude settings and `.codegraphignore`, works on workspaces reached through a symlink, and rescans the graph once per batch of changes instead of once per event (#23).
- `--graph-only` no longer loads the embedding model.
- Two clients starting at the same moment now share one engine, and the engine receives their flags.

### Build

- Release engines are built with one pinned Rust toolchain (`rust-toolchain.toml`).

## [0.20.1] - 2026-08-09

- **linux-arm64 engine.** ARM Linux previously had no engine at all; it is now published and fetched like the other platforms (#15).
- Fixed a startup crash on aarch64 Linux before `main()` ran (#15).
- Indexing a second markdown file no longer overwrites chunks from the first.
Doc chunk ids are now namespaced by source file (#16).

## [0.20.0] - 2026-08-08

- **Engines are fetched, not bundled.** The VSIX and the npm package no longer carry every platform's binary.
Each install downloads the one engine it can run from the GitHub release, which took the VSIX from 118 MB to under 1 MB.
- **JetBrains IDE client.** A new plugin connects JetBrains IDEs to the same engine.
- VS Code onboarding: an index that comes back empty now explains why (no folder, no supported languages, misconfigured `indexPaths`, everything excluded) and offers the fix, and the Symbols view offers to index an empty workspace.
- Embedding tools are no longer disabled on healthy Macs where the OS reports 0 MB available memory.
`CODEGRAPH_SKIP_MEMORY_CHECK=1` bypasses the check (#13).
- npm publishing now refuses to pack until every engine asset is on the release.

## [0.19.1] - 2026-06-30

- `codegraph_pr_context` recognises tests by the language's test marker (for example `#[cfg(test)]` modules in Rust), not only by name, so covered functions are no longer reported as untested.
- PR risk is based on callers of signature-changed functions and the untested ratio, not raw caller count.
Callers under `examples/` and `benches/` count as coverage.

## [0.19.0] - 2026-06-30

- **Static embedding model.** `--embedding-model static` (VS Code: `codegraph.embeddingModel`) uses a distilled, ONNX-free model.
It embeds roughly 70x faster and reaches about 90% of the default BGE model's search quality end to end.
The model ships with the VS Code extension and is fetched by the npm install; BGE stays the default.
- COBOL, Fortran, Perl, Dart, Zig and R parsers moved behind the `extra-languages` build feature, cutting the engine by 25 MB.
Telemetry showed no indexed workspace using them.

## [0.18.0 - 0.18.6] - 2026-06-01 to 2026-06-17

- **Shared engine.** One engine process can serve several workspaces and clients with a single loaded model (opt-in via `CODEGRAPH_ENGINE`).
- **Crash recovery.** Fixed a Windows crash loop (thread stack size and UTF-8 truncation of embedding text).
A graph database that crashes the engine on load is detected across restarts and replaced by a fresh one.
- **Memory-safe embedding.** Long embedding runs checkpoint every 20k symbols, back off when RAM runs low, and resume after a kill.
- `codegraph_get_module_summary` no longer returns all zeros on Windows (#5).
- MCP tool results are compact JSON, about 24% smaller; `codegraph_find_entry_points` honours `limit`.

## [0.17.1 - 0.17.11] - 2026-05-25 to 2026-06-01

- **`codegraph_pr_context`.** Analyses a branch's changes in one call: changed symbols, callers, test gaps, related docs.
- **CI PR review.** `--graph-only` skips embeddings, and `--run-tool` runs one tool and exits, which together power a GitHub Action that comments a code-graph review on each PR.
- **Watcher daemon.** `codegraph-server --watch` keeps a workspace's graph fresh in the background for MCP sessions.
- Files are indexed when opened, so hover and go-to-definition work without a prior workspace index.
- The persisted graph is a true snapshot, fixing duplicate symbols that built up across edits and reloads.
- `codegraph_get_ai_context` reports graph statistics, and every tool warns when the graph looks nearly empty.
- VS Code stops auto-restarting the server after 3 crashes in 60 seconds and shows the error instead.
- User exclude settings now add to the default exclude list instead of replacing it.

## [0.17.0] — 2026-05-25

Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ The server indexes the current working directory automatically.
Install the VSIX:

```bash
code --install-extension codegraph-0.21.0.vsix
code --install-extension codegraph-0.21.1.vsix
```

One VSIX serves every platform.
The analysis engine is not bundled: on first activation the extension offers to download the engine built for your platform, verifies it against the published checksum, and installs it into `~/.codegraph/bin` - the same location the JetBrains plugin uses, so one download serves both.
The download is offered rather than performed automatically, because it is a native binary that runs with your permissions.
Decline it and run **CodeGraph: Download Analysis Engine** from the command palette whenever you are ready.
The analysis engine is not bundled: on first activation the extension downloads the engine built for your platform, verifies it against the published checksum, and installs it into `~/.codegraph/bin` - the same location the JetBrains plugin uses, so one download serves both.
If the download fails, run **CodeGraph: Download Analysis Engine** from the command palette to try again.

Once an engine is present, the extension starts it automatically and registers all tools as Language Model Tools for Copilot.

Expand Down Expand Up @@ -114,6 +113,7 @@ Pass `--split-identifiers=false` to keep the old behaviour.
| `--full-body-embedding` | `true` | Embed full function body (~50 lines) for better semantic search and duplicate detection. Takes a value: `--full-body-embedding=false` turns it off |
| `--split-identifiers` | `true` | Also embed the word-split form of identifiers whose words are run together, so `getUserById` embeds as "get user by id" too. Names already separated by `_` or `-` are left alone, since they tokenise into the same words; a leading or trailing delimiter separates nothing, so `_handleClick` is split like `handleClick`. Takes a value: `--split-identifiers=false` embeds raw names, as releases up to 0.20.1 did |
| `--max-files <n>` | 5000 | Maximum files to index |
| `--max-threads <n>` | half the CPUs | Most threads the engine computes on: the embedding model's pool, the pool tokenizing for it, and the async runtime. Also read from `CODEGRAPH_MAX_THREADS`. Lower it to keep the machine responsive while a large workspace embeds |
| `--profile <name>` | `all` | Filter the exposed MCP tool surface to a named subset (see below) |
| `--graph-only` | off | Skip embedding generation — build the graph and serve structural tools only. No ONNX model load, 10-50× faster indexing. Semantic search and memory tools unavailable. For CI / one-shot graph queries. |
| `--run-tool <name>` | — | One-shot mode: index, run a single tool, print its result, exit. No MCP handshake. Pair with `--tool-args '<json>'`. |
Expand Down
7 changes: 7 additions & 0 deletions crates/codegraph-memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ tokenizers = "0.21"
safetensors = "0.4"
half = "2"

# The ONNX session is built here, not by fastembed, so its thread pool can be
# sized and its spin-waiting turned off (issue #29). Both crates are already
# in the build through fastembed; these must stay at its versions, and the
# platform features (static binaries vs. a loaded DLL) come from its features.
ort = { version = "=2.0.0-rc.9", default-features = false, features = ["ndarray"] }
ndarray = { version = "0.16", default-features = false }

# Embeddings - fastembed with BGE-Small-EN-v1.5
# macOS/Linux: static link ONNX Runtime (ort-download-binaries)
# Windows: load onnxruntime DLL at runtime (ort-load-dynamic, avoids CRT /MT vs /MD mismatch)
Expand Down
2 changes: 1 addition & 1 deletion crates/codegraph-memory/src/embedding/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl VectorEngine {
}

/// Default cache directory for fastembed models
fn default_cache_dir() -> PathBuf {
pub(super) fn default_cache_dir() -> PathBuf {
let home = std::env::var("HOME")
.or_else(|_| std::env::var("USERPROFILE"))
.unwrap_or_else(|_| ".".to_string());
Expand Down
Loading
Loading