fix: preserve SSE resume cache and correct event replay - #1165
Open
freedom-winds wants to merge 3 commits into
Open
Conversation
DaleSeo
reviewed
Aug 11, 2026
DaleSeo
reviewed
Aug 18, 2026
| let sync_index = index.saturating_sub(front_event_id.index); | ||
| // Last-Event-ID is the last event the client received. The resume is | ||
| // valid as long as the next event has not already fallen out of cache. | ||
| let next_index = index.saturating_add(1); |
Member
There was a problem hiding this comment.
A standalone GET emits a synthetic priming event with ID 0. But CachedTx::new_common also assigns 0 to the first cached common event. How should a client that only received the priming event resume without sync(0) skipping that unseen notification?
Comment on lines
+1421
to
+1422
| assert!(worker.tx_router[&http_request_id].completed_at.is_some()); | ||
| assert!(worker.tx_router[&http_request_id].resources.is_empty()); |
Member
There was a problem hiding this comment.
Could this regression exercise resume and assert that the cached final response is delivered?
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
Fix two issues in the Streamable HTTP server's SSE resume behavior:
Last-Event-IDwas replayed again.Changes
Last-Event-ID.completed_cache_ttlto evict completed request caches.