fix(index): resolve Rust workspace root consistently; honest incremental status - #528
Merged
Merged
Conversation
…tal status Running 'cora index' inside a workspace member crate resolved that crate's plain Cargo.toml as the project root, while MCP sessions resolved the workspace root — two different project rows, so index_status silently reported total_symbols: 0 despite a populated DB (#522). - resolve_project_root now prefers a Cargo.toml declaring [workspace], still honors .cora.yaml overrides first, and never climbs past a .git boundary so unrelated parent workspaces cannot hijack resolution - incremental no-op re-runs now print 'Index up to date' plus stored totals instead of a confusing 'Indexed 0 symbols from 0 files' - MCP index_status carries root-mismatch hint listing other roots with data when the resolved project has zero symbols Regression tests: workspace-root preference, .cora.yaml precedence, .git boundary stop, incremental count preservation, mismatch hint. Signed-off-by: ajianaz <ajianaz@users.noreply.github.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.
Fixes #522
What
resolve_project_rootprefers aCargo.tomldeclaring[workspace], still honors.cora.yamloverrides first, and never climbs past a.gitboundary (unrelated parent workspaces cannot hijack resolution)index_statuscarries a root-mismatch hint listing other roots with dataWhy
Running
cora indexinside a workspace member crate resolved that crate's plainCargo.tomlas the project root, while MCP sessions resolved the workspace root — two different project rows, soindex_statussilently reportedtotal_symbols: 0despite a populated DB. Incremental no-op re-runs also printed a confusing "Indexed 0 symbols from 0 files" line.Testing
.cora.yamlprecedence,.gitboundary stop, incremental count preservation, mismatch hintcargo fmtclean; clippy diff vs develop shows zero new findingsAll commits signed-off (DCO).