Repository navigation
fix(feishu): route SDK traffic through ambient proxy - #86386
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 3:08 PM ET / 19:08 UTC. Summary PR surface: Source +27, Tests +117. Total +144 across 2 files. Reproducibility: yes. at source level. Current main uses a timeout-only Feishu SDK HTTP wrapper and no WS bootstrap httpInstance, while the pinned Lark SDK uses httpInstance for tenant-token requests and WS pullConnectConfig; the PR body also includes live terminal proof from an equivalent installed-package hotfix. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Accept or reject the Feishu proxy egress policy explicitly; if accepted, land this focused httpInstance fix and track broader per-channel direct/proxy controls separately. Do we have a high-confidence way to reproduce the issue? Yes, at source level. Current main uses a timeout-only Feishu SDK HTTP wrapper and no WS bootstrap httpInstance, while the pinned Lark SDK uses httpInstance for tenant-token requests and WS pullConnectConfig; the PR body also includes live terminal proof from an equivalent installed-package hotfix. Is this the best way to solve the issue? Yes, with maintainer policy acceptance. Reusing the Lark SDK httpInstance seam inside the Feishu plugin is the narrow owner-boundary fix, while a channel-level direct/proxy mode is broader follow-up work for mixed-network setups. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 82dfd8910743. Label changesLabel justifications:
Evidence reviewedPR surface: Source +27, Tests +117. Total +144 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Patch Peep Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
@clawsweeper re-review Updated the Feishu HTTP proxy wrapper to override request-level httpAgent/httpsAgent only while OpenClaw managed proxy mode is active ( |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
This comment was marked as spam.
This comment was marked as spam.
|
@BingqingLyu Thanks for the heads-up. I checked the actual line-level changes between this PR and #86146 — they don't overlap:
The two PRs change disjoint regions of the same two files, and the intents are semantically independent (one fixes a test-infra cache-eviction bug; this one routes Lark SDK REST / WS bootstrap HTTP through the shared ambient proxy). Whichever lands first, the other should rebase cleanly without manual conflict resolution. |
|
why this still not merge yet? really need this |
|
This pull request has been automatically marked as stale due to inactivity. |
0cde216 to
18ea754
Compare
|
Rebased onto the latest Why it conflicted:
How it was resolved: kept Local validation (Linux, Node 22.22.3):
@vincentkoc you owned the |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Land-ready at Maintainer work completed:
Proof:
Known proof gaps: none. |
|
Merged via squash.
|
* fix(feishu): route sdk http through ambient proxy * fix(feishu): preserve request agents under proxy * fix(feishu): honor managed proxy agent override * fix(feishu): share ambient proxy transport * chore(feishu): move release note to pr --------- Co-authored-by: Peter Steinberger <[email protected]>
* fix(feishu): route sdk http through ambient proxy * fix(feishu): preserve request agents under proxy * fix(feishu): honor managed proxy agent override * fix(feishu): share ambient proxy transport * chore(feishu): move release note to pr --------- Co-authored-by: Peter Steinberger <[email protected]>
AI-assisted contribution.
What Problem This Solves
Feishu REST calls, WebSocket endpoint discovery, and the WebSocket connection itself did not share one ambient proxy transport. Proxy-only deployments could therefore fail during token/API calls or WebSocket startup even when
HTTP_PROXY/HTTPS_PROXYwas configured.Fixes #48949.
Why This Change Was Made
ProxylineNodeProxyAgentand reuse it across Feishu REST, SDK bootstrap, and WebSocket traffic.The Feishu SDK exposes separate
httpInstanceand WebSocketagentseams; using the same dual-protocol Proxyline agent at both seams keeps ownership in the Feishu plugin and preserves connection pooling.User Impact
Feishu installations behind an HTTP(S) proxy can authenticate, complete WebSocket endpoint discovery, and maintain the WebSocket session through the configured proxy. No new configuration is introduced.
Evidence
pnpm test extensions/feishu/src/client.test.ts— 24/24 passed.oxfmt --checkpassed for the touched TypeScript files and changelog.open.feishu.cn:443; fake credentials reached Feishu and failed authentication only after the proxy tunnel succeeded.HTTP_PROXY/HTTPS_PROXY/OPENCLAW_PROXY_URLconfigured. After applying the equivalent installed-package fix,openclaw channels status --channel feishu --deep --probereportedenabled, configured, running, works; logs reported the bot identity resolved and WebSocket client ready without the prior HTTP-to-HTTPS failure.af7b69515f1a3df25d0279d3bad6f70e4341e746.Testbox run: https://github.com/openclaw/openclaw/actions/runs/29390928814