fix(sdk): execute the first message to a freshly-joined peer exactly once [INT-969]#477
Merged
AlexanderZ-Band merged 10 commits intoJul 23, 2026
Conversation
Green regressions locking current single-context guarantees: - The gateway sequence (message posted before the peer's context is live, delivered via /next with the WebSocket copy arriving mid-execution) executes the handler exactly once. - Cancellation mid-processing releases the local in-flight claim. Red targets defining the desired lifecycle, to turn green with the fix: - Two live contexts for one room execute a shared message once. - ACK_PENDING state survives LRU pressure instead of being evicted into a side-effect replay on redelivery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Arrange ACK_PENDING and the cache overflow via _process_event with a failing durable ack instead of poking the bookkeeping directly, and give the retry budget headroom so eviction surfaces as the actual hazard: a handler replay on redelivery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Evicting a completed-but-unacked message from the ack-pending map turned redelivery into a full handler replay of already-executed side effects. Ack-pending entries have a bounded exit of their own (each retry either succeeds or the retry budget promotes the message to completed), so the LRU cap on this map was never needed for growth control. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…r-processes-the-first-message-to-a-INT-969
AlexanderZ-Band
marked this pull request as ready for review
July 22, 2026 09:18
amit-gazal-thenvoi
approved these changes
Jul 23, 2026
…essage-to-a-INT-969
AlexanderZ-Band
deleted the
feat/a2agatewayadapter-processes-the-first-message-to-a-INT-969
branch
July 23, 2026 07:06
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
Prevents freshly joined A2A Gateway peers from processing the first inbound message more than once.
Validation
CI green; 2 live A2A gateway tests passed.