Repository navigation
fix(mcp): cross-repository schema renames report every repository still indexing (#1425) - #1598
Merged
Merged
Conversation
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.
Problem
code_schema_renamewithreposcallsschema::rename_across, which renames in each repository's own session (#1425). The session records a "still loading/indexing" note under each root it asks, but only the originating root's notes were ever drained (with_indexing_notes). Notes from secondary repositories were never shown. A plan built from a half-indexed repository passed as complete and could be applied, and the stale note could surface in a later, unrelated answer.Change
In
schema/across.rs::rename_across:AcrossRepos::incompletefield.Then:
clean()is false while any note exists, so the MCP result is an error result;renderlists each note with its repository;applyrefuses withoutforce, writing nothing in any repository, as it already does for analyzer errors.Reproduce and verify
New
a_secondary_repository_still_indexing_is_reported_and_blocks_the_writeincrates/prod-code-mcp/tests/tool_handlers_1_b_codemod.rs. A scripted gateway answers the secondtextDocument/rename(the secondary repository's; roots are asked in order) while "indexing":applyfails withthe rename's evidence is incomplete;Before (main's
schema/across.rs/types.rs, a Linux build node):After:
Measurements
None; correctness fix.
Checks
On a Linux build node, default stable toolchain:
cargo clippy -p prod-code-mcp --all-targets: exit 0, no warning in the changed files.cargo test -p prod-code-mcp --no-fail-fast: exit 101. 130 test binaries ok; failed targets: only--test encapsulate_preservation, whose test needs a compiler missing on this node (Two prod-code-mcp tests depend on the build node: /tmp as a workspace root and an unconditional zig probe #1567).cargo fmt --all -- --check: clean for this PR's files after the two wraps it reported (after the test run).Closes #1425