fix(mcp): log tool collisions after OAuth connect and guard bare mode spawn#3367
Merged
fix(mcp): log tool collisions after OAuth connect and guard bare mode spawn#3367
Conversation
2f0703b to
00dfe3b
Compare
… spawn - connect_oauth_deferred now collects tools from all OAuth servers and calls log_tool_collisions before returning, matching the behavior of connect_all. Previously, tool ID collisions via the OAuth path were silently accepted. Closes #3359. - The OAuth deferred spawn guard in runner.rs now checks !exec_mode.bare so no MCP connection is established when running in --bare mode. Previously a background tokio task was unconditionally spawned for OAuth servers regardless of exec mode. Closes #3358.
f377280 to
ad9cf5d
Compare
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
connect_oauth_deferrednow collects committed tools across all OAuth servers and callslog_tool_collisionsafter the drain loop, matchingconnect_allbehavior. Previously, tool ID collisions introduced via the OAuth path were silently accepted with non-deterministic dispatch. Closes fix(mcp): connect_oauth_deferred omits log_tool_collisions after parallel refactor #3359.runner.rsnow checks!exec_mode.barebefore spawningconnect_oauth_deferred. Previously a background tokio task established a live MCP connection even in--baremode. Closes fix(bare): OAuth deferred MCP connection spawns in --bare mode despite connect_all being skipped #3358.Changes
crates/zeph-mcp/src/manager.rs: collectall_toolsvec during OAuth drain loop; calllog_tool_collisionsbeforedrop(outcomes)src/runner.rs: add!exec_mode.bare &&to the OAuth spawn guardTest plan
cargo +nightly fmt --check— passcargo clippy --workspace -- -D warnings— passcargo nextest run --config-file .github/nextest.toml --workspace --lib --bins— 8389 passed, 20 skipped