Repository navigation
Tell the requester when the handler failed every attempt - #10
Merged
Merged
Conversation
A dispatcher whose handler failed four times marked the job failed and sent nothing, so the requester waited in silence for an answer that never came. After the last failed try the job now owes the requester a notice: one correlated finding that says the request was not handled. The notice is tried again with backoff, never runs the handler again, and goes only to a sender that is still trusted and has no reply yet. 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
When a handler fails all four attempts, the dispatcher sets the job to
failedand sends nothing. The requester waits for an answer that never comes. In production on 2026-09-30, Bauzentrale's handler failed four times withRequest could not be recorded: storage., and the sender got no word.Change
notify, notfailed.notifyjob sends one correlatedfindingto the requester: "This request was not handled. The handler failed 4 times, so the dispatcher stopped trying. Send the request again later." Then the job isfailed.executeuses). It mirrors the request's encryption throughsend.notifyjob never runs the handler again, also after a crash.trusted()is now one function, used byexecuteand by the notice.Tests
tests/runtime.rs: a request whose handler fails every attempt goesretrying×3 →notify→failed. The requester gets exactly one finding in reply to the request, also when the notice step runs again.dispatcher statusshowsfailed: 1. The test fails on main (("failed", 4)instead of("notify", 4)).cargo fmt --checkandcargo clippy --all-targets -- -D warningsare clean.cargo test --test runtimepasses.dispatcher::tests::configuration_is_validated_against_the_identity_and_filesystemfails on main and on this branch the same way. It is not related to this change.🤖 Generated with Claude Code