Repository navigation
Conversation
…n sends the plain notice The retry cap from #138947 gave up about 35 s after exit and then broke out of the watcher, skipping the plain-text completion notice. A temporary refusal (adapter reconnecting, store draining or busy, a preflight "retry" verdict) therefore lost a completion that main would have delivered on the next tick, and nothing told the user. Retry eight times with capped exponential backoff via the existing jittered_backoff helper (5, 10, 20, 40, then 60 s: about five minutes at the default 5 s interval), then fall through to the plain completion notice the watcher already sends when agent notify is off.
|
Thanks @KoNit-K. Your commit is carried into #139026 with your authorship ( Why this PR couldn't land on its own: the refusal behind #138940 is always the same #139026 is armed. I'll post the merge SHA here once it lands, and reopen this if it doesn't. |
…n sends the plain notice The retry cap from #138947 gave up about 35 s after exit and then broke out of the watcher, skipping the plain-text completion notice. A temporary refusal (adapter reconnecting, store draining or busy, a preflight "retry" verdict) therefore lost a completion that main would have delivered on the next tick, and nothing told the user. Retry eight times with capped exponential backoff via the existing jittered_backoff helper (5, 10, 20, 40, then 60 s: about five minutes at the default 5 s interval), then fall through to the plain completion notice the watcher already sends when agent notify is off.
|
Landed on main via #139026 (merge head |
What does this PR do?
Background-process completion notifications no longer retry forever when the gateway cannot admit their synthetic event. The process watcher now makes at most three admission attempts and doubles the retry delay up to 60 seconds. Successful admissions and the existing completion delivery path are unchanged.
Related Issue
Fixes #138940
Type of Change
Changes Made
gateway/run_notifications.py— bounds refused completion admissions and adds capped exponential retry delays for exited background processes.tests/gateway/test_background_process_notifications.py— proves that failed admissions stop after the third attempt instead of polling an exited process indefinitely.How to Test
scripts/run_tests.sh tests/gateway/test_background_process_notifications.py -q— 31 passed.$HERMES_PYTHON -m ruff check gateway/run_notifications.py tests/gateway/test_background_process_notifications.py— passed.Evidence
scripts/run_tests.sh tests/gateway/test_background_process_notifications.py -qcompleted with 31 passed.Checklist
Code
Documentation & Housekeeping
cli-config.yaml.example: N/A.CONTRIBUTING.mdorAGENTS.md: N/A.