Repository navigation
fix(index): key files by project, exact-match callers, auto-prune, honor skip patterns - #565
Merged
Merged
Conversation
…nor skip patterns - schema v8: files keyed by (project_id, path) so projects sharing a relative path no longer overwrite each other's fingerprint (perpetual reindex). - graph: find_callers/callees/trace use exact match instead of LIKE '%x%' (run no longer matches rerun; _ and % are not wildcards). - index runs auto-prune stale files; pruning also clears edges. - serve and watch use index_project_with_skip with resolved config patterns. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
added a commit
that referenced
this pull request
Oct 8, 2026
) Covers security hardening (#563, #572, #573), fixes (#553, #561, #562, #564, #565, #574-#576), and the ignore-pattern semantic changes from #577 that can alter which files existing configs exclude. Signed-off-by: ajianaz <ajianaz@users.noreply.github.com> Co-authored-by: ajianaz <ajianaz@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
What
Four index data-correctness fixes:
fileskeyed by(project_id, path)(schema v8), exact-match call graph lookups, automatic pruning of stale files on every index run, and skip patterns honored by every index entry point.Why
files.pathwas a global PRIMARY KEY withON CONFLICT(path), so two projects with the same relative path overwrote each other's fingerprint/project_id and reindexed forever.find_callers/find_callees/trace_pathusedLIKE '%name%': removingrunflagged callers ofrerun, and_/%acted as wildcards. This feedsindex-breaking-change(Major), impact_analysis and trace_path.prune_deletedonly ran under--pruneand did not touchedges.cora serveandcora index --watchcalledindex_project(no skip patterns), undoingignore.files/index.skip_files.How
filesin one transaction withPRIMARY KEY (project_id, path); rows with NULL project_id (pre-v2 orphans) are dropped and recreated on next index. Upsert usesON CONFLICT(project_id, path).= ?1. Callees are already normalized to bare names at extraction, so exact match is correct; impact_analysis recursion is covered by a test.index_project_with_idrecords the walked file set and prunes stored files not in it (deleted, gitignored, newly excluded) via a sharedprune_pathsthat clears symbols, call_graph, edges and files.prune_deleted(--prune) uses the same helper.index::prepare_index_config/skip_patterns_from_configused by index,--watchand serve.index_projectis now test-only so production cannot regress to no-skip.Testing
cargo test --features tree-sitterpassescargo fmt --all -- --checkpassescargo clippy --all-targets --features tree-sitter -- -D warningspassescargo build --release --features tree-sitterpasses (not run locally)New tests: v7 -> v8 migration (data kept, orphan dropped, idempotent, two projects share a path); two real projects with same path both go up to date;
runvsrerun/get_userswildcard and%; impact_analysis/trace_path recursion; auto-prune clears symbols/call_graph/edges/files;--pruneclears edges; skip pattern resolver + exclusion.Not in this PR: unused-imports, per-language call nodes, vector lock.
Related Issues
None.
Checklist
fix/)develop🤖 Generated with Claude Code