Skip to content

refactor(mcp): converge OAuth integration ownership - #1991

Merged
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/mcp-oauth-owner-pr10
Aug 3, 2026
Merged

refactor(mcp): converge OAuth integration ownership#1991
limityan merged 1 commit into
GCWing:mainfrom
limityan:yanzhn/mcp-oauth-owner-pr10

Conversation

@limityan

@limityan limityan commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • move MCP OAuth credential storage and authorization bootstrap behind the Services integration owner
  • keep Core's public compatibility facade plus product callback/session/reconnect orchestration
  • route Desktop OAuth credential status through the assembled MCP manager instead of the Core global facade
  • split the product-owned callback page/HTTP adapter into a private manager module without changing its behavior

Architecture boundary

Concern Owner after this PR
RMCP SDK, credential vault/store, authorization bootstrap Services integrations
Product callback page, OAuth session/cancel/reconnect orchestration Core product assembly
Desktop command projection Desktop via assembled Core manager

Core's direct rmcp manifest edge changes from 1 to 0, and product-full no longer selects dep:rmcp directly. Services integrations remains the single direct RMCP owner. RMCP is still transitively present in full MCP products; this PR establishes ownership and does not claim to remove the full cold-build graph.

Compatibility and scope

  • preserves the existing Core OAuth facade for callers
  • preserves callback locale selection, HTML escaping, first-callback delivery, timeout, cancellation, token exchange, and reconnect flow
  • adds an existing-boundary guard preventing new direct RMCP manifest edges outside Services integrations
  • adds one owner-local manager regression test in the existing Core test target
  • does not add or change GitHub Actions jobs, workflows, test targets, or product delivery features

Dependency impact

Metric Before After
Core direct rmcp dependency 1 0
Core product-full direct dep:rmcp selection 1 0
Services integrations direct rmcp owner 1 1

Validation

  • pnpm run check:core-boundaries:test (36/36)
  • pnpm run check:core-boundaries
  • cargo test -p bitfun-services-integrations --no-default-features --features mcp --test mcp_contracts (42/42)
  • cargo check -p bitfun-core --no-default-features
  • cargo test -p bitfun-core service::mcp::server::manager::auth_callback::tests::callback_page_prefers_the_product_locale_and_escapes_provider_errors -- --exact
  • cargo test -p bitfun-core service::mcp::server::manager::tests::oauth_credentials_follow_the_manager_injected_data_dir -- --exact
  • cargo check -p bitfun-desktop

Move concrete RMCP authorization and credential access behind the services integration owner. Keep Core's compatibility facade and product callback orchestration while routing Desktop credential status through the assembled manager.
@limityan
limityan merged commit 765e11e into GCWing:main Aug 3, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant