Conversation
Use a REST-only outbound path for send_message/cron BlueBubbles sends so they do not start the inbound webhook listener and collide with a running gateway. Also redact BlueBubbles password query parameters in surfaced errors and isolate webhook environment variables in BlueBubbles tests.
teknium1
left a comment
There was a problem hiding this comment.
Thanks for addressing a real BlueBubbles standalone-send failure. Current main still calls adapter.connect() from tools/send_message_tool.py:1806, and that method starts the webhook TCPSite at gateway/platforms/bluebubbles.py:281-295, so the port-collision premise remains valid.
Problems
tools/send_message_tool.py:1612-1619reproduces the adapter's HTTP-client setup and ping/server-info handshake already owned byBlueBubblesAdapter.connect()atgateway/platforms/bluebubbles.py:239-269. Keeping both lifecycle implementations will drift.- The added test validates that the copied tool path skips
connect(), but it does not define or test the adapter-level outbound-only lifecycle. Related salvage PR #51763 suppliesconnect(send_only=True)plus tests that default gateway startup still binds/registers and send-only teardown leaves gateway-owned state alone.
Suggested changes
- Keep the regression goal, but make
_send_bluebubbles()call an adapter-ownedconnect(send_only=True)path and preserveconnect()as the single handshake implementation. - Gate disconnect cleanup on webhook-runner ownership so one-shot sends cannot unregister the gateway webhook or overwrite its runtime status.
This is an automated hermes-sweeper review; humans make the final merge/salvage decision.
| client = httpx.AsyncClient(timeout=30.0) | ||
| else: | ||
| client = httpx.AsyncClient(timeout=30.0, limits=limits) | ||
| try: |
There was a problem hiding this comment.
Please keep this handshake in BlueBubblesAdapter.connect() behind an outbound-only mode rather than duplicating it here. The adapter already owns the client lifecycle, ping/server-info state, webhook registration, and runtime-status behavior; #51763's connect(send_only=True) approach also protects send-only teardown from touching gateway-owned webhook state.
Summary
Test Plan