Skip to content

fix: preserve gateway update completion notifications - #33282

Open
Yellowfish23 wants to merge 2 commits into
NousResearch:mainfrom
Yellowfish23:fix/gateway-update-notification-retry
Open

Yellowfish23 wants to merge 2 commits into
NousResearch:mainfrom
Yellowfish23:fix/gateway-update-notification-retry

Conversation

@Yellowfish23

Copy link
Copy Markdown

Summary

  • prevent duplicate gateway /update runs from overwriting lifecycle markers
  • preserve completion markers when final notification delivery transiently fails
  • retry final update notifications and clean stale/corrupt marker files
  • keep safe-update transcript output while preserving the update process exit code

Test Plan

  • .venv/Scripts/python.exe -m pytest tests/gateway/test_update_command.py tests/gateway/test_update_streaming.py -q --timeout-method=thread

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists labels May 27, 2026
@alt-glitch

Copy link
Copy Markdown

Competes with open #30123 (retry lifecycle notifications) and #15539 (prevent concurrent gateway update clobbering).

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for addressing a real update-notification delivery-loss path. Current main still deletes update markers after a final send exception (gateway/run.py:14614-14623) and ignores unsuccessful SendResult values in the legacy completion path (gateway/run.py:14806-14825).

Problems

  • The PR's streaming final-send hunk retries raised exceptions, but it does not inspect adapter.send() for SendResult(success=False). Current lifecycle code documents that adapters can return this instead of raising at gateway/run.py:14875-14886; the streaming path would still clean up undelivered completion markers.
  • The PR changes _handle_update_command in gateway/run.py, but current main moved that handler to gateway/slash_commands.py:4504 in 619bd7827. The handler-side sentinel/transcript/UTF-8 changes need a targeted port that preserves current routing metadata.

Suggested changes

  • Apply the same unsuccessful-SendResult retention logic in both _watch_update_progress and _send_update_notification, with regression tests for each path.
  • Port the command-start changes into gateway/slash_commands.py and preserve current _thread_metadata_for_target / _non_conversational_metadata delivery behavior.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform area/install-update Installer, updater, packaging, wheels, doctor labels Jul 13, 2026

This branch has not been deployed

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

Labels

area/install-update Installer, updater, packaging, wheels, doctor comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants