Conversation
|
|
||
| const baseUrl = (configUrl || envUrl)?.replace(/\/+$/, "") || undefined; | ||
| const email = configEmail || envEmail || undefined; |
There was a problem hiding this comment.
Env vars ignored by config. resolveZulipAccount currently prefers config values over env (baseUrl = (configUrl || envUrl) etc.). In onboarding (extensions/zulip/src/onboarding.ts:684-705) you prompt to “use env vars?” when they’re detected, but choosing “yes” doesn’t actually make env take precedence if config already has values; it just leaves config as-is. This makes the prompt misleading and can’t achieve “use env vars” unless the user clears config manually.
If the intent is to allow env to override config when the user opts in, you’ll need a config flag (or similar) that flips precedence to env || config for the default account, or otherwise ensure the onboarding path clears the stored fields when env is selected.
Also appears in: extensions/zulip/src/channel.ts:358-369 (describeAccount sources are tied to the same precedence).
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/zulip/src/zulip/accounts.ts
Line: 121:123
Comment:
**Env vars ignored by config.** `resolveZulipAccount` currently prefers config values over env (`baseUrl = (configUrl || envUrl)` etc.). In onboarding (`extensions/zulip/src/onboarding.ts:684-705`) you prompt to “use env vars?” when they’re detected, but choosing “yes” doesn’t actually make env take precedence if config already has values; it just leaves config as-is. This makes the prompt misleading and can’t achieve “use env vars” unless the user clears config manually.
If the intent is to allow env to override config when the user opts in, you’ll need a config flag (or similar) that flips precedence to `env || config` for the default account, or otherwise ensure the onboarding path clears the stored fields when env is selected.
Also appears in: `extensions/zulip/src/channel.ts:358-369` (describeAccount sources are tied to the same precedence).
How can I resolve this? If you propose a fix, please make it concise.
Additional Comments (1)
If Zulip’s API supports multiple narrows (e.g. Prompt To Fix With AIThis is a comment left during a code review.
Path: extensions/zulip/src/zulip/monitor.ts
Line: 1278:1284
Comment:
**Allowlist not enforced for multi-stream.** When more than one stream is configured, `registerQueue` does not pass a `narrow`, so Zulip will deliver *all* message events for the bot’s subscriptions. `shouldIgnoreMessage` then filters in-process, but this means the plugin still ingests and processes (polls/parses) every subscribed stream, which violates the stated “monitors a configured stream allowlist” behavior and can be a big performance hit on busy bots.
If Zulip’s API supports multiple narrows (e.g. `[["channel","A"],["channel","B"]]` semantics) or registering separate queues per stream, the queue registration should be updated to actually constrain events to the allowlist when `streams.length > 1`.
How can I resolve this? If you propose a fix, please make it concise. |
|
Addressed Greptile feedback re multi-stream allowlist enforcement.
Commit: fc1821e |
|
Follow-up: reduce missed replies under rate limiting.
Commit: 75d4096 |
|
Fix: reaction cleanup (eyes spam) Zulip reaction removal now uses query params instead of a DELETE request body, which is more reliable across Zulip deployments and should prevent the onStart "eyes" reaction from sticking around. Commit: 25c0547 |
|
Fix: reduce Zulip /events 429s
Commit: cb8c651 |
|
Fix: larger backoff on Zulip 429s Increase the monitor backoff base for 429 responses (start at 10s, exponential from there) to avoid getting stuck in a 3s retry loop on stricter Zulip deployments. Commit: 806dd29 |
|
Fix: throttle heartbeat-only Zulip events Some Zulip deployments can return non-message events (e.g. heartbeat) even when event_types is restricted. Treating those as "empty" avoids an immediate re-poll loop that can contribute to 429s. Commit: fb4775e |
|
Fix: retry reaction add/remove on 429 Even with the DELETE query-param fix, reactions can still stick if Zulip rate-limits reaction endpoints (429). Reactions now use zulipRequestWithRetry (2 retries) so 👀 is much less likely to get stuck. Commit: 2f32e01 |
|
Feature: option to leave 👀 (onStart) reaction Add Commit: f2b2806 |
|
Update: uploads + topic directive
Commit: 0ac0da0 |
|
Duplicate #8365 |
Adds a full Zulip channel plugin with: - Event queue polling with exponential backoff - Authenticated upload downloads from /user_uploads/ - Outbound file uploads via /api/v1/user_uploads - Reaction indicators (eyes → check_mark/warning) - Topic directive [[zulip_topic: <topic>]] - HTTP retry with backoff (429/502/503/504) - Full actions API (stream CRUD, user management, reactions) - Channel docs and unit tests Refs: #5163, openclaw#8365, openclaw#9643
Adds a full Zulip channel plugin with: - Event queue polling with exponential backoff - Authenticated upload downloads from /user_uploads/ - Outbound file uploads via /api/v1/user_uploads - Reaction indicators (eyes → check_mark/warning) - Topic directive [[zulip_topic: <topic>]] - HTTP retry with backoff (429/502/503/504) - Full actions API (stream CRUD, user management, reactions) - Channel docs and unit tests Refs: #5163, openclaw#8365, openclaw#9643
Adds a full Zulip channel plugin with: - Event queue polling with exponential backoff - Authenticated upload downloads from /user_uploads/ - Outbound file uploads via /api/v1/user_uploads - Reaction indicators (eyes → check_mark/warning) - Topic directive [[zulip_topic: <topic>]] - HTTP retry with backoff (429/502/503/504) - Full actions API (stream CRUD, user management, reactions) - Channel docs and unit tests Refs: #5163, openclaw#8365, openclaw#9643
Adds a full-featured Zulip channel plugin with: Core Features: - Event queue polling with exponential backoff and auto-recovery - Authenticated upload downloads from /user_uploads/ - Outbound file uploads via /api/v1/user_uploads - Reaction indicators (eyes → check_mark/warning) - Topic directive [[zulip_topic: <topic>]] - HTTP retry with backoff (429/502/503/504) - Full actions API (stream CRUD, user management, reactions) - Channel docs and unit tests Key Improvement Over Existing PRs: - Implements CONCURRENT message processing with staggered start times - Other PRs (openclaw#9643, openclaw#14182) process messages sequentially, causing reply delays and "message dumps" when multiple messages arrive - This implementation starts processing each message immediately with a 200ms stagger for natural conversation flow - Replies arrive as each finishes instead of all at once Technical Details: - Fire-and-forget message processing with per-message error handling - Maintains event cursor and queue ID correctly during concurrent processing - Tested live and confirmed significant UX improvement Refs: openclaw#5163, openclaw#8365, openclaw#9643, openclaw#12183
a0d6f09 to
1e0e185
Compare
1e0e185 to
a4b7ce2
Compare
Co-authored-by: Ian MoltVS <[email protected]> Inspired-by: #15051
a4b7ce2 to
8dd23cd
Compare
|
New PR created to keep commits clean feat: add Zulip channel plugin #15887 |
Adds a full-featured Zulip channel plugin with: Core Features: - Event queue polling with exponential backoff and auto-recovery - Authenticated upload downloads from /user_uploads/ - Outbound file uploads via /api/v1/user_uploads - Reaction indicators (eyes → check_mark/warning) - Topic directive [[zulip_topic: <topic>]] - HTTP retry with backoff (429/502/503/504) - Full actions API (stream CRUD, user management, reactions) - Channel docs and unit tests Key Improvement Over Existing PRs: - Implements CONCURRENT message processing with staggered start times - Other PRs (openclaw#9643, openclaw#14182) process messages sequentially, causing reply delays and "message dumps" when multiple messages arrive - This implementation starts processing each message immediately with a 200ms stagger for natural conversation flow - Replies arrive as each finishes instead of all at once Technical Details: - Fire-and-forget message processing with per-message error handling - Maintains event cursor and queue ID correctly during concurrent processing - Tested live and confirmed significant UX improvement Refs: openclaw#5163, openclaw#8365, openclaw#9643, openclaw#12183
Adds a full-featured Zulip channel plugin with: Core Features: - Event queue polling with exponential backoff and auto-recovery - Authenticated upload downloads from /user_uploads/ - Outbound file uploads via /api/v1/user_uploads - Reaction indicators (eyes → check_mark/warning) - Topic directive [[zulip_topic: <topic>]] - HTTP retry with backoff (429/502/503/504) - Full actions API (stream CRUD, user management, reactions) - Channel docs and unit tests Key Improvement Over Existing PRs: - Implements CONCURRENT message processing with staggered start times - Other PRs (openclaw#9643, openclaw#14182) process messages sequentially, causing reply delays and "message dumps" when multiple messages arrive - This implementation starts processing each message immediately with a 200ms stagger for natural conversation flow - Replies arrive as each finishes instead of all at once Technical Details: - Fire-and-forget message processing with per-message error handling - Maintains event cursor and queue ID correctly during concurrent processing - Tested live and confirmed significant UX improvement Refs: openclaw#5163, openclaw#8365, openclaw#9643, openclaw#12183
Adds Zulip as a channel plugin (streams/topics) under
extensions/zulip.Key behavior:
general chatwhen a target omits the topic.eyescheckwarningConfig/targets:
channels.zulip(supportsaccounts.*like other plugins).stream:<streamName>#<topic?>.Scope / limitations:
Implementation notes:
resolveZulipSessionfor outbound session keys and treatszulipas markdown-capable.Tests:
pnpm buildpnpm checkpnpm exec vitest run extensions/zulip/src/channel.test.ts src/infra/outbound/outbound-session.test.tsGreptile Overview
Greptile Summary
This PR adds a new Zulip channel plugin under
extensions/zulipthat monitors an allowlisted set of streams, maps stream+topic to OpenClaw sessions, supports outbound targets likestream:<stream>#<topic?>, and optionally adds reaction indicators (start/success/failure) to the triggering message. It also updates core outbound session routing to generate stable Zulip session keys (including topic hashing for long topics) and markszulipas markdown-capable.Confidence Score: 3/5
(2/5) Greptile learns from your feedback when you react with thumbs up/down!