|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## v0.13.0 — `stats` CLI + rebuild_index busy semantics + CLI/MCP search disambiguation |
| 4 | + |
| 5 | +Minor release. Three changes driven by real-usage-data review: |
| 6 | + |
| 7 | +### `stats` subcommand (new) |
| 8 | + |
| 9 | +`code-graph-mcp stats` aggregates `.code-graph/usage.jsonl` across sessions |
| 10 | +and prints per-tool counts (`n`, `avg_ms`, `err`, `max_ms`), search totals |
| 11 | +(queries, zero-result ratio, hybrid/FTS split, avg quality), and index |
| 12 | +activity (full vs incremental, avg full-rebuild time). Flags: `--last N` |
| 13 | +limits to the most recent N sessions, `--json` emits structured output. |
| 14 | + |
| 15 | +Motivation: the metrics module has been writing JSONL for months (1MB |
| 16 | +rotation), but there was no reader. Running on this repo's own history |
| 17 | +surfaced the `rebuild_index` error pattern that motivates change #2. |
| 18 | + |
| 19 | +### `rebuild_index` MCP tool — busy signal is no longer an error |
| 20 | + |
| 21 | +When the server rejects a rebuild request because background embedding is |
| 22 | +still running, it now returns `Ok({status: "busy", retry_after_ms: 2000})` |
| 23 | +instead of `Err("Background embedding still in progress")`. This matches |
| 24 | +the precedent in `run_incremental_with_cache_restore` (which returns |
| 25 | +`Ok(())` on the same condition) and keeps the usage-metrics `err` counter |
| 26 | +from inflating on legitimate retry signals. |
| 27 | + |
| 28 | +**Contract change** — SDK/script clients of the `rebuild_index` MCP tool |
| 29 | +must now distinguish `status: "busy"` success payloads from actual errors. |
| 30 | +JSON-RPC-level errors on `rebuild_index` now indicate real failures only |
| 31 | +(missing `confirm`, no project root, DB error). |
| 32 | + |
| 33 | +### CLI ↔ MCP search disambiguation |
| 34 | + |
| 35 | +`plugin_code_graph_mcp.md` template previously listed `search "Z"` and |
| 36 | +`semantic_code_search` as equivalent intents. They are not: the CLI |
| 37 | +`search` command is **FTS5-only** (`src/cli.rs:710` → `fts5_search`), while |
| 38 | +the MCP `semantic_code_search` tool performs **RRF fusion** of FTS5 + vector |
| 39 | +similarity (`src/mcp/server/tools.rs:42 → 101`). The template now states |
| 40 | +this explicitly in the core-7 decision table and the CLI cheat sheet. |
| 41 | + |
| 42 | +Adopted memory files auto-refresh from the template on the next |
| 43 | +SessionStart (v0.11.0+ behavior). |
| 44 | + |
| 45 | +### Clippy 1.95 parity |
| 46 | + |
| 47 | +Four `clippy::manual_checked_ops` and one `clippy::unnecessary_sort_by` |
| 48 | +flagged by the 1.95 toolchain in the new `cmd_stats` code path are fixed |
| 49 | +before push (local baseline: `cargo +1.95.0 clippy --no-default-features |
| 50 | +-- -D warnings && cargo +1.95.0 clippy --all-targets -- -D warnings`, |
| 51 | +both green). |
| 52 | + |
3 | 53 | ## v0.12.1 — incremental-index skips non-project directories |
4 | 54 |
|
5 | 55 | Bugfix release: the PostToolUse `incremental-index` hook no longer creates |
|
0 commit comments