Repository navigation
Stream Responses compaction preparation and progress - #1363
Merged
Merged
Conversation
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.
Initial Responses compaction currently runs before SSE opens, so healthy summary work can hit a 60-second preparation limit without delivering keepalives or progress. With
responses_compactionenabled, this accepts a durable Response after upfront validation, yieldsresponse.createdandresponse.in_progress, and then performs preparation under the existing execution, cancellation and storage machinery.Compaction emits metadata-only
response.compaction.compactingevents for new summary text, at most once per 30 seconds. Only published checkpoints produce output-item lifecycle events and opaque encrypted content; abandoned advisory work creates no output item or index gap. Initial helper preparation has a nonrenewing five-minute allowance within the existing ten-minute Response deadline. Flag-off ordering and caller output limits remain unchanged.Validation: formatting and strict Clippy pass; 1,089 backend tests pass with 54 opt-in tests ignored; all 53 selected disposable-database tests pass. An encrypted Local SDK smoke completed a controlled 75.7-second compaction with initial lifecycle receipt in 28 ms, 73 keepalives, three progress events and a durable checkpoint verified by a fresh-session reload. Advisory failure, accepted failure, explicit cancellation, disconnect continuation, active tool compaction and history preservation were exercised. Nine real DeepSeek Responses and five summary helpers completed through the attested provider path. Applicable CI is green. No merges or Dev/Production deployments.