fix(commands,mcp): resolve HRTB blockers for /compact and /mcp registry migration#2944
Merged
fix(commands,mcp): resolve HRTB blockers for /compact and /mcp registry migration#2944
Conversation
…ry migration Register CompactCommand and McpCommand in the CommandHandler registry, eliminating both commands from dispatch_slash_command. /compact (#2942): decompose compact_context so no &DbStore is held across .await points. Introduce compact_context_command as a Send-safe entry point. Dispatch Qdrant session-summary persistence via BackgroundSupervisor::spawn_summarization instead of bare tokio::spawn. CompactedWithPersistError now surfaces a user-visible message rather than silently reporting success. /mcp (#2943): eliminate three !Send sources in McpManager — RwLockWriteGuard in add_server/remove_server (plan/apply pattern), &[McpTool] in rebuild_semantic_index (clone before await), McpToolRef<'_> in sync_mcp_registry (replaced with owned McpToolOwned). Introduce pending_semantic_rebuild flag for deferred index refresh. Closes #2942, #2943
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.
Summary
CompactCommandandMcpCommandin theCommandHandlerregistry, completing the migration started in refactor(llm,mcp,commands): investigate HRTB blockers for /compact and /mcp migration (#2935, #2936) #2941/compactand/mcpfromdispatch_slash_command!SendHRTB blockers identified in fix(commands): resolve HRTB blocker for /compact CommandHandler migration #2942 and fix(mcp): resolve HRTB blockers for /mcp CommandHandler migration #2943Changes
/compact (#2942)
compact_contextso no&DbStoreis held across.awaitpointscompact_context_commandas aSend-safe entry point for registry dispatchBackgroundSupervisor::spawn_summarization(no baretokio::spawn)CompactedWithPersistErrornow returns a user-visible message instead of silently reporting success/mcp (#2943)
RwLockWriteGuardinadd_server/remove_server— fixed with plan/apply pattern (lock acquired, plan computed, lock released, I/O performed, lock re-acquired to apply)&[McpTool]inrebuild_semantic_index— cloned toVec<McpTool>before.awaitMcpToolRef<'_>insync_mcp_registry— replaced with ownedMcpToolOwnedpending_semantic_rebuildflag for deferred index refresh (one-turn lag after add/remove, acceptable for MVP)Test Results
cargo nextest run --workspace --lib --bins)cargo build --workspacecleanRelated