fix(gateway): retry restart completion delivery - #70859
Conversation
63366dd to
233dc45
Compare
|
Current GitHub state is |
233dc45 to
b72824e
Compare
|
Thanks for flagging the new lifecycle changes. I rechecked the premise against current Current A separate gateway-owned durability gap still reproduces on exact current The currentized candidate keeps the new Current local verification before publication:
|
|
Thanks for narrowing this to the remaining restart-delivery durability gap. The premise is verified on current main: GitHub currently reports commit Automated hermes-sweeper review. |
b72824e to
53ae5c9
Compare
SummaryEight PRs address or reference the Telegram restart-notification complex. The diffs split between readiness-only fixes, non-durable retries, durable marker ownership, and a now-separate cold/crash startup broadcast policy; current main addresses the original cold-start readiness race, while retryable transport recovery and marker retention remain the distinct concern in #70859. Related pull requests
Duplicates#65709, #69530, and #73483 substantially overlap on readiness-gated requester retry; #72009 duplicates that retry intent without durable ownership, while #68569 targets the same symptom but conflicts with the polling-health contract. #70859 and #66598 overlap on retryable requester-marker durability, but #70859 adds generic transport and marker-generation ownership while #66598 also covers planned-restart home-channel delivery; #69676 is now separate policy scope. Suggested consolidationAuthor action: rebase #70859 onto current main, reconcile Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I66589(["issue #66589 (open)"])
I69370(["issue #69370 (closed)"])
I72663(["issue #72663 (open)"])
I73473(["issue #73473 (closed)"])
P70859["PR #70859 (open)"]
P70859 -.->|partial| I66589
P70859 -->|best fix| I69370
P70859 -->|best fix| I72663
P70859 -->|best fix| I73473
class I66589 open
class I69370 closed
class I72663 open
class I73473 closed
class P70859 open
class P70859 best
class P70859 best
class P70859 best
class P70859 target
click I66589 "https://github.com/NousResearch/hermes-agent/issues/66589"
click I69370 "https://github.com/NousResearch/hermes-agent/issues/69370"
click I72663 "https://github.com/NousResearch/hermes-agent/issues/72663"
click I73473 "https://github.com/NousResearch/hermes-agent/issues/73473"
click P70859 "https://github.com/NousResearch/hermes-agent/pull/70859"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 8 pull requests and 5 issues in this complex. Each diff was read against this issue; Assessment working set: 116 kB of PR diffs, 49 kB of issue/PR text, 36 kB of discussion (40 comments), 59 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
53ae5c9 to
e5d24a8
Compare
e5d24a8 to
0b7d455
Compare
|
Rebuilt this branch from current Local verification: 47 focused tests, Ruff, Windows-footgun scan, diff check, and synthetic merge passed. An independent adversarial re-review found no Critical/Important/Minor issues. |
Keep the durable restart marker while a transport is temporarily unavailable or after an explicit retryable pre-send refusal. Retry with bounded backoff without blocking gateway startup, and enforce the total deadline inside the provider-dispatch task without waiting for cancellation-resistant sends to settle. Claim marker ownership before adapters connect without letting malformed marker bytes abort startup, preserve a captured obligation if its first worker read fails, revalidate ownership before every attempt, and add a unique request ID so an older worker cannot send for or consume a replacement restart marker. Related NousResearch#69370. Related NousResearch#66589. (cherry picked from commit 53ae5c9d849dac713b825037c5470bbaa5b3324e)
0b7d455 to
9c7da2e
Compare
9c7da2e to
8c4ba82
Compare
Problem
The gateway consumed
.restart_notify.jsonon a one-shot startup send. If the platform adapter was not ready yet, the transport refused the send as retryable, or startup/shutdown raced the worker, the completion obligation could be lost and the requester never learned that the gateway returned.Current
mainstill fails the PR-owned regression tests when they are transplanted without the production change (11 failed, 36 passed).Approach
retry_aftersupport;/restarthandlers and finish any in-flight worker-thread marker write before propagating even repeated cancellation, so stale writes cannot reorder;The implementation reuses the current
resolve_delivery_transport()path and keeps current-main async marker writes and startup/session lifecycle changes intact.Relationship to overlapping work
main.Validation
Rebased onto
NousResearch/hermes-agent@56526bc0d3(2026-08-16).scripts/run_tests.shacross 12 restart/startup/reconnect/session-finalization/update-streaming files: 154 passed, 2 skippedruff checkon all touched Python files: passedpython3 -m py_compileon touched modules/tests: passedpython3 scripts/check-windows-footguns.py --all: passed (973 files scanned)mainmypy gateway/run.py gateway/slash_commands.py: blocked identically on the candidate and exact base by the same two pre-existing repository errors (mutagen.oggopusstubs missing and the existingtools/tts_tool.pysyntax error)Related #69370.
Related #66589.