Repository navigation
refactor(mcp): MCP tool tests install a dispatcher - #3834
Merged
Merged
Conversation
An MCP tool hands a devops command line to the in-process dispatcher, so no process starts and the process fake cannot see it. Add install_mcp_dispatcher and a DispatcherFake with a contract suite, delete the subprocess branch that only tests reached, and move the MCP tool tests off the _run_mcp_cmd and run_subprocess patches. Plans the work of #3760 (parent #1330).
…e dispatcher contract
Owner
Author
|
Test and check results.
|
dan-petty
marked this pull request as ready for review
November 6, 2026 19:13
dan-petty
pushed a commit
that referenced
this pull request
Nov 6, 2026
🤖 I have created a release *beep* *boop* --- ## [0.72.0](v0.71.1...v0.72.0) (2026-11-06) ### Features * **roadmap:** rewrite a merged plan with plan-recheck ([#3832](#3832)) ([7ea287b](7ea287b)) ### Bug Fixes * **roadmap:** refine job failure is no person wait ([#3833](#3833)) ([378579a](378579a)), closes [#3632](#3632) * **roadmap:** the draft of a stopped step closes its issue ([#3831](#3831)) ([5ca91e0](5ca91e0)) ### Code Refactoring * **mcp:** MCP tool tests install a dispatcher ([#3834](#3834)) ([e50d0dc](e50d0dc)), closes [#3760](#3760) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@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.
MCP tool tests now install a dispatcher. They no longer patch the process.
An MCP tool hands one
devopsargv to the CLI. The real dispatcher runs the Typer app in the same process, so no program starts and the process fake never sees the argv. The seam isMcpDispatcherindevops_cli.ai.mcp.dispatcher, withinstall_mcp_dispatcherandreset_mcp_dispatcher. The test double isDispatcherFake, behind themcp_dispatcherfixture. A contract suite runs each case over the fake and overInProcessDispatcher.The hermetic floor resets the seam after each test.
docs/TESTING.mdnames the seam.Closes #3760
Change:
openspec/changes/archive/2026-11-06-3760-mcp-dispatcher-hook/