Skip to content

fix(docker): observable spawn decision + accurate transport error label (#696)#708

Merged
Dumbris merged 1 commit into
mainfrom
fix/696-docker-spawn-diagnostics
Jun 18, 2026
Merged

fix(docker): observable spawn decision + accurate transport error label (#696)#708
Dumbris merged 1 commit into
mainfrom
fix/696-docker-spawn-diagnostics

Conversation

@Dumbris

@Dumbris Dumbris commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

Closes the diagnosability gap behind #696. Investigation proved the v0.40.0 docker-isolation spawn already direct-execs the resolved Docker Desktop bundle path on macOS — #696 is not a reproducible source bug. The field report looked like a bare-docker spawn because of two diagnosability defects, now fixed:

  • connection_stdio.go — the transport error reported c.config.Command (always "docker" for an isolated server) instead of the resolved finalCommand actually exec'd. A successful direct-exec of an absolute bundle path was therefore indistinguishable in the error from a bare-docker spawn — actively misdirecting diagnosis. Now reports finalCommand (the real argv[0]: absolute path on direct-exec, login shell on the shell-wrap fallback).
  • connection_docker.go — no INFO-level spawn-decision log. Added INFO lines for both the direct-exec path and the login-shell-wrap fallback so a report like Docker Desktop not detected on macOS: servers fail with command not found: docker despite docker_available: true #696 ("docker installed but not on PATH") can be triaged from one main.log line: which docker binary was chosen and whether it was exec'd directly vs shell-wrapped.

Test evidence

Local verification

  • go build ./cmd/mcpproxy — OK
  • go test -race ./internal/upstream/core/ ./internal/shellwrap/ — green
  • golangci-lint v2.5.0 --config .github/.golangci.yml on changed packages — 0 issues

No user-facing surface changes (internal log lines + an error-label correction), so no docs diff required.

Related #696

…el (#696)

Related #696

The v0.40.0 docker-isolation spawn already direct-execs the resolved bundle
path on macOS, but two diagnosability defects made the field failure look
like a bare-docker spawn:

- transport error reported c.config.Command (always "docker") instead of the
  resolved finalCommand actually exec'd, so a successful direct-exec of an
  absolute bundle path looked identical to a bare-docker spawn.
- no INFO-level spawn-decision log to tell direct-exec from shell-wrap.

## Changes
- connection_stdio.go: transport error reports finalCommand (real argv[0])
- connection_docker.go: INFO logs for direct-exec vs login-shell-wrap fallback
- shellwrap/testhooks.go: cross-package test seam (well-known paths + cache reset)
- connection_docker_integration_test.go: real-resolver #696 repro (bundle/path/
  unresolvable legs) + status/spawn no-divergence guard
- connection_docker_exec_e2e_test.go: recording-shim proves OS execs abs path

## Testing
- go test -race ./internal/upstream/core/ ./internal/shellwrap/ green
- golangci-lint v2 clean
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4295047
Status: ✅  Deploy successful!
Preview URL: https://4fd8f6ee.mcpproxy-docs.pages.dev
Branch Preview URL: https://fix-696-docker-spawn-diagnos.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 56.25000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/shellwrap/testhooks.go 0.00% 6 Missing ⚠️
internal/upstream/core/connection_stdio.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/696-docker-spawn-diagnostics

Available Artifacts

  • archive-darwin-amd64 (28 MB)
  • archive-darwin-arm64 (25 MB)
  • archive-linux-amd64 (16 MB)
  • archive-linux-arm64 (14 MB)
  • archive-windows-amd64 (28 MB)
  • archive-windows-arm64 (25 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (21 MB)
  • installer-dmg-darwin-arm64 (19 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 27733130012 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@mcpproxy-gatekeeper mcpproxy-gatekeeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: CodexReviewer accept verdict (Paperclip review of record); CI green. #696 docker spawn diagnosability.

@Dumbris Dumbris merged commit 85b2ef7 into main Jun 18, 2026
36 checks passed
@Dumbris Dumbris deleted the fix/696-docker-spawn-diagnostics branch June 18, 2026 06:10
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