Skip to content

fix(gateway): retry lifecycle notifications - #30123

Open
aoeman84 wants to merge 1 commit into
NousResearch:mainfrom
aoeman84:codex/retry-lifecycle-notifications
Open

aoeman84 wants to merge 1 commit into
NousResearch:mainfrom
aoeman84:codex/retry-lifecycle-notifications

Conversation

@aoeman84

Copy link
Copy Markdown

Summary

  • Preserve update completion marker files when final delivery fails so the next gateway startup can retry
  • Preserve restart completion markers when adapters are not ready or sends fail
  • Keep marker cleanup for successful delivery and intentional suppression cases

Tests

  • /home/aoeman/.hermes/hermes-agent/venv/bin/python -m pytest -q tests/gateway/test_update_command.py tests/gateway/test_update_streaming.py tests/gateway/test_restart_notification.py

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery labels May 22, 2026
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for addressing a real delivery-loss path. The exception and restart-marker preservation idea still applies on current main, but the patch needs a targeted port.

Problems

  • The update paths still do not inspect adapter.send() results. Adapters can return SendResult(success=False) rather than raise; current restart handling explicitly documents and checks that contract at gateway/run.py:14875-14886. The PR would still remove update markers after that kind of failed delivery.
  • Current main now uses _thread_metadata_for_target and _non_conversational_metadata for these sends (gateway/run.py:14785-14810, 14862-14874). Preserve those current routing semantics when salvaging the retry behavior.

Suggested changes

  • Port marker retention for exception and unsuccessful SendResult paths into current _send_update_notification and _watch_update_progress, while retaining the current metadata construction.
  • Add SendResult(success=False) regression coverage for both update delivery paths; the existing restart test documents this adapter behavior at tests/gateway/test_restart_notification.py:490-524.

Automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform 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

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-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants