Skip to content

feat: add BlueBubbles Socket.IO transport - #61808

Closed
cwallace wants to merge 4 commits into
NousResearch:mainfrom
cwallace:wallace/bluebubbles-socketio
Closed

feat: add BlueBubbles Socket.IO transport#61808
cwallace wants to merge 4 commits into
NousResearch:mainfrom
cwallace:wallace/bluebubbles-socketio

Conversation

@cwallace

Copy link
Copy Markdown

Summary

  • Add optional BlueBubbles Socket.IO inbound transport while preserving webhook as the default
  • Wire transport-specific lazy deps and a narrow bluebubbles-socketio extra
  • Normalize Socket.IO payload shapes, dedupe duplicate GUID events, and clean up partial connect failures
  • Document env/YAML transport configuration and Socket.IO install path

Verification

  • ./venv/bin/python -m py_compile gateway/platforms/bluebubbles.py gateway/run.py tools/lazy_deps.py
  • scripts/run_tests.sh tests/gateway/test_bluebubbles.py tests/test_project_metadata.py tests/test_packaging_metadata.py -q --tb=short → 102 passed
  • Missing-aiohttp Socket.IO requirement probe → requirements_without_aiohttp False
  • Refused-port cleanup probe → no ResourceWarning / no unclosed aiohttp client session
  • Live no-send Socket.IO connect/disconnect smoke against BlueBubbles → connected and disconnected cleanly

Notes

  • Webhook/default mode does not require python-socketio.
  • Socket.IO mode uses its own lazy feature path with both python-socketio and the async aiohttp runtime dependency.
  • Invalid explicit transports fail closed instead of silently falling back to webhook.

@cwallace
cwallace requested a review from a team July 10, 2026 02:34
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/gateway Gateway runner, session dispatch, delivery labels Jul 10, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the focused Socket.IO transport and lazy-dependency work. One compatibility issue needs correction.

Problems

  • gateway/platforms/bluebubbles.py:1208 adds GUID deduplication in _process_event_payload, which is also called by the webhook handler at line 1084. Therefore default webhook delivery now acknowledges and drops an updated-message after a new-message with the same GUID (lines 1219-1221). Current main explicitly registers both webhook events at gateway/platforms/bluebubbles.py:374-377, and its prior handler dispatched each accepted event.

Suggested changes

  • Gate this cache on self.use_socketio, then add a webhook regression test for a same-GUID new-message / updated-message sequence. If suppressing webhook updates is intentional, make that contract explicit and adjust webhook registration/docs accordingly.

Automated hermes-sweeper review.

Comment thread gateway/platforms/bluebubbles.py
@cwallace
cwallace force-pushed the wallace/bluebubbles-socketio branch from f9f719a to 61ddfc2 Compare July 10, 2026 18:01
@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 11, 2026
@cwallace cwallace closed this Jul 29, 2026
@cwallace
cwallace deleted the wallace/bluebubbles-socketio branch July 29, 2026 13:56
@cwallace

Copy link
Copy Markdown
Author

After extensive testing this only saved a few milliseconds (on average less than 10ms) per message and was not any more stable than the current webhook method. The extremely small performance improvement was not worth the increased complexity and additional code. I’ve closed the PR and removed the code from my own repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants