Skip to content

fix(dev-proxy): harden backend restarts and cleanup - #542

Merged
debugmcpdev merged 2 commits into
debugmcp:mainfrom
debugmcpdev:fix/dev-proxy-lifecycle-env
Aug 28, 2026
Merged

fix(dev-proxy): harden backend restarts and cleanup#542
debugmcpdev merged 2 commits into
debugmcp:mainfrom
debugmcpdev:fix/dev-proxy-lifecycle-env

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

Summary

  • let both restart tools replace, preserve, or clear persistent backend environment overrides without passing them to builds
  • report display-safe overrides in status using the shared sensitive-name and credential-shape redactors, with a fail-closed bootstrap mode and proxy-only opt-out
  • label custom docker run backends and remove owned containers for stdio, HTTP, and SSE lifecycle paths
  • serialize automatic startup, restarts, and shutdown so an immediate restart cannot create duplicate backend clients
  • suppress only intentional transport abort noise and avoid crash/orphan wording for expected child exits
  • correct the live and contributor-facing dev_server_status descriptions

Validation

  • pnpm run build
  • pnpm run test:unit — 233 files, 4292 tests
  • pnpm run test:integration — 8 files passed, 2 skipped; 23 tests passed, 5 skipped
  • pnpm run lint
  • pnpm run check:all-personal-paths
  • MCP SDK HTTP smoke, twice: immediate restart, override replace/preserve/clear, status redaction, backend tool forwarding, clean shutdown
  • real Docker stdio smoke: repeated restarts and final client shutdown left no ownership-labeled containers
  • self-debug smoke through the source dev proxy: breakpoint and locals in the environment merge helper, expression evaluation before/after a step, continue, and output capture

Dogfooding exposed the startup/restart race documented in #541. It was reproduced twice, deduplicated against open and closed issues, filed separately, and fixed in this branch.

Closes #498
Closes #527
Closes #536
Closes #539
Closes #541

Closes debugmcp#498
Closes debugmcp#527
Closes debugmcp#536
Closes debugmcp#539
Closes debugmcp#541

Signed-off-by: JF <john.franklin@gmail.com>
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

CHANGELOG: keep all entries from both sides.
CLAUDE.md / dev-proxy.mjs: keep this branch's dev_server_status wording, which
is a superset of debugmcp#540's — it adds the display-safe environment overrides field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment