Releases: optave/codegraph
Dev build 3.1.8-dev.a25a544
Dev build from commit a25a5440fa7fd7291b5316d56c22e504e9b40d94 on main.
Dev build 3.1.7-dev.698b509
Dev build from commit 698b5093ffbdc316c5e27316e25b284b4688f4ae on main.
v3.1.1
Reliability, architecture, and MCP cold-start fixes. This patch breaks a circular dependency cycle, fixes MCP server first-connect reliability by deferring heavy imports, corrects flow matching to use core symbol kinds, and refactors all database access to use try/finally for reliable db.close(). Internal architecture improves with repository pattern for data access and command/query separation.
Features
- hooks: add pre-commit hooks for cycles, dead exports, signature warnings (#381)
- benchmark: add 1-file rebuild phase breakdown to build benchmarks (#370)
Bug Fixes
- cycles: break circular dependency cycle and remove dead
queryNameexport (#378) - queries: use
CORE_SYMBOL_KINDSin flow matching (#382) - mcp: defer heavy imports in MCP server for first-connect reliability (#380)
Refactors
- wrap all db usage in try/finally for reliable
db.close()(#384, #383) - repository pattern for data access (#371)
- command/query separation — extract CLI wrappers, shared output helper (#373)
Chores
Dev build 3.1.6-dev.d33388a
Dev build from commit d33388af86e522b9ec7a5ff9ff907180c180460f on main.
Dev build 3.1.5-dev.e511432
Dev build from commit e51143239cb1ee87833039cce4816e6d3c4e8fa7 on main.
Dev build 3.1.4-dev.c9f2a4f
Dev build from commit c9f2a4fcbb2ee2e5409fff18b1f5c43dbc97f2c5 on main.
v3.1.0
Sequence diagrams, native engine performance leap, and unused export detection. This release adds codegraph sequence for Mermaid sequence diagram generation from call graph edges, delivers major native engine build optimizations (deep-clone elimination, batched SQLite inserts, call edge building in Rust, FS caching, rayon-parallel import resolution), introduces --unused on the exports command to detect dead exports, and fixes an ~80x native no-op rebuild regression.
Features
- sequence: add
codegraph sequence <name>command for Mermaid sequence diagram generation from call graph edges — participants are files, BFS forward from entry point, optional--dataflowflag for parameter/return annotations; exposed via CLI, MCP tool, and programmatic API (#345) - exports: add
--unusedflag tocodegraph exports— newexportedcolumn (migration v14) populated from parser export declarations, enabling detection of symbols declared as exports but with zero consumers (#361)
Performance
- native: eliminate deep-clone in
normalizeNativeSymbols— replace 125-line JS deep-clone with in-placepatchNativeResultvia#[napi(js_name)]annotations on Rust types (#361) - native: add
include_ast_nodesflag toparse_file/parse_files— initial parse skips AST node walking, saving ~200ms (#361) - native: move call/receiver/extends edge building to Rust (
edge_builder.rs) — narrowest-span caller resolution, confidence sorting, dedup via u64 edge keys (#361) - native: add
known_filesHashSet cache toresolve_imports_batch— avoids redundant FS syscalls during import resolution (#361) - native: parallelize
resolve_imports_batchwith rayon for concurrent import resolution (#361) - builder: batch SQLite multi-value INSERTs — accumulate node/edge rows and flush with chunked INSERT statements (200 rows per chunk) instead of individual prepared statement runs (#361)
Bug Fixes
- native: fix no-op rebuild regression (~80x slower than WASM) —
extToLangmap was not built when native engine provided pre-computed CFG, causinglangIdlookup to return null and triggering full re-parse on every incremental build (#360) - native: pass full file list to
known_filescache — on incremental builds only changed files were passed, causing valid import targets to be dropped (#361) - benchmark: install native package explicitly in npm benchmark mode (#351)
Documentation
- reorder README to be AI-first throughout (#362)
- add MCP tool surface optimization proposal (#363)
- update build performance, query, and incremental benchmarks for 3.0.4 (#352, #353, #354)
Chores
v3.0.4 Performance
Native engine goes full-stack: CFG, AST nodes, and WASM double-parse elimination. This release completes the native engine migration — CFG computation and AST node extraction now run in Rust for 8 languages, eliminating the redundant WASM pre-parse on native builds.
Performance
- native: compute CFG in Rust native engine for all 8 languages (JS/TS/TSX, Python, Go, Rust, Java, C#, Ruby, PHP) — ports
buildFunctionCFGalgorithm to Rust with per-languageCfgRules, eliminates WASM re-parsing in CFG phase (#342) - native: extract AST nodes (call, new, throw, await, string, regex) for all non-JS languages in Rust via shared
walk_ast_nodes_with_config()— astMs drops from ~651ms to ~50ms (#340) - builder: skip
ensureWasmTreesentirely when native engine provides complete CFG + dataflow + AST data — wasmPreMs drops from ~388ms to 0 on native builds (#344)
Bug Fixes
- native: fix function-scoped
constdeclarations being incorrectly extracted as top-level constants (#344) - benchmark: show all build phases (astMs, cfgMs, dataflowMs, wasmPreMs) in benchmark report and document v3.0.0→v3.0.3 native regression cause (#339)
3.0.3 (2026-03-04)
Note: 3.0.2 was an internal/unpublished version used during development.
v3.0.3 Performance
Performance
- ast: use single transaction for AST node insertion — astMs drops from ~3600ms to ~350ms (native) and ~547ms (WASM), reducing overall native build from 24.9 to 8.5 ms/file (#333)
v3.0.2 Patch
Dataflow goes multi-language, build performance recovery, and native engine parity fixes. This patch extends dataflow analysis from JS/TS-only to all 11 supported languages, recovers build performance lost after CFG/dataflow became default-on, fixes language-aware identifier collection in dataflow, and closes a native engine scoping bug for constants.
Features
- dataflow: extend dataflow analysis to all supported languages (Python, Go, Rust, Java, C#, PHP, Ruby) with per-language
DATAFLOW_RULESandmakeDataflowRules()factory (#318)
Bug Fixes
- dataflow: use
isIdentincollectIdentifiersfor language-awarereferencedNames— fixes PHPvariable_nameand other non-identifiernode types being missed in return statements (#324) - native: skip local constants inside function bodies — the native JS extractor incorrectly extracted function-scoped
constas top-level constants (#327) - native: enable extended kinds (parameters, properties, constants, receivers) in parity tests and update native binary to v3.0.1 (#327)
Performance
- builder: fix v3.0.1 build performance regression (14.1 → ~5.8 ms/file) — eliminate redundant WASM parsing via
ensureWasmTrees(), memoizecreateParsers(), filter CFG/dataflow to changed files only (#325)