|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## v0.11.4 — Integration-friction fixes: ast_search hint + acronym expansion + call graph rollup |
| 4 | + |
| 5 | +Integration-test pass against Claude Code found three specific friction points |
| 6 | +where tool responses forced a second round-trip or missed relevant nodes. |
| 7 | +All three fixed. Additive — no schema change, no re-index. |
| 8 | + |
| 9 | +### Fixes |
| 10 | + |
| 11 | +1. **`ast_search` generic-fallback hint.** When `returns="Vec<Relation>"` yields |
| 12 | + zero hits because the codebase uses `Vec<ParsedRelation>`, the response now |
| 13 | + carries `hint` + `suggested_query` instead of a bare `count: 0`. Example: |
| 14 | + `{ "count": 0, "hint": "No match for returns='Vec<Relation>'. Substring |
| 15 | + 'Relation' has 7 matches — try that.", "suggested_query": {"returns": |
| 16 | + "Relation", "type": "fn"} }`. Strip rule: innermost `<…>` wins; multi-param |
| 17 | + types take the last comma-separated param. See |
| 18 | + `src/mcp/server/helpers.rs::strip_outer_generic`. |
| 19 | + |
| 20 | +2. **Acronym query expansion.** `fts5_search` preprocessing now expands |
| 21 | + common CS/IR/DB acronyms into full-form terms alongside the original: |
| 22 | + `RRF` → `RRF` + `reciprocal` + `rank` + `fusion`; same for `BM25`, `FTS`, |
| 23 | + `AST`, `LSP`, `MCP`, `RPC`, `SQL`, `ORM`, `CTE`, `JWT`, `TTL`, `DAG`, |
| 24 | + `RBAC`, `CRUD`, `CORS`. Benchmark before/after on query `"RRF fusion BM25"`: |
| 25 | + `weighted_rrf_fusion` now appears at rank 3 (previously absent from top-5). |
| 26 | + New static dict in `src/search/acronyms.rs`; expansions deduped via the |
| 27 | + existing BTreeSet pass. |
| 28 | + |
| 29 | +3. **`semantic_code_search` acronym-heavy FTS bias.** Queries that are entirely |
| 30 | + short uppercase tokens (≤3 tokens, each ≤5 chars, all `[A-Z0-9]`) now run |
| 31 | + with `fts_weight=2.0, vec_weight=0.8` instead of the default `1.0/1.2`. |
| 32 | + Rationale: embeddings handle letter-exact acronyms poorly while FTS5's |
| 33 | + token-exact match is reliable; shift the weight toward the precise channel. |
| 34 | + |
| 35 | +4. **`get_call_graph` file-level rollup replaces `compressed_call_graph`.** |
| 36 | + When the flat node list exceeds `COMPRESSION_TOKEN_THRESHOLD` (previously |
| 37 | + this mode dumped the raw list anyway), group by `(file_path, direction)` |
| 38 | + and emit `{file, count, names[], node_ids[], min_depth, max_depth}` sorted |
| 39 | + by count desc. New mode string `"rollup_call_graph"`. Measured on |
| 40 | + `ensure_indexed` (86 nodes): previously 86 flat entries → now 2 caller |
| 41 | + rollups + 5 callee rollups, preserving `node_ids` for `get_ast_node` |
| 42 | + drill-down. Contract Δ: consumers matching on |
| 43 | + `mode == "compressed_call_graph"` must update to `"rollup_call_graph"`. |
| 44 | + |
| 45 | +### Tests |
| 46 | + |
| 47 | +- `strip_outer_generic` unit tests (4/4) cover `Vec<T>`, nested generics, |
| 48 | + multi-param (`Result<T, E>`), and no-bracket cases. |
| 49 | +- `acronyms::expand_acronym` unit tests (4/4) cover case-insensitivity, |
| 50 | + unknown tokens, `BM25` numeric acronym, and an FTS-length-filter guardrail. |
| 51 | +- 230 lib tests + 44 integration tests all green. |
| 52 | + |
| 53 | +### Internal |
| 54 | + |
| 55 | +New module `src/search/acronyms.rs`. `strip_outer_generic` in |
| 56 | +`src/mcp/server/helpers.rs`. All other edits localized to `tool_ast_search`, |
| 57 | +`tool_semantic_search`, and `format_call_graph_response` in |
| 58 | +`src/mcp/server/tools.rs`, plus one flat_map augmentation in |
| 59 | +`storage::queries::fts5_search_impl`. |
| 60 | + |
3 | 61 | ## v0.11.3 — Doc: "hidden but callable" clarified (Claude Code vs. raw MCP) |
4 | 62 |
|
5 | 63 | User-facing: no behavior change; corrects a misleading claim in the adopted |
|
0 commit comments