Skip to content

fix(mcp): cross-repository schema renames report every repository still indexing (#1425) - #1598

Merged
alex09x merged 1 commit into
mainfrom
fix/1425-schema-indexing-notes
Oct 27, 2026
Merged

alex09x merged 1 commit into
mainfrom
fix/1425-schema-indexing-notes

Conversation

@alex09x

@alex09x alex09x commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Problem

code_schema_rename with repos calls schema::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:

  • stale notes of every root are drained before planning;
  • after planning, each root's new notes go into the new AcrossRepos::incomplete field.

Then:

  • clean() is false while any note exists, so the MCP result is an error result;
  • render lists each note with its repository;
  • apply refuses without force, 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_write in crates/prod-code-mcp/tests/tool_handlers_1_b_codemod.rs. A scripted gateway answers the second textDocument/rename (the secondary repository's; roots are asked in order) while "indexing":

  • the dry run is an error result naming that repository's note;
  • apply fails with the rename's evidence is incomplete;
  • both files are unchanged.

Before (main's schema/across.rs/types.rs, a Linux build node):

incomplete evidence is not a clean result: ## /tmp/.tmp8MlPZr
`order_id` → `trade_id`
- rust: 1 occurrence(s) found, 1 renamed by the analyzer, ...
test result: FAILED. 0 passed; 1 failed

After:

tool_handlers_1_b_codemod: test result: ok. 8 passed; 0 failed
lib schema::: test result: ok. 32 passed; 0 failed

Measurements

None; correctness fix.

Checks

On a Linux build node, default stable toolchain:

Closes #1425

@alex09x alex09x added bug Something isn't working mcp MCP tools for agents test Tests and coverage labels Oct 27, 2026
@alex09x
alex09x merged commit 238f330 into main Oct 27, 2026
@alex09x
alex09x deleted the fix/1425-schema-indexing-notes branch October 27, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working mcp MCP tools for agents test Tests and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-repository schema rename omits secondary-repository indexing warnings

1 participant