Releases: optave/ops-codegraph-tool
v3.9.6
Native engine parity and incremental-build performance. Native single-file incremental rebuilds drop from 876ms to 43ms (95% faster, 0.78× WASM) by adopting the WASM save-and-reconnect strategy so reverse-dep files no longer get re-parsed when they didn't change. Native full-build edge construction now beats WASM (119ms vs 184ms) by replacing per-row query_row lookups with one-shot HashMap pre-loads and chunked multi-row inserts. AST-node extraction is now within 0.12% parity between engines after fixing three independent divergences (missing language coverage in WASM, await_expression recursion, UTF-8 byte-length gating). The release-triggered benchmark workflow that silently hung at 600s on v3.9.5 is fixed — workers now dispose the WASM parser pool and embedding progress writes to stderr instead of corrupting stdout JSON. A new CI parity gate runs after every release benchmark and fails loudly when any of five engine-parity thresholds regress, so silent drift can no longer ship.
Bug Fixes
- parity: align WASM and native
ast_nodesextraction — registered 19 missing languages in WASM'sAST_TYPE_MAPS, removedawait_expressionskipChildrenquirk, and fixed UTF-8 byte-length gating in native; total AST-node parity now within 0.12% across self-build (was ~7,200 row delta) (#1016) - parity: log per-file reasons for native orchestrator drops — bucket dropped files by
unsupported-by-native(info) vsnative-extractor-failure(warn) with sample paths so legitimate parser limits no longer mask real Rust extractor bugs (#1024) - bench: dispose WASM worker pool and keep progress off stdout — release-triggered benchmark workflow no longer hangs at 600s; embedding progress writes to stderr so JSON-consuming workers stop parsing
Unexpected token 'E'(#1009)
Performance
- native: scope incremental rebuild to truly-changed files — 1-file incremental drops from 876ms to 43ms (95% faster, 0.78× WASM) by saving reverse-dep edges before purge and reconnecting them post-rebuild instead of re-parsing the full reverse-dep cone (#1027)
- native: batch-load file/symbol IDs in edges phase — replaces per-import
query_rowlookups with one-shot HashMap pre-loads and chunks import-edge inserts into 199-rowVALUESbatches; full-buildedgesphase now 119ms vs WASM's 184ms (0.65×) (#1028)
CI
- bench: gate release benchmark on engine parity thresholds — five thresholds (file-set gap, DB size ratio, edges/roles ratios, 1-file incremental ratio) fail the release benchmark workflow when engine parity regresses, with a markdown summary linking each breach to its tracking issue (#1014)
Chores
- deps-dev: bump @vitest/coverage-v8 from 4.1.4 to 4.1.5 (#1021)
- deps-dev: bump @biomejs/biome from 2.4.11 to 2.4.13 (#1019)
- deps-dev: bump @commitlint/cli from 20.5.0 to 20.5.2 (#1018)
- deps-dev: bump tree-sitter-erlang from 0.0.0 to 0.16 (#1017)
- deps-dev: bump tree-sitter-gleam from
0153f8bto1627dc5(#1020)
Dev build 3.9.7-dev.5
Dev build from commit 8ed0b39bb36d2725fabc00e22c10d8234530f587 on main.
Dev build 3.9.6-dev.0
Dev build from commit ef5029df1b61770c7039edd77390c50d487bfe30 on main.
v3.9.5
Incremental build correctness and concurrency safety. This release hardens the incremental build path end-to-end. Duplicate edges that silently accumulated on every incremental rebuild of hybrid barrel files are eliminated — edge counts are now stable across consecutive rebuilds. config.include and config.exclude globs were declared in DEFAULTS but never consumed by either engine; both the Rust and WASM collectors now compile and apply them identically during initial walks and fast-path rebuilds. Concurrent journal appends from watch sessions and manual builds are serialized via lockfile, and watcher writes now advance the header timestamp so the first build after every watch session no longer falls through to an expensive full rescan. snapshot save --force and snapshot restore use per-pid temp files + atomic rename to close TOCTOU races. WASM parsing is isolated in a worker thread so a V8 fatal error skips one file instead of aborting the whole build, and extractor exceptions are now per-file rather than pipeline-fatal. The watch command gains -d/--db for consistency with every other DB-scoped command, --no-incremental warns before discarding embeddings, and build:wasm shows a one-line remediation banner instead of 700 lines of ENOENT noise when tree-sitter-cli is missing.
Features
- build: report
collectMsanddetectMsas separate phases inBuildResult.phasesso incremental-build perf investigations can see file-walk and change-detection work separately (#993)
Bug Fixes
- incremental: prevent duplicate edges on rebuild — Stage 6b's scoped
DELETEonly purgedimports/reexportsbefore Stage 7 re-emitted 8 edge kinds, leaking ~250 duplicatecalls/receiver/extends/implements/imports-type/dynamic-importsedges per incremental rebuild of hybrid barrel files (#998) - config: honor
include/excludeglobs in file collection — both the native Rust engine and the WASM/JS engine now compile the globs once and filter collected paths identically during initial walks and incremental fast-path rebuilds (#994) - journal: serialize concurrent appends via lockfile — prevents interleaved writes from watch sessions + manual builds that corrupted the journal header and caused silent fall-through to hash-scan rebuilds (#1002)
- journal: stamp header timestamp on watcher appends — the first build after every watch session no longer falls through to expensive mtime+size + SHA256 rescans (#1001)
- snapshot: close TOCTOU race on save/restore/delete —
snapshot save --forceandsnapshot restorewrite to per-pid temp files and atomically rename so concurrent saves can no longer produce truncated/interleaved destinations (#1003) - wasm: isolate tree-sitter parsing in worker thread — V8 fatal errors skip a single file with a warn and respawn the worker instead of killing the whole build (#975)
- extractors: guard empty-text identifiers and isolate extractor crashes — a single misbehaving file no longer kills the whole WASM build (#972)
- extractor: gate
member_expressioncallback args on callee allowlist — restores TS resolution precision from 93.8% back to 100% by eliminatingstore.set(user.id, user)false positives (#974) - native: backfill silently-dropped files via WASM for engine parity — closes a native-vs-WASM file-node gap (668 vs 728 on this repo) when the installed native addon lacks an extractor for a language (#970)
- native: restore
cargo test --libgreen — downgrade tree-sitter-scala/swift to ABI-14-compatible releases and fixBuildSettings::defaultdisagreeing with serde field defaults (176 passed / 0 failed) (#978) - watch: accept
-d/--dbto point at a graph.db outside cwd — restores consistency with every other DB-scoped command (build,stats,query,fn-impact, …) (#987) - build: warn before
--no-incrementalwipes embeddings — single-line warning at the shared pipeline entry fires whenever a full rebuild is about to discard non-empty embeddings (#986) - build:wasm: add preflight check with clear remediation — missing
tree-sitter-clibinary now shows one banner with concrete fixes instead of 35 × 20-line ENOENT stack dumps (#990) - embed: resolve source files from DB root, not cwd —
codegraph embed --db <abs-path>no longer silently stores 0 embeddings when run from an unrelated cwd; falls back to the DB's parent for pre-existing DBs (#992) - config: reject non-string
apiKeyCommandwithConfigError— the previous silent fallthrough leftapiKeynull with no diagnostic; error message names the received type and shows the expected format (#991) - louvain: demote native-path parity warning to debug — the Leiden-specific-options warning was firing unconditionally because
DEFAULTS.communityalways populated the guarded fields (#989) - hooks: recognize
git -C <path>inguard-git.sh— closes a hook bypass wheregit -C <worktree> pushskipped branch-name validation and the destructive-command blocklist (#1004) - scripts: use
--experimental-strip-typeson every Node version — Node 24 removed the--strip-typesalias, breakingbuild:wasm,deps:tree, andversionscripts on Node 24.10.0 (#985) - benchmark: spawn npm via shell on Windows — fixes benchmark suite invocation on Windows (#973)
- publish: build native addon from source in preflight (#954)
- release: require user-observable surface for minor bumps in the release skill (#953)
Performance
- globs: memoize compiled include/exclude globs per build — long-running processes (watch mode, MCP server) no longer recompile identical pattern lists on every
buildGraphcall; FIFO cache capped at 32 entries in both TS and Rust paths (#1005) - native: scope node loading in call-edge builder for incremental builds — loads only files being processed + their resolved import targets instead of every node in the graph; full builds and very large incrementals (>200 files) unchanged (#976)
Chores
v3.9.4
Resolution accuracy and incremental-build reliability. The JS/TS extractor now resolves named function references passed as callback arguments — Express middleware, event handlers, Array.map/.filter/.then callbacks, and destructured handler bindings are tracked as real call edges instead of appearing as dead code. On a 1 895-file TypeScript monorepo this surfaced 21 previously-invisible callers of a single auth middleware. A version-mismatch bug that silently forced every native incremental build into a full 5.8s rebuild is fixed — no-op rebuilds now exit in ~200ms. Three WASM incremental-build bugs are also fixed: edge loss during reverse-dep purges, unnecessary reparses, and a V8 crash during GC of orphaned WASM trees. Fan-in/out and import counts are now consistent between full and incremental build paths.
Bug Fixes
- js-extractor: resolve named function references passed as arguments — middleware, callback, and handler references emit dynamic call edges; destructured bindings from factory calls emit function definitions, eliminating false "dead-unresolved" results for functions passed by reference (#947)
- wasm: resolve incremental edge loss, unnecessary reparses, and V8 crash — save-and-reconnect approach preserves edges without reparsing reverse-dep files; error-path tree cleanup prevents GC crashes (#938)
- native: resolve version-mismatch that broke incremental builds — no-op rebuild dropped from 5.8s to 214ms (#928, #930)
- structure: reconcile
import_countsemantics between fast path and full path — both paths now consistently count distinct imported files (#942) - include
imports-typein fast-pathfan_in/fan_outqueries — aligns incremental metrics with full-build behavior for files with type-only imports (#948) - rust: fix test compilation errors in extractor tests — renamed
Import.path→Import.sourceand missingbuild_import_edgesarguments (#950) - ci: add resilience to Claude Code workflow for fork branch races — concurrency groups and pre-flight branch verification with 3 retries (#949)
Performance
- native: port full-build structure computation to Rust — eliminates JS DB round-trip through
reconstructFileSymbolsFromDb()on full builds (#937) - native: defer
NativeDatabase.openReadWriteuntil after change detection — saves ~60ms on every incremental build invocation, no-op builds exit before opening native connection (#939) - native: raise native edge-building threshold to
smallFilesThreshold— small incrementals (≤5 files) use JS edge path to avoid napi-rs marshaling overhead (#940)
Chores
- disable adaptive thinking via
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKINGenv var (#943)
v3.9.3
Native engine parity and build performance. The Rust engine now produces identical role classifications as the JS fallback — reexport chains, type-only imports, and constant classification all match. Build performance improves across the board: the entire analysis pipeline (complexity, CFG, dataflow, AST) now runs inside the Rust orchestrator on a single rusqlite connection, batched WAL checkpoints cut incremental rebuild overhead by 49%, and a full-build regression from v3.9.2 is fixed. A new CI parity job catches engine divergences before they ship. The incremental rebuild guide documents what data requires a full rebuild and adds automatic 24h staleness detection to Claude Code hooks.
Bug Fixes
- native: align Rust role classification with JS — reexport chains, type-only imports, constant classification (#918)
- native: strip pre-release suffix in semverCompare — dev builds were silently falling back to JS pipeline (#898)
- test: restore strict parity assertions and add dedicated CI parity job (#916)
- release: decouple version bumps from release PRs to fix CI failures (#893)
Performance
- native: move analysis persistence (AST, complexity, CFG, dataflow) into Rust orchestrator — eliminates JS WASM re-parse (#907)
- native: use single rusqlite connection for entire build pipeline — 12% faster full builds, 30% faster incremental, 14% smaller DB (#897)
- native: fix full-build regression from NativeDbProxy overhead (#906)
- incremental: batch WAL checkpoints and fix native CFG bulk insert — 49% faster incremental rebuilds (#917)
- query: fix diffImpact latency regression from redundant config loading (#905)
Refactors
- adopt dead helpers across codebase — 28 files, -30 net lines (#895)
Docs
- incremental vs full rebuild guide with automatic 24h staleness check (#919)
- update build, query, and incremental benchmarks for 3.9.2 (#900, #901, #902)
Chores
- deps: bump web-tree-sitter from 0.26.7 to 0.26.8 (#913)
- deps: bump actions/setup-go from 5 to 6, actions/github-script from 8 to 9, actions/setup-python from 5 to 6 (#910, #909, #908)
- deps-dev: bump vitest from 4.1.2 to 4.1.4, @vitest/coverage-v8 from 4.1.2 to 4.1.4 (#915, #912)
- deps-dev: bump tree-sitter-cli from 0.26.7 to 0.26.8, @biomejs/biome from 2.4.10 to 2.4.11 (#911, #914)
v3.9.2
Engine parity fix and build performance improvements. This patch fixes a native engine deduplication bug that caused divergent results when multiple type map entries existed for the same symbol, improving engine parity. Build performance improves with deferred native database initialization (skipping the native DB entirely on no-op rebuilds) and a fix for an incremental rebuild regression introduced in v3.9.1. The resolution benchmark suite is significantly expanded with dynamic call tracing across all language fixtures, and the release workflow now gates on precision/recall thresholds.
Bug Fixes
- native: confidence-aware dedup in type map for engine parity (#885)
Performance
- defer NativeDatabase init to after no-op early exit (#884)
- native: fix incremental rebuild regression (#882, #888)
Chores
v3.9.1
Dead code accuracy, native query performance, and supply-chain hardening. This release significantly improves dead code detection — class instantiations via new, type-only imports, barrel re-exports, and same-file constants are now correctly tracked as consumption. The native Rust engine gains a composite fnDeps query that runs dependency resolution in a single cross-language call, and a critical 1238% incremental rebuild regression from v3.9.0 is fixed. WASM grammar validation and npm audit harden the build pipeline. CLI reliability improves with a fix for hangs in git worktree environments.
Bug Fixes
- track class instantiation (
new) as consumption for dead code detection (#861) - resolve type-only imports for dead code analysis (#862)
- trace barrel re-exports in role classification (#860)
- recognize same-file constant consumption in dead code detector (#859)
- resolve codegraph CLI hangs in git worktrees (#863)
- use shared
shouldIgnore/isSupportedFilein watcher (#864) - resolve barrel resolution quality and cycle regression (#848)
- show both engines side-by-side in README benchmark table (#826)
- release config script validation and broken postbump (#825)
- native: lower version gate for native orchestrator (#867)
- native: correct incremental purge, scoped deletion, and barrel resolution (#865)
- ci: retry npm publish on transient registry errors (#833)
- ci: upgrade publish job to Node 24 for OIDC trusted publishing (#850)
- ci: add npm auth debug step and fix publish retry logic (#835)
- perf: wire engine selection through openRepo to fix query benchmarks (#869)
- bench: attribute unified walk time to per-phase timers (#858)
Performance
Refactors
- native: decompose core Rust algorithms and pipeline (#845)
- native: extract constants and shared barrel resolution (#842)
- native: flatten and decompose extractor match arms (#844)
- DRY shared abstractions in TS features (#843)
- decompose TS complexity and build pipeline (#846)
- improve TS code quality across modules (#847)
Chores
- security: WASM grammar validation and npm audit CI (#834)
- deps: bump @modelcontextprotocol/sdk from 1.28.0 to 1.29.0 (#829)
- deps-dev: bump @huggingface/transformers from 3.8.1 to 4.0.1 (#831)
- deps-dev: bump @biomejs/biome from 2.4.9 to 2.4.10 (#828)
- deps-dev: bump tree-sitter-gleam (#830)
- deps-dev: bump tree-sitter-erlang from 0.0.0 to 0.15 (#827)
v3.9.0
Engine parity hardening and cross-database queries. This release closes the remaining native/WASM divergences — node counts, edge counts, complexity metrics, and import resolution now match across engines. A new --db flag on branch-compare and info lets you point at any .codegraph/graph.db, enabling cross-repo comparisons without rebuilding. WASM grammar loading is now lazy during incremental rebuilds, cutting rebuild times for large codebases. Windows users get a fix for ENOENT failures during auto-install.
Features
- cli: add
--dbflag tobranch-compareandinfocommands for cross-database queries (#820) - add resolution precision/recall metrics and version stamp to README benchmarks (#796)
Bug Fixes
- respect
--engine wasmin pipeline guard (#819) - resolve npm ENOENT on Windows for auto-install (#818)
- resolve native/WASM engine divergence in node and edge counts (#810)
- native: resolve importedNames priority and type map scope collisions (#811)
- native: resolve import path mismatch and add post-native structure phase (#807)
- native: extract export name for destructured dynamic imports (#813)
- native: fix incremental barrel edges, median parity, and analysis data loss (#806)
- parity: align native vs WASM complexity metrics (#809)
- v3.8.1 regression fixes (fnDeps, WASM lazy-load, edge parity, CI guard) (#815)
- ci: remove npm self-upgrade that breaks publish workflow (#790)
Performance
- lazy-load WASM grammars for incremental rebuilds (#808)
v3.8.1
Windows stability, native engine fixes, and large-codebase performance. This patch hardens the v3.8.0 release with critical Windows fixes (polling watcher to avoid ReFS BSOD, Windows-scoped import-edge handling), several native engine corrections (dataflow parameter indexing, embedding path resolution, build orchestrator sequencing), and performance improvements for large codebases — cycle detection and stats queries are faster, and query-time analysis now routes through the native Rust engine.
Bug Fixes
- native: resolve dataflow null paramIndex and import edge key mismatch (#788)
- native: keep nativeDb open through finalize for correct build_meta (#784)
- embed: handle absolute file paths from native engine (#780, #783)
- default watcher to polling on Windows to avoid ReFS BSOD (#778)
- scope native import-edge skip to Windows only (#777)
- run analysis phases after native Rust build orchestrator (#757)
- skip native build orchestrator for addon ≤3.8.0 and fix path bug (#758)
- auto-install @huggingface/transformers in non-TTY environments (#779)
- remove duplicate function definitions in leiden optimiser (#786)
- replace empty catch blocks with structured error handling (#764)
- replace console.log with structured logging in non-CLI-output code (#765)
- ci: add concurrency group to codegraph-impact workflow (#785)
- bench: resolve query benchmark CI failure and increase embedding timeout (#749)
Performance
- route query analysis through native Rust engine (#745)
- optimize cycles and stats for large codebases (#781)
- filter reverse-dep files from native build analysis scope (#782)
- forward langId hint to native standalone analysis functions (#743)
Refactors
- decompose ast-analysis visitor framework (#771)
- Titan v3.8.0 — decompose god-functions, structured logging, error handling (#775)
- extract class declaration handlers in language extractors (#769)
- split hybridSearchData into keyword, vector, and merge steps (#768)
- decompose makePartition into focused graph operations (#766)
- extract rendering sub-functions from inspect and diff-impact-mermaid (#767)
- address quality warnings in shared modules (#770)