Skip to content

fix(gateway): honor Discord connect timeout for ready wait - #40070

Closed
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/discord-ready-timeout
Closed

konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:fix/discord-ready-timeout

Conversation

@konsisumer

Copy link
Copy Markdown
Contributor

What changed and why

Per the reporter's clarification on 2026-06-01, the outer gateway platform timeout can be raised to 90s, but DiscordAdapter.connect() still times out internally after 30s while waiting for Discord readiness. This change makes the Discord ready wait use HERMES_GATEWAY_PLATFORM_CONNECT_TIMEOUT too, including the existing non-positive value behavior for disabling the timeout.

Addressing maintainer feedback

A maintainer linked #16713 and #16739 as the same slash-command-sync startup-budget root cause. This follow-up keeps that context intact and fixes the remaining adapter-level 30s wait that still fires after the outer timeout path is extended.

How to test

  • pytest tests/gateway/test_discord_connect.py -q
  • /opt/homebrew/bin/timeout -k 30 480 sh -c 'pytest tests/ -q -x --timeout=60 "$@"' sh

The full repository command failed during collection in this sandbox because fastapi is not installed: ModuleNotFoundError: No module named 'fastapi'.

What platforms tested on

  • Local macOS sandbox with Python 3.14

Refs #19776

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/discord Discord bot adapter comp/plugins Plugin system and bundled plugins labels Jun 5, 2026
@konsisumer

Copy link
Copy Markdown
Contributor Author

Rebased onto origin/main and resolved the Discord adapter/test conflicts by keeping the configurable ready timeout together with upstream startup-task fail-fast and cancellation coverage. Local checks: ruff check on changed files, scripts/check-windows-footguns.py --all, git diff --check, and pytest tests/gateway/test_discord_connect.py -q -x --timeout=60 (19 passed). The repo-wide bounded pytest tests/ -q -x --timeout=60 run stops early on an unrelated local dependency issue: ModuleNotFoundError: fastapi from tests/hermes_cli/test_dashboard_auth_401_reauth.py.

@teknium1

Copy link
Copy Markdown
Collaborator

Merged via #55898 (#55898). Your adapter ready-wait fix was the original/earliest fix here and was cherry-picked onto current main with your authorship preserved per-commit (commit 46ab06c). PR #55898 also added the config.yaml surface on top. Thanks! Closes #19776.

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

Labels

comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists platform/discord Discord bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants