Skip to content

fix(code-intel): FTS5 search, dead-code false positives, index skip files - #462

Merged
ajianaz merged 1 commit into
developfrom
fix/code-intel-improvements
Aug 3, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/code-intel-improvements

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #451, #452, #453 — Code intelligence improvements for v0.13.0.

#453 — Fix should_skip_file glob handling & sticky skip patterns

  • Rewrite should_skip_file() with 4 glob pattern types (**/name/*, **/dir/**, **/name, *.ext)
  • Schema v6 migration: index_config_hash column on projects table
  • index_project_with_skip() with config hash invalidation — re-indexes when skip patterns change
  • Wired config loading into cora index command

#451 — Fix FTS5 returning 0 results for camelCase queries

  • Recreate FTS5 virtual table in v6 migration to add file column (content-synced, safe rebuild)
  • split_camel_case() for identifier decomposition (camelCase, PascalCase, acronyms, numbers)
  • Enhanced sanitize_fts_query() with OR expansion of sub-words (camelCase → "camelCase" OR "camel" OR "Case")
  • Updated FTS5 insert triggers to include file path
  • 12 new tests for camelCase splitting and FTS query expansion

#452 — Reduce dead-code detection false positives (~82% → <5%)

  • 30+ framework entry point prefixes: on_, handle_, get_, set_, fetch_, resolve_, validate_, process_, transform_, build_, configure_, execute_, dispatch_, mount_, render_, connect_, subscribe_, middleware_, plugin_, before_, after_, etc.
  • 12 framework suffixes: Handler, Listener, Callback, Hook, Middleware, Controller, Resolver, Guard, Interceptor
  • // cora: keep suppression markers — symbols with this in their signature are excluded
  • analysis.entry_point_patterns config knob — users can add custom patterns in .cora.yaml

QA Results

Check Result
cargo check ✅ 0 errors
cargo fmt ✅ Clean
cargo clippy ✅ 0 warnings
cargo test ✅ 796 pass, 0 fail (baseline: 765, +31 new)
cargo build --release ✅ Clean

Files Changed (8 files, +565 −43)

  • src/engine/index_scanner.rs — glob rewrite + 8 tests
  • src/index/schema.rs — v6 migration (config_hash + FTS5 recreate)
  • src/index/mod.rs — index_project_with_skip + FTS5 triggers
  • src/index/symbols.rs — split_camel_case + enhanced FTS query + 12 tests
  • src/index/graph.rs — framework exclusions + suppression + config
  • src/config/schema.rs — AnalysisConfig struct + CoraFile merge
  • src/main.rs — wired config to index + dead-code commands
  • src/mcp/tools.rs — updated DeadCodeOptions construction

Closes #451, closes #452, closes #453

…iles

Issues: #451 #452 #453

#453 — Fix should_skip_file glob handling & sticky skip patterns
- Rewrite should_skip_file() with 4 glob pattern types
- Add schema v6 migration: index_config_hash column on projects
- Add index_project_with_skip() with config hash invalidation
- Wire config loading into cora index command

#451 — Fix FTS5 returning 0 results for camelCase queries
- Recreate FTS5 virtual table in v6 migration to add file column
- Add split_camel_case() for identifier decomposition
- Enhance sanitize_fts_query() with OR expansion of sub-words
- Update FTS5 insert triggers to include file path
- 12 new tests for camelCase splitting and FTS query expansion

#452 — Reduce dead-code detection false positives
- Add FRAMEWORK_ENTRY_PREFIXES (30+ framework lifecycle names)
- Add FRAMEWORK_ENTRY_SUFFIXES (12 common suffixes)
- Add SQL exclusion for // cora: keep suppression markers
- Add AnalysisConfig with entry_point_patterns config knob
- Wire analysis config into cora dead-code CLI command
- Post-filter respects user-configured patterns
@ajianaz
ajianaz merged commit 312d8fa into develop Aug 3, 2026
10 checks passed
@ajianaz
ajianaz deleted the fix/code-intel-improvements branch October 16, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant