feat(local-mcp): gate cloud import and relay#3495
Merged
Merged
Conversation
Keep local MCP discovery, cloud import, and desktop relay designation disabled unless the existing PostHog Code flag is enabled. Generated-By: PostHog Code Task-Id: 311f71cc-873c-4a23-b8c7-d9fed8f8ece5
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
richardsolomou
marked this pull request as ready for review
July 16, 2026 10:01
tatoalo
approved these changes
Jul 16, 2026
Contributor
|
Reviews (1): Last reviewed commit: "Gate local MCP cloud access behind a fea..." | Re-trigger Greptile |
| queryFn: () => (service ? service.getCloudAvailability() : NO_SERVERS), | ||
| enabled: enabled && !!service, | ||
| enabled: queryEnabled, | ||
| staleTime: 30_000, |
Contributor
There was a problem hiding this comment.
Revocation Leaves Discovery In Flight
When the flag is revoked while getCloudAvailability() is running, setting enabled to false does not cancel that request. The request can still complete and populate the shared cache, so re-enabling the flag within staleTime can immediately expose outdated local MCP servers and include a server removed while access was disabled in a new cloud task.
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.
Problem
Local MCP import and relay need an internal rollout boundary while they bake.
Changes
Gate local MCP discovery and cloud wiring behind
posthog-code-local-mcp-import, including cached results.How did you test this?
@posthog/sharedand@posthog/uitypechecks.Automatic notifications
Created with PostHog Code