fix(discord): continuously recover missed gateway messages - #87700
Open
maxibotstef wants to merge 2 commits into
Open
fix(discord): continuously recover missed gateway messages#87700maxibotstef wants to merge 2 commits into
maxibotstef wants to merge 2 commits into
Conversation
Contributor
fix(discord): continuously recover missed gateway messages
|
andrexibiza
added a commit
to andrexibiza/hermes-agent
that referenced
this pull request
Aug 19, 2026
Reclassify closed packet-era PRs as historical evidence, promote NousResearch#81388 and NousResearch#87700 as current successors, and correct current state to 1 unwired / 10 blocked / 31 gap. Preserve the canonical 42-row contract digest and keep forbidden god-file candidates blocked rather than laundering them into accepted implementation paths. Depends on NousResearch#90307 Part of NousResearch#79564 Part of NousResearch#78647 Signed-off-by: Andrex Ibiza, MBA <andrexibiza@gmail.com>
This was referenced Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hermes can remain nominally connected to Discord while silently missing a gateway event. The existing recovery scan runs only at startup/ready time, so a missed human message can remain unanswered until the next restart.
This change:
Incident reproduced
An untagged human
?appeared in a configured free-response Discord channel after gateway startup. The WebSocket remained connected, but the live event was absent from gateway dispatch logs and startup-only recovery did not revisit it. This is distinct from a reconnect-only outage.Implementation
discord.missed_message_backfill.interval_secondsdefaults to60.0keeps the ready-time scan while disabling periodic polling.0is quiet.disconnect()cancels the periodic owner before the active scan.limitandmax_dispatchesbounds remain in force.claim=True; failure/cancellation paths retain the existing claim release behavior.Verification
Exact reviewed head:
6b3111e8f14da7f9ddf1cca09d091f4032a9c7caFocused suites:
Independent Opus review:
GO_WITH_CAVEATS, no blockers. The review specifically verified the recovered/live-event race, consecutive-pass durable completion, other-bot narrowing, interval validation, serialized task ownership, and shutdown order.Related open PRs / overlap disclosure
main; maintainers may need to sequence the behavioral fix before that refactor.Caveats / activation checks
missed_message_backfillconfig mapping is absent; config-file precedence is unchanged.15seconds and watches REST/rate-limit logs and event-loop latency.Scope
Changed paths only:
hermes_cli/config_defaults.pyplugins/platforms/discord/adapter.pytests/gateway/test_discord_free_response.pytests/gateway/test_discord_missed_message_backfill.pytests/gateway/test_voice_command.pyNo scheduler, watchdog service, database, auth weakening, liveness-threshold change, broad adapter refactor, or unrelated delivery change.