Skip to content

fix: check BlueBubbles reachability even when PaaS webhook is pre-registered#953

Merged
njbrake merged 1 commit intomainfrom
fix/bluebubbles-reachable-with-paas-webhook
Apr 14, 2026
Merged

fix: check BlueBubbles reachability even when PaaS webhook is pre-registered#953
njbrake merged 1 commit intomainfrom
fix/bluebubbles-reachable-with-paas-webhook

Conversation

@njbrake
Copy link
Copy Markdown
Collaborator

@njbrake njbrake commented Apr 14, 2026

Description

Deployed clawbolt-premium on Railway; the dashboard Channels page showed BlueBubbles as "Not available" (grayed out), but inbound webhooks and outbound sends worked fine.

Root cause: `BlueBubblesChannel.start()` had `if self.webhook_registered: return` before `_check_server_reachable()`. On premium, the lifespan hook in `clawbolt_premium/app.py` sets `channel.webhook_registered = True` during PaaS webhook registration, so the OSS `start()` short-circuits and never runs the reachability probe. `server_reachable` stays `False`, `is_bluebubbles_configured()` returns `False`, dashboard paints it unavailable.

Fix

Reorder `start()`: run the reachability check first (it's orthogonal to who registered the webhook), then keep the `webhook_registered` short-circuit to skip tunnel discovery + OSS webhook registration.

Type

  • Bug fix

Tests

  • New: `test_start_checks_reachability_even_with_paas_webhook_registered` — with `webhook_registered=True` and a reachable server, asserts `server_reachable=True` while tunnel discovery + registration stay skipped. Fails on main.
  • Full suite: 1579 passed, 13 deselected.

Checklist

  • Tests pass
  • Lint + format clean
  • Regression test added

AI Usage

  • AI-assisted — Claude Opus 4.6 (1M context)

🤖 Generated with Claude Code

…istered

On premium, the lifespan hook sets channel.webhook_registered=True
before BlueBubblesChannel.start() runs, so the existing
'if self.webhook_registered: return' short-circuit skipped the
_check_server_reachable() call entirely. server_reachable stayed False,
is_bluebubbles_configured() returned False, and the dashboard Channels
page showed BlueBubbles as "Not available" even though webhook delivery
and outbound sends were working fine.

Reorder start(): run the reachability check first (it's orthogonal to
who registered the webhook), then short-circuit on webhook_registered
before tunnel discovery. The tunnel-discovery skip is preserved.

Regression test verifies that with webhook_registered=True and a
reachable server, start() still sets server_reachable=True while
skipping tunnel discovery and webhook registration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@njbrake njbrake merged commit 63c9c66 into main Apr 14, 2026
10 checks passed
@njbrake njbrake deleted the fix/bluebubbles-reachable-with-paas-webhook branch April 14, 2026 15:37
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