feat: intelligent review & scan — wire symbol index, code graph, brain search + nomic embed (#455, #456, #457, #458) - #461
Merged
Conversation
- Feature-gate DEFAULT_DIMS in vector.rs: 768d with pretrained-embed, 256d fallback - Add embed_code_dispatch() in embed/mod.rs for unified backend selection - Update brain.rs to use embed_code_dispatch instead of direct embed_code() - Add check_dimension_compat() to detect stale index from different backend - Auto-remove stale index on dimension mismatch with re-index warning - Add embed_code_pretrained() convenience function in token_vocab.rs - Remove #[allow(dead_code)] from token_vocab.rs (now actively used) Compiles cleanly with both --features pretrained-embed and default features.
…457) - Add IndexBridge: lightweight bridge between engine and symbol index - Opens cora.db if available, graceful degradation if not - Exposes search_symbols(), find_callers(), brain_search(), impact_analysis() - Wire symbol index to context chain (Phase 1): - resolve_via_index() queries SQLite symbols table instead of regex+fs scan - Falls back to regex-based resolution when index unavailable - prefer_index config flag (default: true) - Wire code graph to blast radius (Phase 2): - resolve_callers_with_bridge() uses graph find_callers() instead of regex - Falls back to regex scan if graph unavailable - Extract build_context_chain_with_bridge() for testability - Add prefer_index: bool to ContextConfig Compiles cleanly (cargo check + pretrained-embed feature).
- Add brain_context parameter to scan_files() in LLM layer - Build brain context once per scan (impact analysis + affected tests) - Inject Code Intelligence section into scan LLM prompt - Make build_brain_context() pub(crate) for reuse - Add build_scan_brain_context() for file-list-based brain queries - Fix missing prefer_index field in ContextConfig test fixtures All 787 tests passing.
- resolve_via_index now returns unresolved symbols for per-symbol regex fallback (fixes silent drop of unindexed symbols) - Optimize build_scan_brain_context: single-pass symbol collection with dedup, eliminating N+1 query pattern - Fix missing prefer_index field in ContextConfig test fixtures All 787 tests passing. Cora review: 0 issues.
- Fix brain.rs:266 field access formatting (b.1 .0 → b.1.0) - Add #[expect(dead_code)] to has_pretrained() in embed/mod.rs (function will be used by Phase 3+ features) - Apply cargo fmt to resolver.rs, index_bridge.rs, review.rs
This was referenced Aug 3, 2026
Closed
Closed
Closed
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.
Summary
Wires cora intelligent features (symbol index, code graph, brain search) into
cora reviewandcora scanpipelines, plus replaces hashing-trick embedding with vendored nomic-embed-code.Changes
Wire vendored nomic-embed-code to brain search (#455)
src/embed/mod.rs,src/embed/token_vocab.rs,src/index/brain.rs,src/index/vector.rsPretrainedEmbedderthat loads vendored nomic-embed-code model (768-dim, 31MB)Phase 1: Symbol Index → Context Chain (#456)
src/engine/index_bridge.rs(new),src/engine/context/resolver.rs,src/engine/context/types.rsIndexBridge: lightweight bridge connecting engine to symbol index (SQLite)prefer_indexconfig field (default: true)Phase 2: Code Graph → Blast Radius (#457)
src/engine/context/resolver.rsresolve_callers_with_bridge(): queries code graph for inbound callersPhase 3: Brain Search → Review & Scan enrichment (#458)
src/engine/review.rs,src/engine/llm.rs,src/commands/scan.rsBug fixes
prefer_indexfield in test fixturesStats
Closes #455, Closes #456, Closes #457, Closes #458