Skip to content

feat: WeCom Stream Mode (WebSocket long-connection)#946

Open
felix307253927 wants to merge 2 commits intoRightNow-AI:mainfrom
felix307253927:pr-main-wecom_stream
Open

feat: WeCom Stream Mode (WebSocket long-connection)#946
felix307253927 wants to merge 2 commits intoRightNow-AI:mainfrom
felix307253927:pr-main-wecom_stream

Conversation

@felix307253927
Copy link
Copy Markdown
Contributor

Summary

Add WeCom Stream Mode (WebSocket long-connection)

Changes

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

Copy link
Copy Markdown
Member

@jaberjaber23 jaberjaber23 left a comment

Choose a reason for hiding this comment

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

LGTM. Legitimate WeCom Stream Mode channel adapter. Clean 822-line implementation with proper WebSocket protocol handling (subscribe, ping heartbeat, msg/event callbacks), message deduplication via ring-buffer cache, Zeroizing for secret, outbound message queue, and correct ChannelAdapter trait implementation. Config integration is clean. Please rebase on main.

@jaberjaber23
Copy link
Copy Markdown
Member

This PR has merge conflicts. Please rebase onto the latest main branch and resolve conflicts so we can merge.

This was referenced Apr 10, 2026
@jaberjaber23
Copy link
Copy Markdown
Member

Thanks @felix307253927 — WeCom stream mode via the official WebSocket endpoint (wss://openws.work.weixin.qq.com) is a real feature request. Branch is currently CONFLICTING / DIRTY against main after #1041 landed.

Before re-review:

  1. Rebase on current main and resolve the Cargo.lock / channel-module conflicts.
  2. Verify token/secret handling across reconnects. The WebSocket client is long-lived — confirm no secrets are logged on reconnect attempts, auth failures, or frame decode errors. Zeroizing on the secret is good; please also audit any tracing::info! / error! calls in the reconnect loop for accidental inclusion.
  3. Add tests for: initial auth failure (bad secret), mid-stream disconnect + reconnect, and backpressure when the channel buffer fills.
  4. Security Audit was red on the previous run — rebase should help; must be green for merge.

Happy to re-review once rebased.

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.

2 participants