Commit 0cad62f
release: v3.14.8 — ingest_codebase full-chain extraction + audit fixes
User report: "ast is failing, no methods, no call, no files, it simply
fail to use the pipeline, when the rust pipeline is working fine."
Diagnosis: the upstream Rust indexer (ai-architect-mcp) was producing a
correct Kuzu graph (2 312 Functions, 3 023 Methods, 780 Structs, 554
Files, 2 833 Imports). Cortex's ``ingest_codebase`` consumer was the
broken half — used BM25 keyword search with the project name as query,
got 2 hits, gated the Cypher fallback on emptiness so it never fired,
and even when it did fire it never extracted file paths or any edges.
Fix:
- Replace BM25 with a Cypher-driven projection: every Function /
Method / Struct, every File, every call edge, every File→symbol
containment edge. Default caps removed (top_symbols=null,
top_processes=null) — pull the full chain.
- Refuse to memoise a synthesised graph_path on persistent upstream
error (cache-poisoning bug surfaced by genius cross-verification).
- Narrow broad ``except Exception`` to expected transport classes;
surface per-query diagnostics in the handler response.
- Detect qualified_name overload collisions; report them rather than
silently coalescing.
- File attribution derived from authoritative (:File)-[]->(:symbol)
edges, not qn-split — language-agnostic. qn-split demoted to
fallback validated against the known-files set.
- Server-side label-OR filter pushdown to remove
Function→Process/Community noise from the wire.
- Stable ordering for unbounded queries.
- Split into six modules to fit the 300-line cap: _cypher, _writers,
_graph, _pages, _schema, composition root.
- Lock-guard the module-level _store singleton for thread-pool
callers.
Live measurement on Cortex itself (cached graph): 50 150 symbols,
4 072 files, 30 818 calls, 19 297 contains. Diagnostics array reports
fallback usage honestly.
Tests: 2549 passing (3 new audit-driven tests + 1 cross-language
attribution test). Mock routing rewritten with regex to remove the
substring-ordering footgun.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4c9a57b commit 0cad62f
10 files changed
Lines changed: 1263 additions & 490 deletions
File tree
- .claude-plugin
- mcp_server/handlers
- tests_py/handlers
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
9 | 70 | | |
10 | 71 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
17 | 82 | | |
18 | 83 | | |
19 | | - | |
| 84 | + | |
20 | 85 | | |
21 | 86 | | |
22 | 87 | | |
| |||
0 commit comments