fix(acp): recover omitted channel replies - #5637
Draft
j3h7sx wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Hyung-shik Jung <jung.hyungshik@gmail.com> Signed-off-by: Hyung-shik Jung <jung.hyungshik@gmail.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.
Summary
messageIdRoot cause
ACP sends generated assistant text through
agent_message_chunkupdates. Buzz Desktop shows those updates in Activity. Thesession/promptresult contains only a stop reason.External ACP runtimes can finish a turn without calling
buzz messages send. When that happens, the answer exists in Activity but no channel event exists for desktop or mobile clients to render.This patch adds a harness-level delivery safety net at
end_turn. An explicit agent send still wins. A relay query error or timeout skips recovery to protect against duplicate messages.The same recovery path covers the race where a control signal arrives after the ACP prompt has already completed.
Related reports
This addresses the missing-event failure mode reported in #5388.
It complements #5635, which handles a separate desktop Inbox case where a signed NIP-10 reply exists on the relay but the DM projection omits it. The two patches have no file overlap.
Validation
cargo test -p buzz-acpwith 743 library tests and 9 lifecycle tests passingcargo clippy -p buzz-acp --all-targets -- -D warningscargo fmt -- --checkgit diff --check