Repository navigation
2.18.2: reply alerts go out the moment the reply is saved - #68
Merged
Merged
Conversation
One Hermes process owns the background sender (a file lock), and it only noticed alerts queued by other processes when it next polled: every 5 s in 2.16, 1 s since 2.17. A long-running process on an older plugin kept owning it, so alerts sat for several seconds before sending. Now the process that queued a reply, task or helper alert sends it right away on its own thread. Both paths claim each alert atomically before sending, so it goes out once. Approval alerts keep their grace period and stay with the owning sender. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem: reply alerts took 10–15 s. On the maintainer's host, the journal showed each alert queued within a second of the reply being saved, but only claimed for sending about 5 s later.
worker.lock. There, that was a dashboard started two days earlier on plugin 2.16, which polled every 5 s.Fix
_queue_eventsends reply, task, helper and clarification alerts at once, on a short-lived thread in the process that queued them (_send_now)._send_row. Both the immediate path and the owner's drain claim the row atomically (pending→sending), so each alert is sent exactly once.send_on_queueopts in.Tests
test_a_reply_alert_goes_out_as_soon_as_it_is_queued(and no second send from the drain).test_approval_waits_for_its_owner_instead_of_sending_on_queue.main, with the same single environment-bound failure.Docs:
docs/NOTIFICATIONS.md. Version 2.18.2.🤖 Generated with Claude Code