Skip to content

P4-T1: Auto-restart stale broker daemon on version mismatch after upgrade#137

Merged
SoundBlaster merged 11 commits intomainfrom
feature/P4-T1-auto-restart-stale-broker
Mar 5, 2026
Merged

P4-T1: Auto-restart stale broker daemon on version mismatch after upgrade#137
SoundBlaster merged 11 commits intomainfrom
feature/P4-T1-auto-restart-stale-broker

Conversation

@SoundBlaster
Copy link
Owner

Description

Implements P4-T1 end-to-end with FLOW artifacts and runtime changes for broker version lifecycle safety.

Key changes:

  • Derive package version from importlib.metadata in mcpbridge_wrapper.__init__.
  • Add broker version stamp support (broker.version) via BrokerConfig, daemon write/cleanup, and daemon status payload.
  • Add proxy stale-daemon handling for version mismatch (_check_version_mismatch, _stop_stale_daemon, file cleanup).
  • Add CLI lifecycle commands: --broker-status and --broker-stop.
  • Stop running broker daemon in scripts/install.sh and scripts/uninstall.sh before file operations.
  • Update docs/broker-mode.md for status/stop/version-management guidance.
  • Add/expand tests (including new tests/unit/test_init.py) and archive task/review artifacts.

Validation run:

  • pytest766 passed, 5 skipped
  • ruff check src/ → pass
  • mypy src/mcpbridge_wrapper → pass
  • pytest --cov=src/mcpbridge_wrapper --cov-report=term-missing90.71%

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactoring
  • CI/CD improvement

Quality Gates

Before submitting, ensure all quality gates pass:

make check

Or run individually:

  • make test - All tests pass with ≥90% coverage
  • make lint - No linting errors
  • make format - Code is properly formatted
  • make typecheck - Type checking passes
  • make doccheck - Documentation is synced with DocC (if docs changed)

Documentation Sync

If you modified files in docs/, ensure corresponding DocC files are also updated:

docs/ file DocC file
docs/installation.md mcpbridge-wrapper.docc/Installation.md
docs/cursor-setup.md mcpbridge-wrapper.docc/CursorSetup.md
docs/claude-setup.md mcpbridge-wrapper.docc/ClaudeCodeSetup.md
docs/codex-setup.md mcpbridge-wrapper.docc/CodexCLISetup.md
docs/troubleshooting.md mcpbridge-wrapper.docc/Troubleshooting.md
docs/architecture.md mcpbridge-wrapper.docc/Architecture.md
docs/environment-variables.md mcpbridge-wrapper.docc/EnvironmentVariables.md
README.md mcpbridge-wrapper.docc/mcpbridge-wrapper.md
  • Documentation changes are synced with DocC catalog (or N/A)

Testing

  • Added/updated tests for new functionality
  • All tests pass locally
  • Manually tested the changes

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • Comments added for complex code
  • Documentation updated (if needed)
  • No new warnings generated
  • PR title is descriptive

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a252c8561f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SoundBlaster SoundBlaster merged commit f81f95a into main Mar 5, 2026
10 checks passed
@SoundBlaster SoundBlaster deleted the feature/P4-T1-auto-restart-stale-broker branch March 5, 2026 18:13
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