0.2.6 - #12
Merged
Merged
Conversation
… and project overview.
…ng per-entity SQL queries.
…trumentation for discovery.
…er type self-joins.
benchmark and skills documentation fixes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v0.2.6 (2026-08-14)
Speeds up full (non-fast) indexing end-to-end and fixes a resolver JOIN defect that both slowed indexing and silently over-matched cross-file references. Fuzzy symbol search is now fully in-memory (no per-entity SQL), FAST-mode pruning rules are completed, and discovery timing is quantified for the first time — with zero precision loss across every benchmark (accuracy gate stays P/R/F1 = 1.0).
Performance & Results
fuzzy_resolver.{h,cpp},pipeline.cpp): the resolver previously ran up to 3 SQL queries per unresolved ref (case-insensitive + prefix + suffix) and hydrated every fuzzy hit with a per-id SQL lookup. All entities are now loaded once into memory (ASCII-fold exact index +sqliteLikeMatch, byte-identical to SQLite LIKE) and hits are copied from anentity_by_idmap — no SQL in the hot loop. CodeScope self-index (215 files):resolver::run298ms → 30ms (10.2x),buildGraph332ms → 62ms, index-parallel 686ms → 517ms (-25%) with identical resolved refs/edges on same-input A/B.std::lower_bound); wildcard queries keep the exact SQLite-LIKE path.buildModuleSummariesmerged its tworelationLEFT JOINs into one: rustc 117k-relation × 129k-entity phase drops ~5.95s → ~0.25s (23.8x), result-identical.idx_scope_kind_name(project_id, kind, name)index: turns thescopefull-table scan (129,893 entities × 26,975 scopes per row) into an index seek; theimport.source_scope_idUPDATE result is now checked (was silently ignored, leaving imports at scope 0).Literal/Variablerows dropped at the DB write path (store_batch.cpp):semantic_records95,944 → 25,146 rows, SQLite flush ~3.7x faster, full-index time 2.18s → ~1.36s (-38%). In-memory GraphBuilder Variable nodes stay intact.file_pathterm fixed (pipeline.cpp): sinceoriginal_idis per-file, theglobal_var_types_/global_struct_fields_preloads cross-matched same-id parents across files (~35x join inflation). Addingfile_pathcut resolver 11.2s → 5.4s and the goagent full index 20.6s → 14.6s (-29%) while resolving more refs correctly.buildModuleSummariessplit into two CTEs (17.1s → 174ms on goagent, enhance_project -94%),idx_sr_proj_file_oid(project_id, file_path, original_id)composite index (resolver type self-joins 3.3s → 63ms on rustc), parse workers 4 → 8 default (wall-clock -18% on rustc,CODESCOPE_WORKERSstill overrides), and the per-reference candidate deep-copy eliminated (resolve_loop-16%).fast_extra_skip_dirs_(was empty) now skips 11 build/test-artifact dirs (.output,storybook-static,__generated__,playwright-report,test-results,allure-results,allure-report,.sass-cache,.scss-cache,logs,.logs) plus 4 exact files viafast_extra_filenames_(.eslintcache,.stylelintcache,.prettiercache,tsconfig.tsbuildinfo) — synthetic A/B drops candidates 4 → 1. Discovery is now timed (discovery=<ms>,seen_dirscounts directories only): rustc 143ms / 4,650 dirs, goagent 25ms / 845 dirs.get_graphmigrated to canonical tables: it read the deprecated, emptygraph_nodes/graph_edges(nodes always 0, edges stale) — now pagesentity+relationwith the same public JSON schema;get_graphmatchesget_graph_stats(total_nodes:39686, total_edges:4415).Bug fixes
FilterPolicy::setMode()never rebuilt the active skip sets (FAST rules were inert when the mode was set after construction).seen_dirscounted files too (inflated ~44k for a 215-file project) — now directories only.import.source_scope_idUPDATE failures were silently swallowed, leaving imports at scope 0 — now checked and logged.index_project/get_hotspotsremoved fromTOOL_HANDLERS; indexing now viacodescope worker/index-parallel, hotspots viaget_knowledge_graph).fuzzy_resolver.cpp): when a prefix/suffix query matched more thankFuzzyCandidateLimit(5) entities, the retained subset differed from the old SQLLIKE ... LIMIT ?path, so the resolved CALLS edge could diverge on large projects — contradicting the in-memory rewrite's byte-identical contract. Both paths now collect all matches, sort by id (= rowid = load order), then truncate. A/B on CodeScope self index: edges 1,249 → 1,189, nodes/files unchanged, accuracy gate still P/R/F1 = 1.0.buildModuleSummariesbound 9 parameters for 8?placeholders (state_builder.cpp): the extra bind hit a non-existent parameter (SQLITE_RANGE, silently ignored); the loop now binds exactly 8 and the comment is corrected.skills/analyze.sh/skills/index.shindexed and queried different DBs whenCODESCOPE_DB_PATHwas unset:workertook the DB as a positional argument (default/tmp/codescope_index.db) whilecliread the env var (default.codescope/codescope.db), so stats were silently reported from an empty/stale DB. Both scripts nowexport CODESCOPE_DB_PATH="$DB"so worker and cli share one database.Documentation
README.md,README.zh.md): §7 now reflectstarget/release/codescope(v0.2.6) inCODESCOPE_INDEX_MODE=normalon the 2026-08-14 run — CodeScope self 0.95 s / 1,189 edges (pre-fix: 1,249; nodes/files unchanged), tinygo 1.77 s / 4,485 edges, rustc 38.94 s / 117,284 edges; per-query MCP latency (median of 7), micro benchmarks, cross-file CALLS ratios, and the correctedgraph_queryfigure (88.8 ms with LIMIT 100 — the previously published 0.03 ms was the error-path response of an invalid DSL, not a real query).Verification
All C++ engine tests pass (including
test_call_graph_accuracy,test_metrics_readiness,test_step11_go_smoke), accuracy gate P/R/F1 = 1.0 with FP/FN injection correctly rejected, Rust server tests 88/88, clippy + clang-format clean. See CHANGELOG.md for the complete list.