Skip to content

fix(049): classifyServerToolStatus runtime config authority#477

Merged
Dumbris merged 1 commit into
mainfrom
049-fix-runtime-config-denied
May 18, 2026
Merged

fix(049): classifyServerToolStatus runtime config authority#477
Dumbris merged 1 commit into
mainfrom
049-fix-runtime-config-denied

Conversation

@Dumbris
Copy link
Copy Markdown
Member

@Dumbris Dumbris commented May 18, 2026

Follow-up correctness fix to #476 (spec 049).

#476's classifyServerToolStatus derived config-denial only from the storage ServerConfig copy. For config-file disabled_tools on stdio servers, that value lives in the live runtime config and is not always mirrored into storage — so disabled_by_config classification and upstream_servers tool counts were wrong at runtime for that case. (Unit tests passed because the no-runtime test harness exercises the storage fallback path; the gap was found during live curl/MCP verification and documented in specs/049-…/quickstart.md.)

Fix

  • classifyServerToolStatus now prefers runtime.IsToolConfigDenied (the same authority isToolCallable/blockedToolMessage use); falls back to storage IsToolAllowedByConfig only when no runtime is wired (unit tests).
  • Adds TestClassifyDisabledTool_ConfigFromLiveConfig pinning that the runtime classifier reads live config (the authority the server layer delegates to).

No behavior change on the default path; no storage/enforcement change.

Related #468

The merged #476 classifyServerToolStatus read config-denial only from the
storage ServerConfig copy. Config-file disabled_tools on stdio servers
live in the live runtime config and are not always mirrored to storage,
so disabled_by_config classification + upstream_servers counts were wrong
at runtime for that case (unit tests passed because the no-runtime
harness uses the storage fallback path).

Prefer p.mainServer.runtime.IsToolConfigDenied (same authority
isToolCallable/blockedToolMessage use); fall back to storage
IsToolAllowedByConfig only when no runtime is wired.

Adds a runtime regression test pinning that ClassifyDisabledTool reads
live config (the authority the server layer now delegates to).

Related #468
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 18, 2026

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 95bd1f9
Status: ✅  Deploy successful!
Preview URL: https://da823905.mcpproxy-docs.pages.dev
Branch Preview URL: https://049-fix-runtime-config-denie.mcpproxy-docs.pages.dev

View logs

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/server/mcp.go 50.00% 1 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link
Copy Markdown

📦 Build Artifacts

Workflow Run: View Run
Branch: 049-fix-runtime-config-denied

Available Artifacts

  • archive-darwin-amd64 (26 MB)
  • archive-darwin-arm64 (23 MB)
  • archive-linux-amd64 (15 MB)
  • archive-linux-arm64 (13 MB)
  • archive-windows-amd64 (26 MB)
  • archive-windows-arm64 (23 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (20 MB)
  • installer-dmg-darwin-arm64 (18 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 26035662104 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@Dumbris Dumbris merged commit ff03db9 into main May 18, 2026
38 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.

2 participants