[Improve] Consolidate MCP tool availability into approval modes - #3103
Merged
brunobergher merged 9 commits intoSep 22, 2026
Merged
Conversation
Contributor
|
No code issues found. See task
Reviewed 2951958 |
Contributor
Author
|
Pushed commit Fixed the deferred-refresh race: failed policy writes now mark server-truth refresh as pending, and the refresh runs after the final queued operation settles, while any optimistic selections made during the refetch are reapplied. Added regression coverage for first failure/second success with an unrelated tool, the in-flight refetch/new selection race, and consecutive failures. Validation:
The outstanding review thread was resolved after the fix and validation were pushed. |
roomote-roomote
Bot
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
September 22, 2026 10:07
brunobergher
approved these changes
Sep 22, 2026
daniel-lxs
added a commit
that referenced
this pull request
Sep 22, 2026
Bruno's per-tool controls (#3103) stay as they are: a toggle-button row with tooltips, Always allow / Always ask / Disable, legacy availability folded into Disable, bulk saves through setMany. The only change to them is the one this branch is for: Auto is no longer a button of its own on a tool row. It is the default, shown as nothing pressed; pressing the selected choice again returns to it. The group row keeps an Auto button so a whole group can be returned to it at once. The native in-process MCP guard from develop now reads the branch's approvals shape, so default tools follow Auto mode there exactly as at the proxy: shadow-assessed, or held for a claim while Auto is on. The proxy's shadow call no longer reads a body on GET requests.
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.
What changed
integrationToolApprovalsis off, while using the approval policy controls when the experiment is on.ToggleButtonprimitive and migrate legacydisabledToolsstate into the policy surface while retaining rollback-compatible storage.Why this change was made
Tool availability and approval were separate controls with conflicting save behavior once the approval experiment is enabled. The fallback preserves existing deployments until the experiment is enabled, while the policy surface makes the model-facing outcome explicit.
Impact
Admins and personal custom-server owners now set tool behavior through Auto, Always allow, Always ask, or Disable controls when approvals are enabled; existing deployments retain the legacy availability editor until then. Disable hides the tool from
tools/listand refuses calls at proxy and native MCP boundaries. Queued policy writes now preserve newer optimistic modes through failure refetches until their own save settles, and deferred refetches run after later queued successes. Focused web tests (141) and the personal-policy test (3) pass; visual proof timed out under the shared capture deadline, so no screenshot artifact is included.