Repository navigation
Fix notification delivery defects found in review - #176
Merged
Merged
Conversation
A push raised in a short wake without network was tried once and lost. Every notification now waits per channel in a delivery outbox on disk and is retried with backoff (at once after a wake or when the network is back) for a day, with a log line per accepted send and its receipt. Agent tasks on Claude Code and Codex wait while their API host does not resolve instead of failing in a DarkWake. Failures go out with high priority and the run id, once per failing streak with one recovery push; long rate-limit pauses and long waits of due tasks are announced once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claim outbox entries before writing them so a concurrent retry sweep cannot send them twice, drop entries past their window without a try, retry channels side by side and stop the tries on shutdown, detect a wake on the wall clock, check the API host the instance actually uses, keep a pause chain open across runs that started before it, count only unexplained waiting time, and keep one inbox row for a failure streak across reminders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ications # Conflicts: # README.md
A retry sweep now works on the outbox as it is after its claim, so a send that settled meanwhile is not delivered twice and a counted try is not overwritten. Every send gets its own outbox key and only tries and releases what it claimed. A failed request names the host, never the URL, which for a Slack or Discord webhook is the secret. While the settings cannot be read the known remote channels are queued instead of dropped, and tries in the first two minutes after a wake that fail on the network do not count towards the backoff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the forced two-minute wake window with a grace: a network failure right after a wake does not count and comes back after 30 seconds, while a rate limit or server error keeps its backoff. A reminder supersedes the waiting deliveries of the same streak under a new key. The remote channels are learned at start, a sweep reads the outbox only for due entries, and a retried delivery is logged as such whether its tries counted or not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eview-fixes # Conflicts: # README.md # internal/engine/delivery.go # internal/engine/delivery_test.go # internal/engine/engine.go # internal/notify/delivery_test.go # internal/notify/http.go
A reminder supersedes waiting pushes only on the channels it goes to. While the settings cannot be read, the channels waiting in the outbox count as known too, so a restart does not lose remote pushes. A request that cannot even be built no longer quotes its URL. A delivery that never failed no longer forces the next sweep past other pauses, and the lost line says how many tries counted again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
4 tasks done
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.
Follow-up to #172: fixes defects that an independent review and two self-reviews found in the new notification delivery.
What changes for you
dispatchqd.err.logordeliveries.json, including when the request cannot even be built. For a Slack or Discord webhook the URL is the secret.config.tomlcannot be read, a notification goes to the desktop and is queued for the remote channels that were on before. Those channels are known from the last good read, or from what already waits in the outbox. This holds right after a restart too.NOTIFICATION LOSTline says how many tries counted again.README "When DispatchQ notifies" describes the above.
Evidence
go build,gofmt,go vet,golangci-lint run(0 issues) andgo test ./... -racepass.scripts/pkgtestwas killed once under load in the full run and passed when re-run on its own; this branch does not touch it.🤖 Generated with Claude Code