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

Dumbris merged 1 commit into
mainfrom
049-fix-runtime-config-denied

Conversation

@Dumbris

@Dumbris Dumbris commented May 18, 2026

Copy link
Copy Markdown
Member

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

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

Copy link
Copy Markdown

@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
Contributor

📦 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
Dumbris added a commit that referenced this pull request Jun 19, 2026
…-2909) (#720)

* feat(diagnostics): make MCPX_DOCKER_EXEC_NOT_FOUND runtime-aware

The static DockerExecNotFound catalog message ("the image has no
uvx/node") is too generic to self-resolve. A field report (ElevenLabs /
uvx) hit it because of a per-server `isolation.image: "python:3.11"`
override — stock python has no uvx — but the owner misattributed it to
recent host-side docker PATH fixes.

Enrich the remediation with per-server context: name the detected
runtime (uvx/npx/pipx/…), the recommended runtime-default image
(default_images[runtimeType]), and flag a per-server isolation.image
override as the likely culprit when it differs from the default.

- ClassifierHints gains DockerCommand / DockerImageOverride /
  DockerDefaultImages (diagnostics-only; never affect classification).
- RuntimeAwareRemediation(code, hints) builds the enriched message;
  DiagnosticError.Remediation carries it; the REST/status serializers
  prefer it over the static UserMessage when present.
- detectDockerRuntimeType mirrors core.DetectRuntimeType for display
  (diagnostics must not import upstream/core).
- Add docs/errors/MCPX_DOCKER_EXEC_NOT_FOUND.md + README index entry.

Image selection and TransformCommandForContainer are unchanged
(correct since #477) — this is diagnostics-only.

Related MCP-2909

* fix(docs): correct docker-isolation link in MCPX_DOCKER_EXEC_NOT_FOUND page

Docusaurus broken-links check failed the docs build: ../docker-isolation.md
resolved to /docker-isolation.md (no such route). Use ../features/docker-isolation.md,
matching the sibling MCPX_DOCKER_IMAGE_PULL_FAILED page.

Related MCP-2909
Dumbris added a commit that referenced this pull request Sep 2, 2026
`test/e2e-config.json` carried an auto-generated 64-hex api_key since
#477. It only ever guarded a localhost test instance and
scripts/test-api-e2e.sh extracts whatever key the core logs, so the
value is irrelevant — but it trips every secret scanner (gitleaks:
generic-api-key). Use an obviously synthetic value, matching the
sandbox-integration workflow's "qa-sandbox-ci-test".

Also ignore `.osgrep/`: `.osgrep/server.json` (local authToken) was
committed on the unmerged pull/165 ref.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Dumbris added a commit that referenced this pull request Sep 2, 2026
…st repeats (#1199)

* chore: remove accidentally committed warmtiktoken binary, guard against repeats

`warmtiktoken` (43 MB arm64 Mach-O, the build output of
`go build ./bench/cmd/warmtiktoken` run from the repo root) landed at the
repo root in #1153. Untrack it, ignore it alongside the other root
binaries, and add two pre-commit guards so it cannot happen again:

- `check-added-large-files` (8 MB cap, above the largest legitimate
  screenshot/report)
- a local `no-native-binaries` hook that rejects Mach-O/ELF/PE files

The blob stays in history; purging it needs a history rewrite, which is
left as a separate decision.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* chore: replace real-looking e2e api_key fixture, ignore .osgrep/

`test/e2e-config.json` carried an auto-generated 64-hex api_key since
#477. It only ever guarded a localhost test instance and
scripts/test-api-e2e.sh extracts whatever key the core logs, so the
value is irrelevant — but it trips every secret scanner (gitleaks:
generic-api-key). Use an obviously synthetic value, matching the
sandbox-integration workflow's "qa-sandbox-ci-test".

Also ignore `.osgrep/`: `.osgrep/server.json` (local authToken) was
committed on the unmerged pull/165 ref.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
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