← Back to PRs

#14182: zulip: fix event queue registration for multiple monitored streams

by simpliq-marvin open 2026-02-11 16:38 View on GitHub →
docs stale
## Problem When `channels.zulip.streams` contains multiple stream names, the Zulip plugin was registering an event queue with a `narrow` like: ```json [["stream","build"],["stream","general"],["stream","openclaw"],["stream","research"]] ``` Zulip narrows are ANDed, so this matches nothing (a message cannot be in multiple streams at once). This caused the default/Marvin account to stop receiving messages, while role accounts (1 stream each) continued to work. ## Fix - If streams contains `"*"`: use `all_public_streams=true` - If exactly 1 stream: use `narrow=[["stream","<name>"]]` (legacy list format) - If multiple streams: omit `narrow` (broad queue) and rely on existing client-side filtering ## Tests Adds a Vitest regression test covering the three cases above. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR fixes Zulip event queue registration when multiple monitored streams are configured: it uses `all_public_streams=true` for `"*"`, uses a single-stream `narrow` for exactly one stream (legacy list format), and omits `narrow` for multiple streams while enforcing the stream allowlist client-side. It also adds new Zulip plugin implementation files (client, monitor, send/probe, config schema, normalization) plus Vitest coverage for queue registration and stream filtering, and updates docs/labeler to include Zulip. The change integrates into the channel plugin system by providing a `zulipPlugin` with config + pairing + outbound delivery, a monitor loop using Zulip event queues, and shared helpers for routing/session keys and stream monitoring. <h3>Confidence Score: 3/5</h3> - This PR is close to mergeable but has a couple of logic issues that can affect message routing and inbound gating. - Core stream registration fix looks correct and is covered by targeted tests, but there are two verified logic bugs: outbound parsing can truncate topics, and inbound mention detection uses a hardcoded agentId which can drop messages for routed agents when requireMention is enabled. - extensions/zulip/src/zulip/send.ts; extensions/zulip/src/zulip/monitor.ts <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs