hermes-agent/plugins
Brin Shadewater e6f1d613b6 fix(discord): leave voice channels before cancelling the bot task
`DiscordAdapter.disconnect()` cancelled the bot task before tearing down voice
clients. `leave_voice_channel()` ends in `await vc.disconnect()`, and discord.py
sends a voice state update over the main gateway websocket and then waits for the
voice socket to close. The bot task is the loop running that gateway connection,
so cancelling it first left the handshake with no transport: it could never
complete and blocked until the caller's shutdown timeout fired.

The effect was a fixed ~5s penalty on every shutdown with a voice connection
open, ending in "discord disconnect timed out after 5.0s - forcing continue",
with the voice disconnect abandoned rather than completed.

Measured on a live gateway with a voice connection open in both cases:

  before: timed out after 5.0s, all adapters disconnected at +5.29s
  after:  discord disconnected (0.12s), all adapters disconnected at +0.46s

Moving the voice-cleanup loop above `_cancel_bot_task()` preserves the
zombie-client protection its comment describes: the bot task is still cancelled
before `client.close()`, just after voice teardown rather than before it. Voice
teardown is the one step that still requires a live gateway.

Adds a regression test asserting the ordering. It fails on the previous ordering
at index 1 with `cancel_bot_task != leave_voice_channel:111`.

Fixes #76044
2026-08-03 22:47:14 +05:30
..
browser fix(secrets): scope browser plugin credential reads (browser_use/browserbase/firecrawl) 2026-08-02 10:04:48 -07:00
context_engine feat(context-engine): host contract for external context engines 2026-05-28 01:45:30 -07:00
cron_providers fix(cron): set headers for chronos JWKS requests 2026-07-31 10:17:30 -04:00
dashboard_auth fix(dashboard): set headers for Nous JWKS requests 2026-07-31 10:17:30 -04:00
disk-cleanup fix(disk-cleanup): re-validate stale test entries and protect new dirs from sweep 2026-07-31 22:36:04 -07:00
google_meet fix(secrets): resolve google_meet realtime key via secret scope at spawn time 2026-08-02 10:04:48 -07:00
hermes-achievements fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
image_gen fix(secrets): scope image_gen plugin credential reads (openai/deepinfra/krea) 2026-08-02 10:04:48 -07:00
kanban feat(kanban): expose the per-task reasoning effort over REST 2026-08-01 16:10:03 -05:00
memory fix(openviking): catch endpoint errors in setup validation functions 2026-08-03 20:35:47 +05:30
model-providers fix(secrets): scope tier-3 credential reads (teams_pipeline, deepinfra models, FAL/XAI/VERCEL/DAYTONA/GITHUB presence, HERMES_API_KEY display) 2026-08-02 10:04:48 -07:00
observability Reapply "feat(observability): integrate NeMo Relay runtime and shared metrics" 2026-07-27 21:10:51 -07:00
platforms fix(discord): leave voice channels before cancelling the bot task 2026-08-03 22:47:14 +05:30
security-guidance plugins: add security-guidance — pattern-matched warnings on dangerous code writes (#33131) 2026-05-27 02:07:21 -07:00
spotify chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
teams_pipeline fix(secrets): scope tier-3 credential reads (teams_pipeline, deepinfra models, FAL/XAI/VERCEL/DAYTONA/GITHUB presence, HERMES_API_KEY display) 2026-08-02 10:04:48 -07:00
video_gen fix(video-gen): omit duration for range-based FAL families when unspecified 2026-07-16 04:24:10 -07:00
web fix: repair sweep fallout — duplicate encoding kwargs, non-subprocess call sites, kwarg-snapshot tests 2026-07-24 11:45:57 -07:00
__init__.py
…
plugin_utils.py fix(plugins): thread-safe lazy-singleton helpers; fix honcho TOCTOU (#24759) (#42150) 2026-06-08 09:35:22 -07:00