fix(bare): skip MCP connections, gateway spawn, and graph config in --bare mode#3334
Merged
fix(bare): skip MCP connections, gateway spawn, and graph config in --bare mode#3334
Conversation
…-bare mode Add exec_mode.bare guards to three previously unguarded call sites: - agent_setup::build_tool_setup: skip connect_all() and spawn_refresh_task() when bare=true, returning empty tool/outcome vectors instead - runner.rs gateway spawn (#cfg prometheus and non-prometheus paths): guard with !exec_mode.bare so no gateway server is started in bare mode - runner.rs agent.with_graph_config(): skip unconditional call in bare mode Add three unit tests mirroring the existing bare-mode guard test pattern: bare_flag_skips_mcp_connect_guard, bare_flag_skips_gateway_spawn_guard, bare_flag_skips_graph_config_guard. Closes #3298
34f6aea to
9a6a5fa
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
agent_setup::build_tool_setup: addbare: boolparameter; skipconnect_all()andspawn_refresh_task()whenbare=true, returning emptyVecsrunner.rsgateway spawn (both#[cfg(feature = "prometheus")]and#[cfg(all(feature = "gateway", not(feature = "prometheus")))]paths): guard with!exec_mode.barerunner.rsagent.with_graph_config(): skip unconditional call in bare modeTest plan
bare_flag_skips_mcp_connect_guard,bare_flag_skips_gateway_spawn_guard,bare_flag_skips_graph_config_guardcargo +nightly fmt --checkcleancargo clippy --workspace -- -D warningscleanCloses #3298