Skip to content

fix(gateway): make Feishu ws connect override sync to preserve context manager (#25388)#25491

Merged
teknium1 merged 1 commit into
mainfrom
hermes/hermes-65abd7c4
May 14, 2026
Merged

fix(gateway): make Feishu ws connect override sync to preserve context manager (#25388)#25491
teknium1 merged 1 commit into
mainfrom
hermes/hermes-65abd7c4

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

The Feishu adapter wraps lark-oapi's Connect() callable to inject ping_interval/ping_timeout overrides, but the wrapper was async. The underlying library uses Connect() as an async context manager (async with Connect(...) as ws:), which requires the call itself to be sync and return an AsyncContextManager — making it async meant the wrapper was awaited eagerly and ws never bound.

Restoring the sync wrapper preserves the protocol while still injecting the overrides.

Salvage of #25388 by @pearjelly. Manually re-applied — original branch was severely stale against current main.

…t manager

The Feishu adapter wrapped lark-oapi's Connect() callable to inject
ping_interval/ping_timeout overrides, but made the wrapper async. The
underlying library uses Connect() as an async context manager (async
with Connect(...) as ws:), which requires the call itself to be sync
and return an AsyncContextManager — making it async meant the wrapper
was awaited eagerly and ws never bound.

Restoring the sync wrapper preserves the protocol while still injecting
the overrides.

Salvage of #25388 by @pearjelly (manually re-applied — original branch
was severely stale against current main).
@teknium1 teknium1 merged commit 71191b7 into main May 14, 2026
@teknium1 teknium1 deleted the hermes/hermes-65abd7c4 branch May 14, 2026 06:12
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/feishu Feishu / Lark adapter labels May 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-65abd7c4 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8319 on HEAD, 8319 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4380 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/feishu Feishu / Lark adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants