Skip to content

Select task FU-P13-T10: Implement explicit broker daemon entrypoint and operational CLI flows#85

Merged
SoundBlaster merged 7 commits into
mainfrom
claude/implement-flow-run-skill-d6MCw
Feb 19, 2026
Merged

Select task FU-P13-T10: Implement explicit broker daemon entrypoint and operational CLI flows#85
SoundBlaster merged 7 commits into
mainfrom
claude/implement-flow-run-skill-d6MCw

Conversation

@SoundBlaster
Copy link
Copy Markdown
Owner

@SoundBlaster SoundBlaster commented Feb 19, 2026

Description

Implements FU-P13-T10: adds --broker-daemon as a first-class CLI entrypoint for the persistent broker host.

Previously, starting the broker daemon required a raw Python one-liner. This change wires BrokerDaemon + UnixSocketServer directly into main() behind the --broker-daemon flag, making --broker-spawn functional end-to-end. Broker-only flags are never forwarded to xcrun mcpbridge.

Key changes:

  • Extended _parse_broker_args() from 3-tuple to 4-tuple (broker_daemon, broker_connect, broker_spawn, remaining)
  • Added --broker-daemon startup branch in main() calling asyncio.run(daemon.run_forever())
  • Updated docs/broker-mode.md to reflect the new mcpbridge-wrapper --broker-daemon command
  • Added 7 new unit tests (TestMainBrokerDaemonMode + 2 parsing tests); all existing tests updated for 4-tuple unpacking

Type of Change

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

Quality Gates

  • 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

  • Documentation changes are synced with DocC catalog (or N/A)

docs/broker-mode.md updated; no corresponding DocC catalog entry exists for broker-mode.md (N/A for DocC sync table).


Testing

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

New tests added:

  • TestMainBrokerDaemonMode::test_main_broker_daemon_returns_0_on_success
  • TestMainBrokerDaemonMode::test_main_broker_daemon_returns_0_on_keyboard_interrupt
  • TestMainBrokerDaemonMode::test_main_broker_daemon_returns_1_on_runtime_error
  • TestMainBrokerDaemonMode::test_main_broker_daemon_does_not_start_bridge
  • TestMainBrokerDaemonMode::test_main_broker_daemon_wires_transport_to_daemon
  • TestParseBrokerArgs::test_broker_daemon_flag
  • TestParseBrokerArgs::test_broker_daemon_not_in_remaining

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

- Add --broker-daemon flag to _parse_broker_args() (4-tuple return)
- Wire BrokerDaemon + UnixSocketServer in main() daemon branch
- Guard: broker-only flags never forwarded to xcrun mcpbridge
- Update test_broker_proxy.py and test_main.py for 4-tuple unpacking
- Add TestMainBrokerDaemonMode with 5 new unit tests (all pass)
- Replace Python one-liner in docs/broker-mode.md with first-class CLI
- Fix Low finding: add --broker-daemon to main() docstring
- No blockers found; implementation approved with comments
Two lines in test_broker_proxy.py exceeded the 100-char limit after the
_parse_broker_args 4-tuple refactor; wrap argument lists to fix E501.
Also apply ruff formatter to __main__.py and test_main.py.

https://claude.ai/code/session_015Zo26UDDy1d6kaRWgTxqtC
@SoundBlaster SoundBlaster merged commit d8ef5be into main Feb 19, 2026
9 checks passed
@SoundBlaster SoundBlaster deleted the claude/implement-flow-run-skill-d6MCw branch February 19, 2026 13:06
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